Skip to content

Conversation

@xavidop
Copy link
Contributor

@xavidop xavidop commented Jan 23, 2026

Add support for agents in the UI

Checklist (if applicable):

@github-actions github-actions bot added the docs Improvements or additions to documentation label Jan 23, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @xavidop, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request proposes an RFC to integrate agent primitives and their sessions into the Genkit Reflection API. The primary objective is to provide robust tooling support for agent development, allowing developers to seamlessly inspect, manage, and debug agents and their conversational flows directly within the Developer UI. This enhancement aims to bridge the current gap where the Reflection API supports actions and flows but lacks awareness of the Agent abstraction layer.

Highlights

  • New RFC for Agent Reflection API: This pull request introduces a Request for Comments (RFC) to extend the Genkit Reflection API, enabling introspection and interaction with Agent primitives and their associated sessions.
  • Enhanced Developer UI Capabilities: The proposed API will allow the Developer UI to list and inspect agents, view and manage agent sessions, execute conversations, monitor agent state, and debug agent behavior interactively.
  • New API Endpoints Defined: The RFC details several new API endpoints, including /api/agents for listing agents, /api/agents/{agentName} for agent details, /api/agents/{agentName}/sessions for session management, and /api/agents/{agentName}/execute for starting conversations.
  • Implementation Considerations: Key implementation aspects are outlined, such as the need for an Agent Registry within the Genkit runtime and a Store Abstraction for managing server-side agent sessions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive RFC for extending the Genkit Reflection API to support agents and sessions. The document outlines new API endpoints for listing agents, retrieving agent details, managing sessions, and executing agent conversations. The proposed API surface is well-structured and addresses key development and debugging needs for agent-based applications. The RFC also touches upon important implementation considerations such as agent registry and store abstraction. Overall, this is a valuable addition that will significantly enhance the developer experience for Genkit agents.

"name": "persistentAgent",
"description": "An agent with server-side state",
"hasStore": true,
"storeType": "postgres",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The storeType field currently shows a specific example value "postgres". To make the RFC more generic and descriptive, consider clarifying that this field represents the type of the session store and providing a more abstract description or a note that it's an example.

Comment on lines +73 to +104
"initSchema": {
"type": "object",
"properties": {
"sessionId": {"type": "string"},
"messages": {"type": "array"},
"state": {},
"artifacts": {"type": "array"}
}
},
"inputSchema": {
"type": "object",
"properties": {
"content": {"type": "string"}
}
},
"outputSchema": {
"type": "object",
"properties": {
"sessionId": {"type": "string"},
"messages": {"type": "array"},
"state": {},
"artifacts": {"type": "array"}
}
},
"streamSchema": {
"type": "object",
"properties": {
"sessionId": {"type": "string"},
"chunk": {},
"stateUpdate": {},
"artifact": {}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The schema definitions (initSchema, inputSchema, outputSchema, streamSchema) currently show empty objects {} for their properties. While this indicates they are objects, it doesn't provide much insight into their expected structure. Consider adding example properties or a more descriptive placeholder to illustrate the typical content of these schemas.

Comment on lines +128 to +129
"createdAt": 1705968000000,
"updatedAt": 1705968300000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The createdAt and updatedAt fields are shown as numeric timestamps. It would be beneficial to specify the unit of these timestamps (e.g., milliseconds since epoch, Unix timestamp) for clarity and consistency.

},
"init": {
"sessionId": "sess_abc123",
"messages": [...],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The messages field in the init object is represented as [...]. This is not a valid JSON syntax. Please update it to either an empty array [] or a valid example array of messages.

Suggested change
"messages": [...],
"messages": []

Comment on lines +229 to +244
data: {"sessionId": "sess_abc123", "chunk": {"content": [{"text": "The"}]}}

event: chunk
data: {"sessionId": "sess_abc123", "chunk": {"content": [{"text": " weather"}]}}

event: stateUpdate
data: {"sessionId": "sess_abc123", "stateUpdate": {"status": "fetching_weather"}}

event: artifact
data: {"sessionId": "sess_abc123", "artifact": {"name": "map", "parts": [...]}}

event: done
data: {"sessionId": "sess_abc123", "messages": [...], "state": {...}}

event: telemetry
data: {"traceId": "trace_xyz"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The data fields for the streaming event types (chunk, stateUpdate, artifact, done, telemetry) are shown as generic JSON objects. While the event types are clear, providing a more explicit structure or referencing a schema for the data content would enhance the clarity of the streaming response format.

@xavidop xavidop changed the title feat: RFC for agent in reflection API RFC[dev-ui] for agent in reflection API Jan 23, 2026
@xavidop xavidop changed the title RFC[dev-ui] for agent in reflection API RFC[dev-ui]: support for agents in the dev-ui Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant