Skip to content

Conversation

@tomkis
Copy link
Collaborator

@tomkis tomkis commented Jan 21, 2026

Summary

Linked Issues

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.

Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com>
Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com>
@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 enhances the project's documentation by introducing two new skill guides. One guide provides detailed instructions and code examples for developers looking to integrate with the Agent Stack client SDK, covering essential functionalities from agent interaction to extension handling. The other offers a foundational understanding of the Agent Stack platform, outlining its core purpose and the primary user roles it serves.

Highlights

  • Client SDK Essentials Documentation: A new skill document (agentstack-client-sdk-essentials/SKILL.MD) has been added, providing comprehensive guidelines and TypeScript code examples for integrating with the Agent Stack client SDK. This includes steps for listing agents, creating context and authentication tokens, setting up the A2A client, managing multi-turn conversations, and fulfilling Agent Stack extensions, particularly for LLMs.
  • Agent Stack Overview Documentation: A new skill document (agentstack-overview/SKILL.md) has been introduced, offering a high-level overview of the Agent Stack platform. It clarifies the platform's goal as infrastructure for AI agents, its reliance on the A2A protocol with extensions, and defines the "Agent Builder" persona.

🧠 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 two new markdown files that serve as documentation for the Agent Stack, covering an overview and essential SDK usage guidelines. My review focuses on enhancing the clarity, correctness, and consistency of these documents and their code examples. I've identified several areas for improvement, including a critical correction to an API call in a TypeScript snippet, fixing typos, improving code style in examples for better readability, and ensuring consistent use of terminology throughout the documentation. Addressing these points will significantly improve the quality and usability of the new documentation.

Comment on lines +47 to +61
const context = await agentstack.createContext(agentId);

const { token } = await agentstack.createContextToken({
contextId: context.id,

globalPermissions: { llm: ['*'], a2a_proxy: ['*'] },

contextPermissions: {
files: ['*'],
vector_stores: ['*'],
context_data: ['*'],
},
});

const contextId = context.id;
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This code snippet has a few issues that will cause it to fail:

  1. The createContext function is called with a string agentId, but it expects an object, likely of the form { provider_id: agentId }.
  2. The return values of createContext and createContextToken are Result objects. You must check if the operation was successful (e.g., result.ok) before trying to access the data property.
  3. Because context will hold the Result object from createContext, context.id will be undefined, causing an error in the createContextToken call.

Here is a corrected version of this block for your reference:

const contextResult = await agentstack.createContext({ provider_id: agentId });
if (!contextResult.ok) {
  throw contextResult.error;
}
const context = contextResult.data;

const tokenResult = await agentstack.createContextToken({
    contextId: context.id,
    globalPermissions: { llm: ['*'], a2a_proxy: ['*'] },
    contextPermissions: {
        files: ['*'],
        vector_stores: ['*'],
        context_data: ['*'],
    },
});
if (!tokenResult.ok) {
  throw tokenResult.error;
}
const { token } = tokenResult.data;

const contextId = context.id;

description: Basic implementation guidelines how to work with Agent Stack client SDK
---

Custom GUI integration with Agent Stack requires dependency on both [A2A](https://a2a-protocol.org/latest/specification) as well as [Agent Stack](https://agentstack.beeai.dev/llms.txt).
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 link for 'Agent Stack' points to a llms.txt file. This seems incorrect for a general reference to the Agent Stack project. It would be more helpful for users if this link pointed to the main project or documentation page.

Suggested change
Custom GUI integration with Agent Stack requires dependency on both [A2A](https://a2a-protocol.org/latest/specification) as well as [Agent Stack](https://agentstack.beeai.dev/llms.txt).
Custom GUI integration with Agent Stack requires dependency on both [A2A](https://a2a-protocol.org/latest/specification) as well as [Agent Stack](https://agentstack.beeai.dev/).


Agent Stack SDK extends [A2A - Agent to Agent](https://a2a-protocol.org/latest/specification) protocol.

You need to create the client with a caveat that we need to provide fetch implemneation that packs in context token as authorization header.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There is a typo in the word 'implementation'.

Suggested change
You need to create the client with a caveat that we need to provide fetch implemneation that packs in context token as authorization header.
You need to create the client with a caveat that we need to provide fetch implementation that packs in context token as authorization header.

DefaultAgentCardResolver,
JsonRpcTransportFactory,
} from '@a2a-js/sdk/client';
import { createAuthenticatedFetch } from "agentstack-sdk";
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 import statements in this file use a mix of single and double quotes. For consistency, it's best to stick to one style. The prevailing style in this file seems to be single quotes.

Suggested change
import { createAuthenticatedFetch } from "agentstack-sdk";
import { createAuthenticatedFetch } from 'agentstack-sdk';

TaskStatusUpdateEvent,
} from '@a2a-js/sdk';

const conversationHistory: Message[] = []
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 conversationHistory array is declared but never used in the code example. This could be confusing for readers. Please consider either removing it or demonstrating how it could be used to maintain conversation state.

}
}

console.log(`Client prompted ${clientPrompt} and agent responded with ${agentReply})
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's a typo in the console.log template literal. It includes an extra closing parenthesis ) inside the string, which will be printed in the output.

Suggested change
console.log(`Client prompted ${clientPrompt} and agent responded with ${agentReply})
console.log(`Client prompted ${clientPrompt} and agent responded with ${agentReply}`)


Agents declare demands via agent card extensions. Client fulfills demands using dependency injection:

1. Fetch agent card from `/.well-known/agent-card.json`
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This line states that the agent card should be fetched from /.well-known/agent-card.json. However, the code example on line 85 uses a different path: ${agentstackUrl}/api/v1/a2a/${agentId}/agent-card.json. This inconsistency can be confusing. Please update the documentation to be consistent with the code example.

3. Fulfill the demands in the client
4. Assemble and send the fulfillment via Message metadata.

### Example of how fulfill LLM extension
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There is a minor grammatical error in the heading. It should be 'how to fulfill'.

Suggested change
### Example of how fulfill LLM extension
### Example of how to fulfill LLM extension


```ts
import {
buildApiClient,
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 buildApiClient function is imported but not used in this section's code examples. To avoid confusion, it's best to remove unused imports.

Comment on lines +178 to +188
llm_fulfillments: Object.entries(demand.llm_demands).reduce((memo, [demandKey]) => {
return {
...memo,
[demandKey]: {
api_model: 'gpt5',
api_base: 'http://openai-endpoint',
api_key: 'API_KEY'
}
}

}, {})
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 use of Object.entries with reduce to build the llm_fulfillments object can be simplified. Using Object.fromEntries with Object.keys().map() is a more modern and often more readable approach for this pattern.

Suggested change
llm_fulfillments: Object.entries(demand.llm_demands).reduce((memo, [demandKey]) => {
return {
...memo,
[demandKey]: {
api_model: 'gpt5',
api_base: 'http://openai-endpoint',
api_key: 'API_KEY'
}
}
}, {})
llm_fulfillments: Object.fromEntries(
Object.keys(demand.llm_demands).map((demandKey) => [
demandKey,
{
api_model: 'gpt5',
api_base: 'http://openai-endpoint',
api_key: 'API_KEY'
}
])
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants