Skip to content

Conversation

@tomkis
Copy link
Collaborator

@tomkis tomkis commented Oct 21, 2025

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @tomkis, 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 undertakes a significant rework of the beeai-sdk across both Python and TypeScript, focusing on enhancing modularity, consistency, and maintainability. The core changes involve centralizing the handling of agent extensions and task status updates within the SDK, which in turn simplifies the client-side UI implementation. This refactoring aims to provide a more robust and easier-to-manage foundation for interacting with BeeAI agents and their various capabilities.

Highlights

  • Centralized A2A Extension Handling: Introduced new handleAgentCard and handleTaskStatusUpdate functions within the beeai-sdk-ts to centralize the processing of agent capabilities and task status updates, respectively. This consolidates logic for various extensions like LLM, embedding, MCP, OAuth, settings, and secrets.
  • Refactored UI Client Integration: The beeai-ui client (buildA2AClient) has been significantly refactored to leverage the new centralized SDK functions, reducing boilerplate code and improving modularity by removing many individual extension-related imports and local processing.
  • Improved Secrets Management: The Python SDK example and TypeScript UI components now utilize a more consistent and explicit approach for demanding and fulfilling secrets. This includes updating SecretsExtensionSpec initialization and renaming internal variables like secrets to demandedSecrets for clarity.
  • Streamlined Agent Settings Management: Agent settings are now managed more directly through the AgentDemandsProvider in the UI, with clearer terminology (SettingsDemands, SettingsFullfillments) and a dedicated state for selected settings, simplifying how settings are applied and updated.
  • Build Process Dependency Update: The beeai-web build process has been updated to explicitly depend on the beeai-sdk-ts build, ensuring proper order and integration of the SDK changes.
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 significant and beneficial refactoring of the BeeAI SDK integration. The core logic for handling agent capabilities and demands has been centralized within the beeai-sdk-ts package, which greatly simplifies the beeai-ui codebase and improves overall modularity. The new handleAgentCard and handleTaskStatusUpdate utilities are excellent additions. While the refactoring is a clear improvement, there are a few areas that require attention. I've noted some typos in exported types and function names (e.g., Fullfillment instead of Fulfillment), several TODO comments indicating incomplete work, and a potential regression in OAuth handling which appears to be missing from the new implementation. Addressing these points will help solidify this excellent refactoring.

@tomkis
Copy link
Collaborator Author

tomkis commented Oct 23, 2025

/gemini review

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 significant and beneficial refactoring of the BeeAI SDK, particularly in how agent capabilities and extensions are handled. By centralizing logic into handleAgentCard and handleTaskStatusUpdate handlers, the client-side code in beeai-ui is greatly simplified, making it more maintainable and easier to understand. The changes are consistent across the Python example, the TypeScript SDK, and the UI application. I've identified a critical bug in the Python example and a few areas for improvement in the TypeScript code, including addressing TODOs, improving maintainability, and handling a potential silent failure case. There's also a leftover debug statement that should be removed. Overall, this is a great step forward for the SDK's architecture.

}

if (formDemands) {
const formFullfilment = await fullfillments.form(formDemands);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Really suboptimal. Form acts like demand/fullfilment but in fact it's not because demand is always Record<string,Demand> which is not the case for Forms, we should unify this.

@tomkis tomkis requested a review from PetrBulanek October 27, 2025 07:21
if (formPart) {
parts.push(formPart);
}
return [createFormPart(form)];
Copy link
Contributor

Choose a reason for hiding this comment

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

We should change this to:

parts.push(createFormPart(form));

Comment on lines +47 to +50
if (!agentClient) {
return <></>;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

We should add some skeleton component or loader.

tomkis added 10 commits October 27, 2025 13:21
Signed-off-by: Tomas Weiss <[email protected]>
Signed-off-by: Tomas Weiss <[email protected]>
Signed-off-by: Tomas Weiss <[email protected]>
Signed-off-by: Tomas Weiss <[email protected]>
Signed-off-by: Tomas Weiss <[email protected]>
Signed-off-by: Tomas Weiss <[email protected]>
Signed-off-by: Tomas Weiss <[email protected]>
Signed-off-by: Tomas Weiss <[email protected]>
Signed-off-by: Tomas Weiss <[email protected]>
@PetrBulanek PetrBulanek self-requested a review October 27, 2025 12:28
@tomkis tomkis merged commit c6153ee into main Oct 27, 2025
8 checks passed
@tomkis tomkis deleted the chore/sdk-rework branch October 27, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants