Skip to content

Commit 20bce0b

Browse files
Merge branch 'main' into adk-middleware
2 parents 6d7d558 + 6157b97 commit 20bce0b

File tree

237 files changed

+20978
-10448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+20978
-10448
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check Generated Files
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
check-files-json:
11+
name: Check files.json
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Regenerate files.json
18+
working-directory: typescript-sdk/apps/dojo
19+
run: npm run generate-content-json
20+
21+
- name: Check files.json
22+
working-directory: typescript-sdk/apps/dojo
23+
run: |
24+
if git diff --exit-code src/files.json > /dev/null; then
25+
echo "✅ No changes detected in dojo/src/files.json. Everything is up to date."
26+
else
27+
echo "❌ Detected changes in dojo/src/files.json."
28+
echo ""
29+
echo "Please run \`(p)npm run generate-content-json\` in the typescript-sdk/apps/dojo folder and commit the changes."
30+
echo ""
31+
echo "The detected diff was as follows:"
32+
echo "::group::Diff for dojo/src/files.json"
33+
git diff src/files.json
34+
echo "::endgroup::"
35+
exit 1
36+
fi
37+
38+

.github/workflows/test.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,79 +10,83 @@ jobs:
1010
python:
1111
name: Python SDK Tests
1212
runs-on: ubuntu-latest
13-
13+
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v4
17-
17+
1818
- name: Set up Python
1919
uses: actions/setup-python@v5
2020
with:
2121
python-version: '3.9'
22-
22+
2323
- name: Install Poetry
2424
uses: snok/install-poetry@v1
2525
with:
2626
version: latest
2727
virtualenvs-create: true
2828
virtualenvs-in-project: true
29-
29+
3030
- name: Load cached venv
3131
id: cached-poetry-dependencies
3232
uses: actions/cache@v4
3333
with:
3434
path: python-sdk/.venv
3535
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
36-
36+
3737
- name: Install dependencies
3838
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
3939
working-directory: python-sdk
4040
run: poetry install --no-interaction --no-root
41-
41+
4242
- name: Install project
4343
working-directory: python-sdk
4444
run: poetry install --no-interaction
45-
45+
4646
- name: Run tests
4747
working-directory: python-sdk
4848
run: poetry run python -m unittest discover tests -v
4949

5050
typescript:
5151
name: TypeScript SDK Tests
5252
runs-on: ubuntu-latest
53-
53+
5454
steps:
5555
- name: Checkout code
5656
uses: actions/checkout@v4
57-
57+
5858
- name: Set up Node.js
5959
uses: actions/setup-node@v4
6060
with:
6161
node-version: '18'
62-
62+
6363
- name: Install protoc
6464
uses: arduino/setup-protoc@v3
6565
with:
6666
version: "25.x"
6767
repo-token: ${{ secrets.GITHUB_TOKEN }}
68-
68+
6969
- name: Install pnpm
7070
uses: pnpm/action-setup@v4
7171
with:
7272
version: 9.0.0
73-
73+
7474
- name: Setup pnpm cache
7575
uses: actions/cache@v4
7676
with:
7777
path: ~/.local/share/pnpm/store
7878
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
7979
restore-keys: |
8080
${{ runner.os }}-pnpm-store-
81-
81+
8282
- name: Install dependencies
8383
working-directory: typescript-sdk
8484
run: pnpm install --frozen-lockfile
85-
85+
86+
- name: Test Build
87+
working-directory: typescript-sdk
88+
run: pnpm run build
89+
8690
- name: Run tests
8791
working-directory: typescript-sdk
88-
run: pnpm run test
92+
run: pnpm run test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
**/.claude/settings.local.json
2+
.vscode/

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Pick the right spot so we can help you faster:
4242
- A maintainer will review your code and leave comments if needed
4343
- Once it’s approved, we’ll merge it and move the issue to “done.”
4444

45+
**NOTE:** All community integrations (ie, .NET, Golang SDK, etc.) will need to be maintained by the community
46+
4547
---
4648

4749
## 📝 Want to Contribute to the Docs?

README.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11

2-
# <img src="https://github.com/user-attachments/assets/ebc0dd08-8732-4519-9b6c-452ce54d8058" alt="ag-ui Logo" width="45"/> AG-UI: The Agent-User Interaction Protocol
2+
# <img src="https://github.com/user-attachments/assets/ebc0dd08-8732-4519-9b6c-452ce54d8058" alt="ag-ui Logo" width="22"/> AG-UI: The Agent-User Interaction Protocol
33

44
AG-UI is a lightweight, event-based protocol that standardizes how AI agents connect to user-facing applications.
5-
Built for simplicity and flexibility, it enables seamless integration between AI agents, realtime user context, and user interfaces.
5+
Built for simplicity and flexibility, it enables seamless integration between AI agents, real time user context, and user interfaces.
6+
7+
---
8+
9+
[📅 Upcoming Event: July 24 - San Francisco AG-UI workshop with AI Tinkerers in person (Feat. CopilotKit & Mastra)](https://lu.ma/ai-tinkerers-workshop?tk=JeUCY5)
10+
11+
<br>
12+
613

714
[![Version](https://img.shields.io/npm/v/@ag-ui/core?label=Version&color=6963ff&logo=npm&logoColor=white)](https://www.npmjs.com/package/@ag-ui/core)
815
![MIT](https://img.shields.io/github/license/copilotkit/copilotkit?color=%236963ff&label=License)
@@ -18,8 +25,7 @@ Built for simplicity and flexibility, it enables seamless integration between AI
1825
Follow us →
1926
</a>
2027

21-
<img width="4096" height="1816" alt="Readme 3 - Redesign" src="https://github.com/user-attachments/assets/af15b751-a72a-434f-a93c-9103f2a17006" />
22-
28+
<img width="4096" height="1752" alt="Your application-AG-UI protocol" src="https://github.com/user-attachments/assets/dc58c64c-3257-490a-b827-e163475f4166" />
2329

2430
## 🚀 Getting Started
2531
Create a new AG-UI application in seconds:
@@ -75,35 +81,39 @@ AG-UI is complementary to the other 2 top agentic protocols
7581
- 🛠️ Frontend tool integration
7682
- 🧑‍💻 Human-in-the-loop collaboration
7783

78-
### 1st party integrations with top agentic frameworks
7984

8085
## 🛠 Supported Frameworks
8186

87+
AG-UI was born from CopilotKit's initial partnership with LangGraph and CrewAI - and brings the incredibly popular agent-user-interactivity infrastructure to the wider agentic ecosystem.
88+
89+
| Framework | Status | AG-UI Resources | Integrations |
90+
| ------------------------------------------------------------------ | ------------------------ | ---------------------------------------------------------------------------- | ------------------------ |
91+
| No-framework | ✅ Supported | ➡️ Docs coming soon | |
92+
| [LangGraph](https://www.langchain.com/langgraph) | ✅ Supported | ➡️ [Demo](https://v0-langgraph-land.vercel.app/) | Partnership |
93+
| [CrewAI](https://crewai.com/) | ✅ Supported | ➡️ [Demo](https://v0-crew-land.vercel.app/) | Partnership |
94+
| [Mastra](https://mastra.ai/) | ✅ Supported | ➡️ [Demo](https://v0-mastra-land.vercel.app/) | 1st party |
95+
| [AG2](https://ag2.ai/) | ✅ Supported | ➡️ [Demo](https://v0-ag2-land.vercel.app/) | 1st party |
96+
| [Agno](https://github.com/agno-agi/agno) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/agno) | 1st party |
97+
| [LlamaIndex](https://github.com/run-llama/llama_index) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/llamaindex) | 1st party |
98+
| [Pydantic AI](https://github.com/pydantic/pydantic-ai) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/pydantic-ai) | 1st party |
99+
| [Vercel AI SDK](https://github.com/vercel/ai) | 🛠️ In Progress || Community |
100+
| [Google ADK](https://google.github.io/adk-docs/get-started/) | 🛠️ In Progress || Community |
101+
| [OpenAI Agent SDK](https://openai.github.io/openai-agents-python/) | 🛠️ In Progress || Community |
102+
| [AWS Bedrock Agents](https://aws.amazon.com/bedrock/agents/) | 🛠️ In Progress || 1st party |
103+
| [Cloudflare Agents](https://developers.cloudflare.com/agents/) | 💡 Open to Contributions || Community |
104+
| [Strands Agents SDK](https://github.com/strands-agents/sdk-python) | 💡 Open to Contributions || Community |
105+
106+
[View all supported frameworks →](https://ag-ui.com/frameworks)
107+
82108

83-
AG-UI integrates with many popular agent frameworks
84-
85-
| Framework | Status | AG-UI Resources |
86-
| ------------------------------------------------------------------ | ------------------------ | ---------------------------------------------------------------------------- |
87-
| No-framework | ✅ Supported | ➡️ Docs coming soon |
88-
| [LangGraph](https://www.langchain.com/langgraph) | ✅ Supported | ➡️ [Demo](https://v0-langgraph-land.vercel.app/) |
89-
| [Mastra](https://mastra.ai/) | ✅ Supported | ➡️ [Demo](https://v0-mastra-land.vercel.app/) |
90-
| [CrewAI](https://crewai.com/) | ✅ Supported | ➡️ [Demo](https://v0-crew-land.vercel.app/) |
91-
| [AG2](https://ag2.ai/) | ✅ Supported | ➡️ [Demo](https://v0-ag2-land.vercel.app/) |
92-
| [Agno](https://github.com/agno-agi/agno) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/agno) | |
93-
| [LlamaIndex](https://github.com/run-llama/llama_index) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/llamaindex) | |
94-
| [Pydantic AI](https://github.com/pydantic/pydantic-ai) | 🛠️ In Progress ||
95-
| [Vercel AI SDK](https://github.com/vercel/ai) | 🛠️ In Progress ||
96-
| [Google ADK](https://google.github.io/adk-docs/get-started/) | 🛠️ In Progress ||
97-
| [OpenAI Agent SDK](https://openai.github.io/openai-agents-python/) | 💡 Open to Contributions ||
98-
| [AWS Bedrock Agents](https://aws.amazon.com/bedrock/agents/) | 💡 Open to Contributions ||
99-
| [Cloudflare Agents](https://developers.cloudflare.com/agents/) | 💡 Open to Contributions ||
100-
| [Strands Agents SDK](https://github.com/strands-agents/sdk-python) | 💡 Open to Contributions ||
101-
102-
| Language SDK | Status | AG-UI Resources |
103-
| ------------------------------------------------------------------ | ------------------------ | ---------------------------------------------------------------------------- |
104-
| [.NET]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/38) |
105-
| [Nim]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/29) |
106-
| [Rust]() | 🛠️ In Progress | |
109+
| Language SDK | Status | AG-UI Resources |
110+
| ------------------------------------------------------------------ | ------------------------ | ---------------------------------------------------------------------------- |
111+
| [Kotlin]() | ✅ Supported | ➡️ [GitHub Source](https://github.com/Contextable/ag-ui-4k) |
112+
| [.NET]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/38) |
113+
| [Nim]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/29) |
114+
| [Golang]() | 🛠️ In Progress | ➡️ [Issue](https://github.com/ag-ui-protocol/ag-ui/issues/156) |
115+
| [Rust]() | 🛠️ In Progress | ➡️ [Issue](https://github.com/ag-ui-protocol/ag-ui/issues/239) |
116+
| [Java]() | 💡 Open to Contributions | ➡️ [Issue](https://github.com/ag-ui-protocol/ag-ui/issues/20) |
107117

108118

109119
[View all supported frameworks →](https://ag-ui.com/frameworks)
@@ -133,7 +143,7 @@ https://github.com/user-attachments/assets/a67d3d54-36b2-4c7a-ac69-a0ca01365d5b
133143
Check out the [Contributing guide](https://github.com/ag-ui-protocol/ag-ui/blob/main/CONTRIBUTING.md)
134144

135145
- **[Weekely AG-UI Working Group](https://lu.ma/CopilotKit?k=c)**
136-
📅 Follow the CopilotKit Luma Events Page
146+
📅 Follow the CopilotKit Luma Events Calendar
137147

138148
## Roadmap
139149

docs/quickstart/clients.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AG-UI protocol.
1515

1616
Building your own client is useful if you want to explore/hack on the AG-UI
1717
protocol. For production use, use a full-featured client like
18-
[CopilotKit ](https://copilokit.ai).
18+
[CopilotKit](https://copilotkit.ai).
1919

2020
## What you'll build
2121

docs/sdk/js/core/types.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ type ToolMessage = {
143143
content: string
144144
role: "tool"
145145
toolCallId: string
146+
error?: string
146147
}
147148
```
148149
@@ -152,6 +153,7 @@ type ToolMessage = {
152153
| `content` | `string` | Text content of the message |
153154
| `role` | `"tool"` | Role of the message sender, fixed as "tool" |
154155
| `toolCallId` | `string` | ID of the tool call this message responds to |
156+
| `error` | `string` | Error message if the tool call failed |
155157
156158
### Message
157159

docs/sdk/python/core/types.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class ToolMessage(ConfiguredBaseModel):
144144
role: Literal["tool"]
145145
content: str
146146
tool_call_id: str
147+
error: Optional[str] = None
147148
```
148149

149150
| Property | Type | Description |
@@ -152,6 +153,7 @@ class ToolMessage(ConfiguredBaseModel):
152153
| `content` | `str` | Text content of the message |
153154
| `role` | `Literal["tool"]` | Role of the message sender, fixed as "tool" |
154155
| `tool_call_id` | `str` | ID of the tool call this message responds to |
156+
| `error` | `Optional[str]` | Error message if the tool call failed |
155157

156158
### Message
157159

docs/tutorials/debugging.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ in mind:
8080
To start using the AG-UI Dojo:
8181

8282
1. Clone the repository from
83-
[github.com/ag-ui-protocol/dojo](https://github.com/ag-ui-protocol/dojo)
83+
[github.com/ag-ui-protocol/ag-ui](https://github.com/ag-ui-protocol/ag-ui)
8484
2. Follow the setup instructions in the README
8585
3. Start working through the demonstrations in order
8686
4. Use the provided test cases to validate your implementation

python-sdk/ag_ui/core/events.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,20 @@ class ThinkingTextMessageStartEvent(BaseEvent):
8787
"""
8888
Event indicating the start of a thinking text message.
8989
"""
90-
type: Literal[EventType.THINKING_TEXT_MESSAGE_START]
90+
type: Literal[EventType.THINKING_TEXT_MESSAGE_START] = EventType.THINKING_TEXT_MESSAGE_START # pyright: ignore[reportIncompatibleVariableOverride]
9191

9292
class ThinkingTextMessageContentEvent(BaseEvent):
9393
"""
9494
Event indicating a piece of a thinking text message.
9595
"""
96-
type: Literal[EventType.THINKING_TEXT_MESSAGE_CONTENT]
97-
delta: str # This should not be an empty string
98-
99-
def model_post_init(self, __context):
100-
if len(self.delta) == 0:
101-
raise ValueError("Delta must not be an empty string")
96+
type: Literal[EventType.THINKING_TEXT_MESSAGE_CONTENT] = EventType.THINKING_TEXT_MESSAGE_CONTENT # pyright: ignore[reportIncompatibleVariableOverride]
97+
delta: str = Field(min_length=1)
10298

10399
class ThinkingTextMessageEndEvent(BaseEvent):
104100
"""
105101
Event indicating the end of a thinking text message.
106102
"""
107-
type: Literal[EventType.THINKING_TEXT_MESSAGE_END]
103+
type: Literal[EventType.THINKING_TEXT_MESSAGE_END] = EventType.THINKING_TEXT_MESSAGE_END # pyright: ignore[reportIncompatibleVariableOverride]
108104

109105
class ToolCallStartEvent(BaseEvent):
110106
"""
@@ -147,7 +143,7 @@ class ToolCallResultEvent(BaseEvent):
147143
Event containing the result of a tool call.
148144
"""
149145
message_id: str
150-
type: Literal[EventType.TOOL_CALL_RESULT]
146+
type: Literal[EventType.TOOL_CALL_RESULT] = EventType.TOOL_CALL_RESULT # pyright: ignore[reportIncompatibleVariableOverride]
151147
tool_call_id: str
152148
content: str
153149
role: Optional[Literal["tool"]] = None
@@ -156,14 +152,14 @@ class ThinkingStartEvent(BaseEvent):
156152
"""
157153
Event indicating the start of a thinking step event.
158154
"""
159-
type: Literal[EventType.THINKING_START]
155+
type: Literal[EventType.THINKING_START] = EventType.THINKING_START # pyright: ignore[reportIncompatibleVariableOverride]
160156
title: Optional[str] = None
161157

162158
class ThinkingEndEvent(BaseEvent):
163159
"""
164160
Event indicating the end of a thinking step event.
165161
"""
166-
type: Literal[EventType.THINKING_END]
162+
type: Literal[EventType.THINKING_END] = EventType.THINKING_END # pyright: ignore[reportIncompatibleVariableOverride]
167163

168164
class StateSnapshotEvent(BaseEvent):
169165
"""

0 commit comments

Comments
 (0)