Skip to content

Commit d647e2a

Browse files
Merge branch 'ag-ui-protocol:main' into kotlinsdk
2 parents 2b4e433 + 14d051e commit d647e2a

File tree

16 files changed

+109
-306
lines changed

16 files changed

+109
-306
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
**/.claude/settings.local.json
22
.vscode/
33
.idea/
4+
5+
.DS_Store

docs/development/contributing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ contributor use the `community` prefix, i.e.
1414
(`typescript-sdk/integrations/community-your-integration`).
1515

1616
For questions and discussions, please use
17-
[GitHub Discussions](https://github.com/orgs/ag-ui-protocol/discussions).
17+
[GitHub Discussions](https://github.com/ag-ui-protocol/ag-ui/discussions).

typescript-sdk/apps/dojo/e2e/tests/copilotkit-home.spec.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

typescript-sdk/apps/dojo/e2e/tests/integration/ai-features.spec.ts

Lines changed: 0 additions & 56 deletions
This file was deleted.

typescript-sdk/apps/dojo/e2e/tests/smoke-only/basic-loading.spec.ts

Lines changed: 0 additions & 76 deletions
This file was deleted.

typescript-sdk/apps/dojo/e2e/tests/vercelAISdkTests/agenticChatPage.spec.ts

Lines changed: 0 additions & 115 deletions
This file was deleted.

typescript-sdk/integrations/a2a-middleware/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ag-ui/a2a-middleware",
33
"author": "Markus Ecker <[email protected]>",
4-
"version": "0.0.1",
4+
"version": "0.0.2",
55
"main": "./dist/index.js",
66
"module": "./dist/index.mjs",
77
"types": "./dist/index.d.ts",
@@ -20,14 +20,15 @@
2020
},
2121
"dependencies": {
2222
"@a2a-js/sdk": "^0.2.2",
23-
"@ag-ui/client": "workspace:*",
23+
"@ag-ui/client": ">=0.0.40",
2424
"ai": "^4.3.16",
2525
"zod": "^3.22.4"
2626
},
2727
"peerDependencies": {
2828
"rxjs": "7.8.1"
2929
},
3030
"devDependencies": {
31+
"@ag-ui/client": "workspace:*",
3132
"@types/jest": "^29.5.14",
3233
"@types/node": "^20.11.19",
3334
"jest": "^29.7.0",

typescript-sdk/integrations/a2a-middleware/src/index.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { AgentCard, SendMessageResponse, SendMessageSuccessResponse } from "@a2a
2020
import { Observable, Subscriber, tap } from "rxjs";
2121
import { createSystemPrompt, sendMessageToA2AAgentTool } from "./utils";
2222
import { randomUUID } from "crypto";
23-
import { text } from "stream/consumers";
2423

2524
export interface A2AAgentConfig extends AgentConfig {
2625
agentUrls: string[];
@@ -129,6 +128,9 @@ export class A2AMiddlewareAgent extends AbstractAgent {
129128
this.finishTextMessages(observer, pendingTextMessages);
130129

131130
if (pendingA2ACalls.size > 0) {
131+
// Array to collect all new tool result messages
132+
const newToolMessages: Message[] = [];
133+
132134
const callProms = [...pendingA2ACalls].map((toolCallId) => {
133135
const toolCallsFromMessages = this.messages
134136
.filter((message) => message.role === "assistant")
@@ -160,6 +162,9 @@ export class A2AMiddlewareAgent extends AbstractAgent {
160162
this.addMessage(newMessage);
161163
this.orchestrationAgent.addMessage(newMessage);
162164

165+
// Collect the message so we can add it to input.messages
166+
newToolMessages.push(newMessage);
167+
163168
const newEvent: ToolCallResultEvent = {
164169
type: EventType.TOOL_CALL_RESULT,
165170
toolCallId: toolCallId,
@@ -184,6 +189,12 @@ export class A2AMiddlewareAgent extends AbstractAgent {
184189
runId: input.runId,
185190
} as RunFinishedEvent);
186191

192+
// Add all tool result messages to input.messages BEFORE triggering new run
193+
// This ensures the orchestrator sees the tool results in its context
194+
newToolMessages.forEach((msg) => {
195+
input.messages.push(msg);
196+
});
197+
187198
this.triggerNewRun(observer, input, pendingA2ACalls, pendingTextMessages);
188199
});
189200
} else {

typescript-sdk/integrations/langgraph/python/ag_ui_langgraph/agent.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,13 @@ async def _handle_single_event(self, event: Any, state: State) -> AsyncGenerator
651651
)
652652
)
653653
yield self._dispatch_event(
654-
ToolCallArgsEvent(type=EventType.TOOL_CALL_ARGS, tool_call_id=event["data"]["id"], delta=event["data"]["args"], raw_event=event)
654+
ToolCallArgsEvent(
655+
type=EventType.TOOL_CALL_ARGS,
656+
tool_call_id=event["data"]["id"],
657+
delta=event["data"]["args"] if isinstance(event["data"]["args"], str) else json.dumps(
658+
event["data"]["args"]),
659+
raw_event=event
660+
)
655661
)
656662
yield self._dispatch_event(
657663
ToolCallEndEvent(type=EventType.TOOL_CALL_END, tool_call_id=event["data"]["id"], raw_event=event)

typescript-sdk/integrations/langgraph/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ag-ui-langgraph"
3-
version = "0.0.14"
3+
version = "0.0.15"
44
description = "Implementation of the AG-UI protocol for LangGraph."
55
authors = ["Ran Shem Tov <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)