Skip to content

Commit 5e54f15

Browse files
Merge branch 'adk-middleware' into issue-35
2 parents 5243567 + e04c063 commit 5e54f15

File tree

295 files changed

+27156
-28505
lines changed

Some content is hidden

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

295 files changed

+27156
-28505
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/dojo-e2e.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: e2e
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
e2e:
11+
name: E2E Tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '22'
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 10.13.1
27+
28+
- name: Install Poetry
29+
uses: snok/install-poetry@v1
30+
with:
31+
version: latest
32+
virtualenvs-create: true
33+
virtualenvs-in-project: true
34+
35+
- name: Install uv
36+
uses: astral-sh/setup-uv@v6
37+
38+
- name: Setup pnpm cache
39+
uses: actions/cache@v4
40+
with:
41+
path: ~/.local/share/pnpm/store
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
46+
- name: Install dependencies
47+
working-directory: typescript-sdk
48+
run: pnpm install --frozen-lockfile
49+
50+
- name: Prepare dojo for e2e
51+
working-directory: typescript-sdk/apps/dojo
52+
run: node ./scripts/prep-dojo-everything.js -e2e
53+
54+
- name: Install e2e dependencies
55+
working-directory: typescript-sdk/apps/dojo/e2e2
56+
run: |
57+
pnpm install --frozen-lockfile
58+
pnpm dlx playwright install --with-deps
59+
60+
- name: write langgraph env files
61+
working-directory: typescript-sdk/integrations/langgraph
62+
env:
63+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
64+
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
65+
run: |
66+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > examples/python/.env
67+
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> examples/python/.env
68+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > examples/typescript/.env
69+
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> examples/typescript/.env
70+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > python/ag_ui_langgraph/.env
71+
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> python/ag_ui_langgraph/.env
72+
73+
- name: Run dojo+agents and tests
74+
working-directory: typescript-sdk/apps/dojo/e2e2
75+
env:
76+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
77+
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
78+
run: |
79+
node ../scripts/run-dojo-everything.js &
80+
npx wait-port 9999
81+
sleep 10
82+
pnpm exec playwright test --reporter=dot
83+
84+
- name: Upload traces
85+
if: always() # Uploads artifacts even if tests fail
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: playwright-traces
89+
path: typescript-sdk/apps/dojo/e2e2/test-results/
90+
retention-days: 7

.github/workflows/test.yml

Lines changed: 20 additions & 16 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:
72-
version: 9.0.0
73-
72+
version: 10.13.1
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: 41 additions & 31 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: August 6th - AG-UI + Mastra: Build a Project Management Canvas](https://lu.ma/94688z7e)
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,12 +25,11 @@ 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:
26-
```ts
32+
```bash
2733
npx create-ag-ui-app my-agent-app
2834
```
2935
<h3>Building AG-UI Integrations (new frameworks):</h3>
@@ -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

0 commit comments

Comments
 (0)