Skip to content

Commit 2300892

Browse files
committed
Merge branch 'main' into java-new-main
2 parents 905a60a + 1388122 commit 2300892

File tree

424 files changed

+61973
-2318
lines changed

Some content is hidden

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

424 files changed

+61973
-2318
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22
.vscode/
33
.idea/
44

5+
mastra.db*
6+
57
.DS_Store
8+
**/.DS_Store
9+
10+
test-results/

README.md

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -79,38 +79,52 @@ AG-UI is complementary to the other 2 top agentic protocols
7979

8080
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.
8181

82-
| Framework | Status | AG-UI Resources | Integrations |
83-
| ------------------------------------------------------------------ | ------------------------ | ---------------------------------------------------------------------------- | ------------------------ |
84-
| No-framework | ✅ Supported | ➡️ Docs coming soon | |
85-
| [LangGraph](https://www.langchain.com/langgraph) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/langgraph/) 🎮 [Demos](https://dojo.ag-ui.com/langgraph-fastapi/feature/shared_state) | Partnership |
86-
| [Mastra](https://mastra.ai/) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/mastra/) 🎮 [Demos](https://dojo.ag-ui.com/mastra) | 1st party |
87-
| [Pydantic AI](https://github.com/pydantic/pydantic-ai) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/pydantic-ai/) 🎮 [Demos](https://dojo.ag-ui.com/pydantic-ai/feature/shared_state) | 1st party |
88-
| [Google ADK](https://google.github.io/adk-docs/get-started/) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/adk) 🎮 [Demos](https://dojo.ag-ui.com/adk-middleware) | Partnership |
89-
| [Agno](https://github.com/agno-agi/agno) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/agno/) 🎮 [Demos](https://dojo.ag-ui.com/agno) | 1st party |
90-
| [LlamaIndex](https://github.com/run-llama/llama_index) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/llamaindex/) 🎮 [Demos](https://dojo.ag-ui.com/llamaindex/feature/shared_state) | 1st party |
91-
| [CrewAI](https://crewai.com/) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/crewai-flows) 🎮 [Demos](https://dojo.ag-ui.com/crewai/feature/shared_state) | Partnership |
92-
| [AG2](https://ag2.ai/) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/ag2/) | 1st party |
93-
| [AWS Bedrock Agents](https://aws.amazon.com/bedrock/agents/) | 🛠️ In Progress || 1st party |
94-
| [AWS Strands Agents](https://github.com/strands-agents/sdk-python) | 🛠️ In Progress || 1st Party |
95-
| [Vercel AI SDK](https://github.com/vercel/ai) | 🛠️ In Progress || Community |
96-
| [OpenAI Agent SDK](https://openai.github.io/openai-agents-python/) | 🛠️ In Progress || Community |
97-
| [Cloudflare Agents](https://developers.cloudflare.com/agents/) | 💡 Open to Contributions || Community |
98-
99-
[View all supported frameworks →](https://ag-ui.com/frameworks)
100-
101-
102-
| Language SDK | Status | AG-UI Resources |
103-
| ------------------------------------------------------------------ | ------------------------ | ---------------------------------------------------------------------------- |
104-
| [Kotlin]() | ✅ Supported | ➡️ [GitHub Source](https://github.com/Contextable/ag-ui-4k) |
105-
| [.NET]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/38) |
106-
| [Nim]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/29) |
107-
| [Golang]() | 🛠️ In Progress | ➡️ [Issue](https://github.com/ag-ui-protocol/ag-ui/issues/156) |
108-
| [Rust]() | 🛠️ In Progress | ➡️ [Issue](https://github.com/ag-ui-protocol/ag-ui/issues/239) |
109-
| [Java]() | 🛠️ In Progress | ➡️ [GitHub Source](https://github.com/work-m8/ag-ui-4j) |
110-
111-
112-
[View all supported frameworks →](https://ag-ui.com/frameworks)
82+
### Frameworks
83+
84+
| Framework | Status | AG-UI Resources | Integrations |
85+
| ------------------------------------------------------------------ | ------------------------ | -------------------------------------------------------------------------------- | ------------------------ |
86+
| No-framework | ✅ Supported | ➡️ Docs coming soon ||
87+
| [LangGraph](https://www.langchain.com/langgraph) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/langgraph/) 🎮 [Demos](https://dojo.ag-ui.com/langgraph-fastapi/feature/shared_state) | Partnership |
88+
| [Mastra](https://mastra.ai/) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/mastra/) 🎮 [Demos](https://dojo.ag-ui.com/mastra) | 1st party |
89+
| [Pydantic AI](https://github.com/pydantic/pydantic-ai) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/pydantic-ai/) 🎮 [Demos](https://dojo.ag-ui.com/pydantic-ai/feature/shared_state) | 1st party |
90+
| [Google ADK](https://google.github.io/adk-docs/get-started/) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/adk) 🎮 [Demos](https://dojo.ag-ui.com/adk-middleware) | Partnership |
91+
| [Agno](https://github.com/agno-agi/agno) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/agno/) 🎮 [Demos](https://dojo.ag-ui.com/agno) | 1st party |
92+
| [LlamaIndex](https://github.com/run-llama/llama_index) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/llamaindex/) 🎮 [Demos](https://dojo.ag-ui.com/llamaindex/feature/shared_state) | 1st party |
93+
| [CrewAI](https://crewai.com/) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/crewai-flows) 🎮 [Demos](https://dojo.ag-ui.com/crewai/feature/shared_state) | Partnership |
94+
| [AG2](https://ag2.ai/) | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/ag2/) | 1st party |
95+
| [AWS Bedrock Agents](https://aws.amazon.com/bedrock/agents/) | 🛠️ In Progress || 1st party |
96+
| [AWS Strands Agents](https://github.com/strands-agents/sdk-python) | 🛠️ In Progress || 1st party |
97+
| [Vercel AI SDK](https://github.com/vercel/ai) | 🛠️ In Progress || Community |
98+
| [OpenAI Agent SDK](https://openai.github.io/openai-agents-python/) | 🛠️ In Progress || Community |
99+
| [Cloudflare Agents](https://developers.cloudflare.com/agents/) | 🛠️ In Progress || Community |
100+
| [Microsoft Agent Framework](https://azure.microsoft.com/en-us/blog/introducing-microsoft-agent-framework/) | 🛠️ In Progress || 1st party |
113101

102+
---
103+
104+
### Protocols
105+
106+
| Protocols | Status | AG-UI Resources | Integrations |
107+
| ---------- | ------- | ---------------- | ------------- |
108+
| [A2A]() | ✅ Supported | ➡️ [Docs](https://docs.copilotkit.ai/a2a-protocol) | Partnership |
109+
110+
---
111+
112+
### SDKs
113+
114+
| SDK | Status | AG-UI Resources | Integrations |
115+
| --- | ------- | ---------------- | ------------- |
116+
| [Kotlin]() | ✅ Supported | ➡️ [GitHub Source](https://github.com/ag-ui-protocol/ag-ui/tree/main/sdks/community/kotlin) | Community |
117+
| [Golang]() | ✅ Supported | ➡️ [GitHub Source](https://github.com/ag-ui-protocol/ag-ui/tree/main/sdks/community/go) | Community |
118+
| [.NET]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/38) | Community |
119+
| [Nim]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/29) | Community |
120+
| [Rust]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/243) | Community |
121+
| [Java]() | 🛠️ In Progress | ➡️ [GitHub Source](https://github.com/ag-ui-protocol/ag-ui/issues/20) | Community |
122+
| [Dart]() | 🛠️ In Progress | ➡️ [PR](https://github.com/ag-ui-protocol/ag-ui/pull/432) | Community |
123+
| [Flowise]() | 🛠️ In Progress | ➡️ [GitHub Source](https://github.com/ag-ui-protocol/ag-ui/issues/367) | Community |
124+
| [Langflow]() | 🛠️ In Progress | ➡️ [GitHub Source](https://github.com/ag-ui-protocol/ag-ui/issues/366) | Community |
125+
126+
127+
[View all supported frameworks →](https://docs.ag-ui.com/introduction#supported-frameworks)
114128

115129
## Examples
116130
### Hello World App

docs/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ AG-UI's mandate is to support the full set of building blocks required by modern
227227
</div>
228228

229229
<Callout type="info" icon="lightbulb">
230-
You can see demo apps of the AG-UI features with the framework of your choice, with preview, code and walkthrough docs in the [AG-UI Dojo](dojo.ag-ui.com)
230+
You can see demo apps of the AG-UI features with the framework of your choice, with preview, code and walkthrough docs in the [AG-UI Dojo](https://dojo.ag-ui.com/)
231231
</Callout>
232232

233233
---

docs/sdk/go/client/overview.mdx

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
title: "Overview"
3+
description: "Client package overview for Go SDK"
4+
---
5+
6+
# Client Package
7+
8+
The AG-UI Go SDK client package provides Server-Sent Events (SSE) connectivity for real-time event streaming from AG-UI agents. This package enables Go applications to connect to agent endpoints and receive streaming responses.
9+
10+
## Package Import
11+
12+
```go
13+
import "github.com/ag-ui-protocol/ag-ui/sdks/community/go/pkg/client/sse"
14+
```
15+
16+
## SSE Client Introduction
17+
18+
The SSE (Server-Sent Events) client provides a robust connection mechanism for streaming events from AG-UI agents. SSE is a standard protocol for server-to-client streaming over HTTP, making it ideal for real-time agent interactions where the agent needs to send continuous updates about its processing state, thoughts, and outputs.
19+
20+
Key features:
21+
- Real-time event streaming from agents
22+
- Automatic connection management
23+
- Context-based cancellation support
24+
- Configurable timeouts and buffer sizes
25+
- Built-in authentication support
26+
27+
## Configuration
28+
29+
The client is highly configurable to adapt to different deployment scenarios:
30+
31+
```go
32+
client := sse.NewClient(sse.Config{
33+
Endpoint: "https://api.example.com/agent",
34+
APIKey: "your-api-key",
35+
ConnectTimeout: 30 * time.Second,
36+
ReadTimeout: 5 * time.Minute,
37+
BufferSize: 100,
38+
})
39+
40+
// Start streaming with context and payload
41+
frames, errors, err := client.Stream(sse.StreamOptions{
42+
Context: context.Background(),
43+
Payload: map[string]interface{}{
44+
"threadId": "thread_123",
45+
"messages": []interface{}{
46+
map[string]string{
47+
"role": "user",
48+
"content": "Hello, agent!",
49+
},
50+
},
51+
},
52+
})
53+
```
54+
55+
## Quick Example
56+
57+
Here's a complete example showing how to connect to an agent and process events:
58+
59+
```go
60+
package main
61+
62+
import (
63+
"context"
64+
"fmt"
65+
"log"
66+
67+
"github.com/ag-ui-protocol/ag-ui/sdks/community/go/pkg/client/sse"
68+
"github.com/ag-ui-protocol/ag-ui/sdks/community/go/pkg/core/events"
69+
)
70+
71+
func main() {
72+
// Create SSE client
73+
client := sse.NewClient(sse.Config{
74+
Endpoint: "https://api.example.com/agent",
75+
APIKey: "your-api-key",
76+
})
77+
78+
// Start streaming
79+
ctx := context.Background()
80+
frames, errors, err := client.Stream(sse.StreamOptions{
81+
Context: ctx,
82+
Payload: map[string]interface{}{
83+
"threadId": "thread_123",
84+
"messages": []interface{}{
85+
map[string]string{
86+
"role": "user",
87+
"content": "What is the weather today?",
88+
},
89+
},
90+
},
91+
})
92+
93+
if err != nil {
94+
log.Fatal("Failed to start stream:", err)
95+
}
96+
97+
// Process events
98+
decoder := events.NewEventDecoder()
99+
for {
100+
select {
101+
case frame := <-frames:
102+
event, err := decoder.Decode(frame.Data)
103+
if err != nil {
104+
log.Printf("Decode error: %v", err)
105+
continue
106+
}
107+
108+
// Handle different event types
109+
switch e := event.(type) {
110+
case *events.TextMessageContentEvent:
111+
fmt.Print(e.Delta)
112+
case *events.RunFinishedEvent:
113+
fmt.Println("\nAgent finished processing")
114+
return
115+
}
116+
117+
case err := <-errors:
118+
log.Printf("Stream error: %v", err)
119+
return
120+
}
121+
}
122+
}
123+
```
124+
125+
## Navigation
126+
127+
<Card
128+
title="SSE Client Reference"
129+
icon="cube"
130+
href="/sdk/go/client/sse-client"
131+
color="#3B82F6"
132+
iconType="solid"
133+
>
134+
Detailed documentation for the Server-Sent Events client including configuration, streaming, and error handling
135+
</Card>

0 commit comments

Comments
 (0)