Skip to content

Conversation

@pilartomas
Copy link
Contributor

@pilartomas pilartomas commented Jan 7, 2026

Signed-off-by: Tomas Pilar [email protected]

Summary

Linked Issues

closes #1762

Documentation

  • No Docs Needed:

If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @pilartomas, 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 significantly enhances the AgentStack SDK by integrating a dedicated Approval extension. This new feature allows agents to formally request user approval for critical actions, providing a clear human-in-the-loop mechanism. It introduces structured data models for approval requests and responses, along with server and client-side logic to manage these interactions. Concurrently, it deprecates the older ToolCallRequest and ToolCallExtensionServer, streamlining the approach to agent-user interactions within the SDK.

Highlights

  • New Approval Extension: Introduced a new Approval extension within the agentstack-sdk-py to facilitate explicit user approval workflows for agent actions.
  • Structured Approval Models: Added ApprovalRequest and ApprovalResponse Pydantic models to define the structure for requesting and handling user approvals, including a mechanism to raise an error on rejection.
  • Server and Client Implementations: Provided ApprovalExtensionServer and ApprovalExtensionClient classes to manage the lifecycle of approval requests and responses, integrating with the SDK's message and context handling.
  • Deprecation of ToolCall: Marked ToolCallRequest and ToolCallExtensionServer as deprecated, guiding users to transition to the new ApprovalRequest and ApprovalExtensionServer for future interactions.

🧠 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 new generic user approval extension, which is a great addition for interactive agent workflows. It also deprecates the older, more specific ToolCallRequest and ToolCallExtensionServer in favor of this new mechanism. The implementation of the new approval extension is well-structured. I've added a few suggestions to improve code clarity and maintainability.

@pilartomas pilartomas force-pushed the feat-approval-extension branch 2 times, most recently from 1b17adf to a23d9a6 Compare January 7, 2026 09:05
@pilartomas pilartomas force-pushed the feat-approval-extension branch from a23d9a6 to 5962121 Compare January 7, 2026 09:08
Signed-off-by: Tomas Pilar <[email protected]>
@pilartomas pilartomas force-pushed the feat-approval-extension branch from 5d56f82 to 1af57f6 Compare January 7, 2026 09:38
@pilartomas pilartomas marked this pull request as ready for review January 7, 2026 09:39
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 7, 2026
Signed-off-by: Tomas Pilar <[email protected]>
Signed-off-by: Tomas Pilar <[email protected]>
@pilartomas pilartomas requested review from kapetr and tomkis January 7, 2026 09:52
Signed-off-by: Tomas Pilar <[email protected]>
Signed-off-by: Tomas Pilar <[email protected]>
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 8, 2026
Signed-off-by: Tomas Pilar <[email protected]>
@pilartomas pilartomas merged commit 1850fe9 into main Jan 9, 2026
10 checks passed
@pilartomas pilartomas deleted the feat-approval-extension branch January 9, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generic Approval Extension

3 participants