Skip to content

Commit 69c9efa

Browse files
authored
Add README files to all packages (#180)
1 parent fcefd16 commit 69c9efa

File tree

24 files changed

+664
-27
lines changed

24 files changed

+664
-27
lines changed

python-sdk/README.md

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
1-
# Agent User Interaction Protocol Documentation
1+
# ag-ui-protocol
22

3-
The Python SDK for the [Agent User Interaction Protocol](https://ag-ui.com).
3+
Python SDK for the **Agent-User Interaction (AG-UI) Protocol**.
44

5-
For more information visit the [official documentation](https://docs.ag-ui.com/).
5+
`ag-ui-protocol` provides Python developers with strongly-typed data structures and event encoding for building AG-UI compatible agent servers. Built on Pydantic for robust validation and automatic camelCase serialization for seamless frontend integration.
6+
7+
## Installation
8+
9+
```bash
10+
pip install ag-ui-protocol
11+
poetry add ag-ui-protocol
12+
pipenv install ag-ui-protocol
13+
```
14+
15+
## Features
16+
17+
- 🐍 **Python-native** – Idiomatic Python APIs with full type hints and validation
18+
- 📋 **Pydantic models** – Runtime validation and automatic JSON serialization
19+
- 🔄 **Streaming events** – 16 core event types for real-time agent communication
20+
-**High performance** – Efficient event encoding for Server-Sent Events
21+
22+
## Quick example
23+
24+
```python
25+
from ag_ui.core import TextMessageContentEvent, EventType
26+
from ag_ui.encoder import EventEncoder
27+
28+
# Create a streaming text event
29+
event = TextMessageContentEvent(
30+
type=EventType.TEXT_MESSAGE_CONTENT,
31+
message_id="msg_123",
32+
delta="Hello from Python!"
33+
)
34+
35+
# Encode for HTTP streaming
36+
encoder = EventEncoder()
37+
sse_data = encoder.encode(event)
38+
# Output: data: {"type":"TEXT_MESSAGE_CONTENT","messageId":"msg_123","delta":"Hello from Python!"}\n\n
39+
```
40+
41+
## Packages
42+
43+
- **`ag_ui.core`** – Types, events, and data models for AG-UI protocol
44+
- **`ag_ui.encoder`** – Event encoding utilities for HTTP streaming
45+
46+
## Documentation
47+
48+
- Concepts & architecture: [`docs/concepts`](https://docs.ag-ui.com/concepts/architecture)
49+
- Full API reference: [`docs/sdk/python`](https://docs.ag-ui.com/sdk/python/core/overview)
50+
51+
## Contributing
52+
53+
Bug reports and pull requests are welcome! Please read our [contributing guide](https://docs.ag-ui.com/development/contributing) first.
54+
55+
## License
56+
57+
MIT © 2025 AG-UI Protocol Contributors
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# @ag-ui/agno
2+
3+
AG-UI integration for **Agno** - Multi-Agent Systems framework with memory, knowledge and reasoning.
4+
5+
Connects Agno agents to frontend applications via the AG-UI protocol using HTTP communication.
6+
7+
## Installation
8+
9+
```bash
10+
npm install @ag-ui/agno
11+
pnpm add @ag-ui/agno
12+
yarn add @ag-ui/agno
13+
```
14+
15+
## Usage
16+
17+
```ts
18+
import { AgnoAgent } from "@ag-ui/agno";
19+
20+
// Create an AG-UI compatible agent
21+
const agent = new AgnoAgent({
22+
url: "https://your-agno-server.com/agent",
23+
headers: { Authorization: "Bearer your-token" },
24+
});
25+
26+
// Run with streaming
27+
const result = await agent.runAgent({
28+
messages: [{ role: "user", content: "Hello from Agno!" }],
29+
});
30+
```
31+
32+
## Features
33+
34+
- **HTTP connectivity** – Direct connection to Agno agent servers
35+
- **Multi-agent support** – Works with Agno's multi-agent system architecture
36+
- **Streaming responses** – Real-time communication with full AG-UI event support

typescript-sdk/integrations/agno/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"types": "./dist/index.d.ts",
88
"sideEffects": false,
99
"files": [
10-
"dist/**"
10+
"dist/**",
11+
"README.md"
1112
],
1213
"private": false,
1314
"publishConfig": {
Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,44 @@
1-
# Server Starter
1+
# @ag-ui/crewai
22

3-
This starter kit demonstrates sending the minimal set of events that are needed to stream data from the agent to the frontend.
3+
AG-UI integration for **CrewAI** - Sequential multi-agent workflows and collaborative agent teams.
44

5-
## Running the server
5+
Connects CrewAI Flows and Crews to frontend applications via the AG-UI protocol. Supports both TypeScript HTTP clients and Python FastAPI server integration with streaming crew execution.
66

7-
To run the server:
7+
## Installation
88

99
```bash
10-
cd typescript-sdk/integrations/server-starter/server/python
10+
npm install @ag-ui/crewai
11+
pnpm add @ag-ui/crewai
12+
yarn add @ag-ui/crewai
13+
```
14+
15+
## Usage
16+
17+
```ts
18+
import { CrewAIAgent } from "@ag-ui/crewai";
19+
20+
// Create an AG-UI compatible agent
21+
const agent = new CrewAIAgent({
22+
url: "http://localhost:8000/crew-endpoint",
23+
headers: { "Content-Type": "application/json" },
24+
});
25+
26+
// Run with streaming
27+
const result = await agent.runAgent({
28+
messages: [{ role: "user", content: "Execute the research crew" }],
29+
});
30+
```
31+
32+
## Features
33+
34+
- **HTTP connectivity** – Connect to CrewAI FastAPI servers
35+
- **Flow & Crew support** – Works with both CrewAI Flows and traditional Crews
36+
- **Step tracking** – Real-time crew execution progress
37+
- **Python integration** – Full FastAPI server implementation included
1138

39+
## To run the example server in the dojo
40+
41+
```bash
42+
cd typescript-sdk/integrations/crewai/python
1243
poetry install && poetry run dev
1344
```

typescript-sdk/integrations/crewai/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"types": "./dist/index.d.ts",
88
"sideEffects": false,
99
"files": [
10-
"dist/**"
10+
"dist/**",
11+
"README.md"
1112
],
1213
"private": false,
1314
"publishConfig": {
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# ag-ui-crewai
2+
3+
AG-UI integration for **CrewAI** - Build powerful agent workflows and multi-agent crews with LLMs.
4+
5+
Provides a complete Python integration for CrewAI flows and crews with the AG-UI protocol, including FastAPI endpoint creation and comprehensive event streaming.
6+
7+
## Installation
8+
9+
```bash
10+
pip install ag-ui-crewai
11+
```
12+
13+
## Usage
14+
15+
```python
16+
from crewai.flow.flow import Flow, start
17+
from litellm import completion
18+
from ag_ui_crewai import (
19+
add_crewai_flow_fastapi_endpoint,
20+
copilotkit_stream,
21+
CopilotKitState
22+
)
23+
from fastapi import FastAPI
24+
25+
class MyFlow(Flow[CopilotKitState]):
26+
@start()
27+
async def chat(self):
28+
response = await copilotkit_stream(
29+
completion(
30+
model="openai/gpt-4o",
31+
messages=[
32+
{"role": "system", "content": "You are a helpful assistant."},
33+
*self.state.messages
34+
],
35+
tools=self.state.copilotkit.actions,
36+
stream=True
37+
)
38+
)
39+
self.state.messages.append(response.choices[0].message)
40+
41+
# Add to FastAPI
42+
app = FastAPI()
43+
add_crewai_flow_fastapi_endpoint(app, MyFlow(), "/flow")
44+
```
45+
46+
## Features
47+
48+
- **Native CrewAI integration** – Direct support for CrewAI flows, crews, and multi-agent systems
49+
- **FastAPI endpoint creation** – Automatic HTTP endpoint generation with proper event streaming
50+
- **Predictive state updates** – Real-time state synchronization between backend and frontend
51+
- **Streaming tool calls** – Live streaming of LLM responses and tool execution to the UI
52+
53+
## To run the dojo examples
54+
55+
```bash
56+
cd python/ag_ui_crewai
57+
poetry install
58+
poetry run dev
59+
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "ag-ui-crewai"
33
version = "0.1.3"
4-
description = ""
4+
description = "AG-UI integration for CrewAI - Build powerful agent workflows and multi-agent crews with LLMs"
55
authors = ["Markus Ecker <[email protected]>"]
66
readme = "README.md"
77
exclude = [
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# @ag-ui/langgraph
2+
3+
AG-UI integration for **LangGraph** - Build agent-native applications with shared state and human-in-the-loop workflows.
4+
5+
Connects LangGraph graphs to frontend applications via the AG-UI protocol. Supports both local TypeScript graphs and remote LangGraph Cloud deployments with full state management and interrupt handling.
6+
7+
## Installation
8+
9+
```bash
10+
npm install @ag-ui/langgraph
11+
pnpm add @ag-ui/langgraph
12+
yarn add @ag-ui/langgraph
13+
```
14+
15+
## Usage
16+
17+
```ts
18+
import { LangGraphAgent } from "@ag-ui/langgraph";
19+
20+
// Create an AG-UI compatible agent
21+
const agent = new LangGraphAgent({
22+
graphId: "my-graph",
23+
deploymentUrl: "https://your-langgraph-deployment.com",
24+
langsmithApiKey: "your-api-key",
25+
});
26+
27+
// Run with streaming
28+
const result = await agent.runAgent({
29+
messages: [{ role: "user", content: "Start the workflow" }],
30+
});
31+
```
32+
33+
## Features
34+
35+
- **Cloud & local support** – Works with LangGraph Cloud and local graph instances
36+
- **State management** – Bidirectional state synchronization with graph nodes
37+
- **Interrupt handling** – Human-in-the-loop workflow support
38+
- **Step tracking** – Real-time node execution progress
39+
40+
## To run the example server in the dojo
41+
42+
```bash
43+
cd typescript-sdk/integrations/langgraph/examples
44+
langgraph dev
45+
```

typescript-sdk/integrations/langgraph/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"access": "public"
1111
},
1212
"files": [
13-
"dist/**"
13+
"dist/**",
14+
"README.md"
1415
],
1516
"scripts": {
1617
"build": "tsup",
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# ag-ui-langgraph
2+
3+
AG-UI integration for **LangGraph** - Build stateful, multi-actor applications with LLMs using graphs.
4+
5+
Provides a complete Python integration for LangGraph agents with the AG-UI protocol, including FastAPI endpoint creation and comprehensive event streaming.
6+
7+
## Installation
8+
9+
```bash
10+
pip install ag-ui-langgraph
11+
```
12+
13+
## Usage
14+
15+
```python
16+
from langgraph.graph import StateGraph, MessagesState
17+
from langchain_openai import ChatOpenAI
18+
from ag_ui_langgraph import LangGraphAgent, add_langgraph_fastapi_endpoint
19+
from fastapi import FastAPI
20+
from my_langgraph_workflow import graph
21+
22+
# Add to FastAPI
23+
app = FastAPI()
24+
add_langgraph_fastapi_endpoint(app, graph, "/agent")
25+
```
26+
27+
## Features
28+
29+
- **Native LangGraph integration** – Direct support for LangGraph workflows and state management
30+
- **FastAPI endpoint creation** – Automatic HTTP endpoint generation with proper event streaming
31+
- **Advanced event handling** – Comprehensive support for all AG-UI events including thinking, tool calls, and state updates
32+
- **Message translation** – Seamless conversion between AG-UI and LangChain message formats
33+
34+
## To run the dojo examples
35+
36+
```bash
37+
cd python/ag_ui_langgraph/examples
38+
poetry install
39+
poetry run dev
40+
```

0 commit comments

Comments
 (0)