a2a-adapter 0.1.2__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/PKG-INFO +96 -43
  2. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/README.md +95 -42
  3. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter/__init__.py +1 -1
  4. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter/integrations/__init__.py +5 -1
  5. a2a_adapter-0.1.4/a2a_adapter/integrations/callable.py +286 -0
  6. a2a_adapter-0.1.4/a2a_adapter/integrations/crewai.py +585 -0
  7. a2a_adapter-0.1.4/a2a_adapter/integrations/langchain.py +329 -0
  8. a2a_adapter-0.1.4/a2a_adapter/integrations/langgraph.py +756 -0
  9. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter/loader.py +71 -28
  10. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter.egg-info/PKG-INFO +96 -43
  11. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter.egg-info/SOURCES.txt +1 -0
  12. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/pyproject.toml +5 -1
  13. a2a_adapter-0.1.2/a2a_adapter/integrations/callable.py +0 -172
  14. a2a_adapter-0.1.2/a2a_adapter/integrations/crewai.py +0 -142
  15. a2a_adapter-0.1.2/a2a_adapter/integrations/langchain.py +0 -171
  16. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/LICENSE +0 -0
  17. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter/adapter.py +0 -0
  18. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter/client.py +0 -0
  19. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter/integrations/n8n.py +0 -0
  20. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter.egg-info/dependency_links.txt +0 -0
  21. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter.egg-info/requires.txt +0 -0
  22. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/a2a_adapter.egg-info/top_level.txt +0 -0
  23. {a2a_adapter-0.1.2 → a2a_adapter-0.1.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: a2a-adapter
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: A2A Protocol Adapter SDK for integrating various agent frameworks
5
5
  Author-email: HYBRO AI <info@hybro.ai>
6
6
  License: Apache-2.0
@@ -52,20 +52,24 @@ Dynamic: license-file
52
52
 
53
53
  **🚀 Open Source A2A Protocol Adapter SDK - Make Any Agent Framework A2A-Compatible in 3 Lines**
54
54
 
55
- A Python SDK that enables seamless integration of various agent frameworks (n8n, CrewAI, LangChain, etc.) with the [A2A (Agent-to-Agent) Protocol](https://github.com/a2aproject/A2A). Build interoperable AI agent systems that can communicate across different platforms and frameworks.
55
+ A Python SDK that enables seamless integration of various agent frameworks (n8n, LangGraph, CrewAI, LangChain, etc.) with the [A2A (Agent-to-Agent) Protocol](https://github.com/a2aproject/A2A). Build interoperable AI agent systems that can communicate across different platforms and frameworks.
56
56
 
57
57
  **✨ Key Benefits:**
58
58
 
59
59
  - 🔌 **3-line setup** - Expose any agent as A2A-compliant
60
- - 🌐 **Framework agnostic** - Works with n8n, CrewAI, LangChain, and more
60
+ - 🌐 **Framework agnostic** - Works with n8n, LangGraph, CrewAI, LangChain, and more
61
61
  - 🌊 **Streaming support** - Built-in streaming for real-time responses
62
62
  - 🎯 **Production ready** - Type-safe, well-tested, and actively maintained
63
63
 
64
+ **▶️ Demo: n8n → A2A Agent**
65
+
66
+ [![A2A Adapter Demo](https://img.youtube.com/vi/rHWi7tLQ444/0.jpg)](https://youtu.be/rHWi7tLQ444)
67
+
64
68
  ## Features
65
69
 
66
- ✨ **Framework Agnostic**: Integrate n8n workflows, CrewAI crews, LangChain chains, and more
70
+ ✨ **Framework Agnostic**: Integrate n8n workflows, LangGraph workflows, CrewAI crews, LangChain chains, and more
67
71
  🔌 **Simple API**: 3-line setup to expose any agent as A2A-compliant
68
- 🌊 **Streaming Support**: Built-in streaming for LangChain and custom adapters
72
+ 🌊 **Streaming Support**: Built-in streaming for LangGraph, LangChain, and custom adapters
69
73
  🎯 **Type Safe**: Leverages official A2A SDK types
70
74
  🔧 **Extensible**: Easy to add custom adapters for new frameworks
71
75
  📦 **Minimal Dependencies**: Optional dependencies per framework
@@ -81,9 +85,10 @@ A Python SDK that enables seamless integration of various agent frameworks (n8n,
81
85
  ┌─────────────────┐
82
86
  │ A2A Adapter │ (This SDK)
83
87
  │ - N8n │
88
+ │ - LangGraph │
84
89
  │ - CrewAI │
85
90
  │ - LangChain │
86
- │ - Custom
91
+ │ - Callable
87
92
  └────────┬────────┘
88
93
 
89
94
 
@@ -94,15 +99,15 @@ A Python SDK that enables seamless integration of various agent frameworks (n8n,
94
99
 
95
100
  **Single-Agent Design**: Each server hosts exactly one agent. Multi-agent orchestration is handled externally via A2A protocol or orchestration frameworks like LangGraph.
96
101
 
97
- See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed design documentation.
102
+ See [ARCHITECTURE.md](https://github.com/hybroai/a2a-adapter/blob/main/ARCHITECTURE.md) for detailed design documentation.
98
103
 
99
104
  ## Documentation
100
105
 
101
- - 🚀 Quick Start: [QUICKSTART.md](QUICKSTART.md)
102
- - 🧪 Examples: [examples/](examples/)
103
- - 🛠 Debug & Advanced Usage: [GETTING_STARTED_DEBUG.md](GETTING_STARTED_DEBUG.md)
104
- - 🧠 Architecture: [ARCHITECTURE.md](ARCHITECTURE.md)
105
- - 🤝 Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
106
+ - 🚀 Quick Start: [QUICKSTART.md](https://github.com/hybroai/a2a-adapter/blob/main/QUICKSTART.md)
107
+ - 🧪 Examples: [examples/](https://github.com/hybroai/a2a-adapter/tree/main/examples/)
108
+ - 🛠 Debug & Advanced Usage: [GETTING_STARTED_DEBUG.md](https://github.com/hybroai/a2a-adapter/blob/main/GETTING_STARTED_DEBUG.md)
109
+ - 🧠 Architecture: [ARCHITECTURE.md](https://github.com/hybroai/a2a-adapter/blob/main/ARCHITECTURE.md)
110
+ - 🤝 Contributing: [CONTRIBUTING.md](https://github.com/hybroai/a2a-adapter/blob/main/CONTRIBUTING.md)
106
111
 
107
112
  ## Installation
108
113
 
@@ -136,7 +141,7 @@ pip install a2a-adapter[dev]
136
141
 
137
142
  ## 🚀 Quick Start
138
143
 
139
- **Get started in 5 minutes!** See [QUICKSTART.md](QUICKSTART.md) for detailed guide.
144
+ **Get started in 5 minutes!** See [QUICKSTART.md](https://github.com/hybroai/a2a-adapter/blob/main/QUICKSTART.md) for detailed guide.
140
145
 
141
146
  ### Install
142
147
 
@@ -166,7 +171,7 @@ asyncio.run(main())
166
171
 
167
172
  **That's it!** Your agent is now A2A-compatible and ready to communicate with other A2A agents.
168
173
 
169
- 👉 **[Read the full Quick Start Guide →](QUICKSTART.md)**
174
+ 👉 **[Read the full Quick Start Guide →](https://github.com/hybroai/a2a-adapter/blob/main/QUICKSTART.md)**
170
175
 
171
176
  ## 📖 Usage Examples
172
177
 
@@ -198,6 +203,17 @@ adapter = await load_a2a_agent({
198
203
  })
199
204
  ```
200
205
 
206
+ ### LangGraph Workflow → A2A Agent (with Streaming)
207
+
208
+ ```python
209
+ adapter = await load_a2a_agent({
210
+ "adapter": "langgraph",
211
+ "graph": your_compiled_graph,
212
+ "input_key": "messages",
213
+ "output_key": "output"
214
+ })
215
+ ```
216
+
201
217
  ### Custom Function → A2A Agent
202
218
 
203
219
  ```python
@@ -210,7 +226,7 @@ adapter = await load_a2a_agent({
210
226
  })
211
227
  ```
212
228
 
213
- 📚 **[View all examples →](examples/)**
229
+ 📚 **[View all examples →](https://github.com/hybroai/a2a-adapter/tree/main/examples/)**
214
230
 
215
231
  ## Advanced Usage
216
232
 
@@ -271,9 +287,35 @@ class StreamingAdapter(BaseAgentAdapter):
271
287
  return True
272
288
  ```
273
289
 
274
- ### Using with LangGraph
290
+ ### LangGraph Workflow as A2A Server
275
291
 
276
- Integrate A2A agents into LangGraph workflows:
292
+ Expose a LangGraph workflow as an A2A server:
293
+
294
+ ```python
295
+ from langgraph.graph import StateGraph, END
296
+
297
+ # Build your workflow
298
+ builder = StateGraph(YourState)
299
+ builder.add_node("process", process_node)
300
+ builder.set_entry_point("process")
301
+ builder.add_edge("process", END)
302
+ graph = builder.compile()
303
+
304
+ # Expose as A2A agent
305
+ adapter = await load_a2a_agent({
306
+ "adapter": "langgraph",
307
+ "graph": graph,
308
+ "input_key": "messages",
309
+ "output_key": "output"
310
+ })
311
+ serve_agent(agent_card=card, adapter=adapter, port=9002)
312
+ ```
313
+
314
+ See [examples/07_langgraph_server.py](https://github.com/hybroai/a2a-adapter/blob/main/examples/07_langgraph_server.py) for complete example.
315
+
316
+ ### Using A2A Agents from LangGraph
317
+
318
+ Call A2A agents from within a LangGraph workflow:
277
319
 
278
320
  ```python
279
321
  from langgraph.graph import StateGraph
@@ -294,7 +336,7 @@ graph = StateGraph(...)
294
336
  graph.add_node("math", call_math_agent)
295
337
  ```
296
338
 
297
- See [examples/06_langgraph_single_agent.py](examples/06_langgraph_single_agent.py) for complete example.
339
+ See [examples/06_langgraph_single_agent.py](https://github.com/hybroai/a2a-adapter/blob/main/examples/06_langgraph_single_agent.py) for complete example.
298
340
 
299
341
  ## Configuration
300
342
 
@@ -332,6 +374,19 @@ See [examples/06_langgraph_single_agent.py](examples/06_langgraph_single_agent.p
332
374
  }
333
375
  ```
334
376
 
377
+ ### LangGraph Adapter
378
+
379
+ ```python
380
+ {
381
+ "adapter": "langgraph",
382
+ "graph": compiled_graph, # Required: CompiledGraph from StateGraph.compile()
383
+ "input_key": "messages", # Optional, default: "messages" (for chat) or "input"
384
+ "output_key": None, # Optional, extracts specific key from final state
385
+ "async_mode": False, # Optional, enables async task execution
386
+ "async_timeout": 300 # Optional, timeout for async mode (default: 300s)
387
+ }
388
+ ```
389
+
335
390
  ### Callable Adapter
336
391
 
337
392
  ```python
@@ -351,7 +406,8 @@ The `examples/` directory contains complete working examples:
351
406
  - **03_single_langchain_agent.py** - LangChain streaming agent
352
407
  - **04_single_agent_client.py** - A2A client for testing
353
408
  - **05_custom_adapter.py** - Custom adapter implementations
354
- - **06_langgraph_single_agent.py** - LangGraph + A2A integration
409
+ - **06_langgraph_single_agent.py** - Calling A2A agents from LangGraph
410
+ - **07_langgraph_server.py** - LangGraph workflow as A2A server
355
411
 
356
412
  Run any example:
357
413
 
@@ -457,11 +513,13 @@ Check if this adapter supports streaming responses.
457
513
 
458
514
  ## Framework Support
459
515
 
460
- | Framework | Adapter | Non-Streaming | Streaming | Status |
461
- | ------------- | ----------------------- | ------------- | ---------- | ---------- |
462
- | **n8n** | `N8nAgentAdapter` | ✅ | 🔜 Planned | ✅ Stable |
463
- | **CrewAI** | `CrewAIAgentAdapter` | 🔜 Planned | 🔜 Planned | 🔜 Planned |
464
- | **LangChain** | `LangChainAgentAdapter` | 🔜 Planned | 🔜 Planned | 🔜 Planned |
516
+ | Framework | Adapter | Non-Streaming | Streaming | Async Tasks | Status |
517
+ | ------------- | ------------------------ | ------------- | --------- | ----------- | --------- |
518
+ | **n8n** | `N8nAgentAdapter` | ✅ | ❌ | | ✅ Stable |
519
+ | **LangGraph** | `LangGraphAgentAdapter` | ✅ | | | Stable |
520
+ | **CrewAI** | `CrewAIAgentAdapter` | | | | Stable |
521
+ | **LangChain** | `LangChainAgentAdapter` | ✅ | ✅ | ❌ | ✅ Stable |
522
+ | **Callable** | `CallableAgentAdapter` | ✅ | ✅ | ❌ | ✅ Stable |
465
523
 
466
524
  ## 🤝 Contributing
467
525
 
@@ -483,17 +541,18 @@ We welcome contributions from the community! Whether you're fixing bugs, adding
483
541
  4. Run tests (`pytest`)
484
542
  5. Submit a pull request
485
543
 
486
- 📖 **[Read our Contributing Guide →](CONTRIBUTING.md)** for detailed instructions, coding standards, and development setup.
544
+ 📖 **[Read our Contributing Guide →](https://github.com/hybroai/a2a-adapter/blob/main/CONTRIBUTING.md)** for detailed instructions, coding standards, and development setup.
487
545
 
488
546
  ## Roadmap
489
547
 
490
548
  - [x] Core adapter abstraction
491
- - [x] N8n adapter
492
- - [ ] CrewAI adapter
493
- - [ ] LangChain adapter with streaming
494
- - [ ] Callable adapter
495
- - [ ] Comprehensive examples
496
- - [ ] Task support (async execution pattern)
549
+ - [x] N8n adapter (with async task support)
550
+ - [x] LangGraph adapter (with streaming and async tasks)
551
+ - [x] CrewAI adapter (with async task support)
552
+ - [x] LangChain adapter (with streaming)
553
+ - [x] Callable adapter (with streaming)
554
+ - [x] Comprehensive examples
555
+ - [x] Task support (async execution pattern)
497
556
  - [ ] Artifact support (file uploads/downloads)
498
557
  - [ ] AutoGen adapter
499
558
  - [ ] Semantic Kernel adapter
@@ -526,26 +585,20 @@ We welcome contributions from the community! Whether you're fixing bugs, adding
526
585
 
527
586
  ## License
528
587
 
529
- Apache-2.0 License - see [LICENSE](LICENSE) file for details.
530
-
531
- ## Credits
532
-
533
- Built with ❤️ by [HYBRO AI](https://hybro.ai)
534
-
535
- Powered by the [A2A Protocol](https://github.com/a2aproject/A2A)
588
+ Apache-2.0 License - see [LICENSE](https://github.com/hybroai/a2a-adapter/blob/main/LICENSE) file for details.
536
589
 
537
590
  ## 💬 Community & Support
538
591
 
539
- - 📚 **[Full Documentation](README.md)** - Complete API reference and guides
540
- - 🚀 **[Quick Start Guide](QUICKSTART.md)** - Get started in 5 minutes
541
- - 🏗️ **[Architecture Guide](ARCHITECTURE.md)** - Deep dive into design decisions
592
+ - 📚 **[Full Documentation](https://github.com/hybroai/a2a-adapter/blob/main/README.md)** - Complete API reference and guides
593
+ - 🚀 **[Quick Start Guide](https://github.com/hybroai/a2a-adapter/blob/main/QUICKSTART.md)** - Get started in 5 minutes
594
+ - 🏗️ **[Architecture Guide](https://github.com/hybroai/a2a-adapter/blob/main/ARCHITECTURE.md)** - Deep dive into design decisions
542
595
  - 🐛 **[Report Issues](https://github.com/hybroai/a2a-adapter/issues)** - Found a bug? Let us know!
543
596
  - 💬 **[Discussions](https://github.com/hybroai/a2a-adapter/discussions)** - Ask questions and share ideas
544
- - 🤝 **[Contributing Guide](CONTRIBUTING.md)** - Want to contribute? Start here!
597
+ - 🤝 **[Contributing Guide](https://github.com/hybroai/a2a-adapter/blob/main/CONTRIBUTING.md)** - Want to contribute? Start here!
545
598
 
546
599
  ## 📄 License
547
600
 
548
- This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
601
+ This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/hybroai/a2a-adapter/blob/main/LICENSE) file for details.
549
602
 
550
603
  ## 🙏 Acknowledgments
551
604
 
@@ -7,20 +7,24 @@
7
7
 
8
8
  **🚀 Open Source A2A Protocol Adapter SDK - Make Any Agent Framework A2A-Compatible in 3 Lines**
9
9
 
10
- A Python SDK that enables seamless integration of various agent frameworks (n8n, CrewAI, LangChain, etc.) with the [A2A (Agent-to-Agent) Protocol](https://github.com/a2aproject/A2A). Build interoperable AI agent systems that can communicate across different platforms and frameworks.
10
+ A Python SDK that enables seamless integration of various agent frameworks (n8n, LangGraph, CrewAI, LangChain, etc.) with the [A2A (Agent-to-Agent) Protocol](https://github.com/a2aproject/A2A). Build interoperable AI agent systems that can communicate across different platforms and frameworks.
11
11
 
12
12
  **✨ Key Benefits:**
13
13
 
14
14
  - 🔌 **3-line setup** - Expose any agent as A2A-compliant
15
- - 🌐 **Framework agnostic** - Works with n8n, CrewAI, LangChain, and more
15
+ - 🌐 **Framework agnostic** - Works with n8n, LangGraph, CrewAI, LangChain, and more
16
16
  - 🌊 **Streaming support** - Built-in streaming for real-time responses
17
17
  - 🎯 **Production ready** - Type-safe, well-tested, and actively maintained
18
18
 
19
+ **▶️ Demo: n8n → A2A Agent**
20
+
21
+ [![A2A Adapter Demo](https://img.youtube.com/vi/rHWi7tLQ444/0.jpg)](https://youtu.be/rHWi7tLQ444)
22
+
19
23
  ## Features
20
24
 
21
- ✨ **Framework Agnostic**: Integrate n8n workflows, CrewAI crews, LangChain chains, and more
25
+ ✨ **Framework Agnostic**: Integrate n8n workflows, LangGraph workflows, CrewAI crews, LangChain chains, and more
22
26
  🔌 **Simple API**: 3-line setup to expose any agent as A2A-compliant
23
- 🌊 **Streaming Support**: Built-in streaming for LangChain and custom adapters
27
+ 🌊 **Streaming Support**: Built-in streaming for LangGraph, LangChain, and custom adapters
24
28
  🎯 **Type Safe**: Leverages official A2A SDK types
25
29
  🔧 **Extensible**: Easy to add custom adapters for new frameworks
26
30
  📦 **Minimal Dependencies**: Optional dependencies per framework
@@ -36,9 +40,10 @@ A Python SDK that enables seamless integration of various agent frameworks (n8n,
36
40
  ┌─────────────────┐
37
41
  │ A2A Adapter │ (This SDK)
38
42
  │ - N8n │
43
+ │ - LangGraph │
39
44
  │ - CrewAI │
40
45
  │ - LangChain │
41
- │ - Custom
46
+ │ - Callable
42
47
  └────────┬────────┘
43
48
 
44
49
 
@@ -49,15 +54,15 @@ A Python SDK that enables seamless integration of various agent frameworks (n8n,
49
54
 
50
55
  **Single-Agent Design**: Each server hosts exactly one agent. Multi-agent orchestration is handled externally via A2A protocol or orchestration frameworks like LangGraph.
51
56
 
52
- See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed design documentation.
57
+ See [ARCHITECTURE.md](https://github.com/hybroai/a2a-adapter/blob/main/ARCHITECTURE.md) for detailed design documentation.
53
58
 
54
59
  ## Documentation
55
60
 
56
- - 🚀 Quick Start: [QUICKSTART.md](QUICKSTART.md)
57
- - 🧪 Examples: [examples/](examples/)
58
- - 🛠 Debug & Advanced Usage: [GETTING_STARTED_DEBUG.md](GETTING_STARTED_DEBUG.md)
59
- - 🧠 Architecture: [ARCHITECTURE.md](ARCHITECTURE.md)
60
- - 🤝 Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
61
+ - 🚀 Quick Start: [QUICKSTART.md](https://github.com/hybroai/a2a-adapter/blob/main/QUICKSTART.md)
62
+ - 🧪 Examples: [examples/](https://github.com/hybroai/a2a-adapter/tree/main/examples/)
63
+ - 🛠 Debug & Advanced Usage: [GETTING_STARTED_DEBUG.md](https://github.com/hybroai/a2a-adapter/blob/main/GETTING_STARTED_DEBUG.md)
64
+ - 🧠 Architecture: [ARCHITECTURE.md](https://github.com/hybroai/a2a-adapter/blob/main/ARCHITECTURE.md)
65
+ - 🤝 Contributing: [CONTRIBUTING.md](https://github.com/hybroai/a2a-adapter/blob/main/CONTRIBUTING.md)
61
66
 
62
67
  ## Installation
63
68
 
@@ -91,7 +96,7 @@ pip install a2a-adapter[dev]
91
96
 
92
97
  ## 🚀 Quick Start
93
98
 
94
- **Get started in 5 minutes!** See [QUICKSTART.md](QUICKSTART.md) for detailed guide.
99
+ **Get started in 5 minutes!** See [QUICKSTART.md](https://github.com/hybroai/a2a-adapter/blob/main/QUICKSTART.md) for detailed guide.
95
100
 
96
101
  ### Install
97
102
 
@@ -121,7 +126,7 @@ asyncio.run(main())
121
126
 
122
127
  **That's it!** Your agent is now A2A-compatible and ready to communicate with other A2A agents.
123
128
 
124
- 👉 **[Read the full Quick Start Guide →](QUICKSTART.md)**
129
+ 👉 **[Read the full Quick Start Guide →](https://github.com/hybroai/a2a-adapter/blob/main/QUICKSTART.md)**
125
130
 
126
131
  ## 📖 Usage Examples
127
132
 
@@ -153,6 +158,17 @@ adapter = await load_a2a_agent({
153
158
  })
154
159
  ```
155
160
 
161
+ ### LangGraph Workflow → A2A Agent (with Streaming)
162
+
163
+ ```python
164
+ adapter = await load_a2a_agent({
165
+ "adapter": "langgraph",
166
+ "graph": your_compiled_graph,
167
+ "input_key": "messages",
168
+ "output_key": "output"
169
+ })
170
+ ```
171
+
156
172
  ### Custom Function → A2A Agent
157
173
 
158
174
  ```python
@@ -165,7 +181,7 @@ adapter = await load_a2a_agent({
165
181
  })
166
182
  ```
167
183
 
168
- 📚 **[View all examples →](examples/)**
184
+ 📚 **[View all examples →](https://github.com/hybroai/a2a-adapter/tree/main/examples/)**
169
185
 
170
186
  ## Advanced Usage
171
187
 
@@ -226,9 +242,35 @@ class StreamingAdapter(BaseAgentAdapter):
226
242
  return True
227
243
  ```
228
244
 
229
- ### Using with LangGraph
245
+ ### LangGraph Workflow as A2A Server
230
246
 
231
- Integrate A2A agents into LangGraph workflows:
247
+ Expose a LangGraph workflow as an A2A server:
248
+
249
+ ```python
250
+ from langgraph.graph import StateGraph, END
251
+
252
+ # Build your workflow
253
+ builder = StateGraph(YourState)
254
+ builder.add_node("process", process_node)
255
+ builder.set_entry_point("process")
256
+ builder.add_edge("process", END)
257
+ graph = builder.compile()
258
+
259
+ # Expose as A2A agent
260
+ adapter = await load_a2a_agent({
261
+ "adapter": "langgraph",
262
+ "graph": graph,
263
+ "input_key": "messages",
264
+ "output_key": "output"
265
+ })
266
+ serve_agent(agent_card=card, adapter=adapter, port=9002)
267
+ ```
268
+
269
+ See [examples/07_langgraph_server.py](https://github.com/hybroai/a2a-adapter/blob/main/examples/07_langgraph_server.py) for complete example.
270
+
271
+ ### Using A2A Agents from LangGraph
272
+
273
+ Call A2A agents from within a LangGraph workflow:
232
274
 
233
275
  ```python
234
276
  from langgraph.graph import StateGraph
@@ -249,7 +291,7 @@ graph = StateGraph(...)
249
291
  graph.add_node("math", call_math_agent)
250
292
  ```
251
293
 
252
- See [examples/06_langgraph_single_agent.py](examples/06_langgraph_single_agent.py) for complete example.
294
+ See [examples/06_langgraph_single_agent.py](https://github.com/hybroai/a2a-adapter/blob/main/examples/06_langgraph_single_agent.py) for complete example.
253
295
 
254
296
  ## Configuration
255
297
 
@@ -287,6 +329,19 @@ See [examples/06_langgraph_single_agent.py](examples/06_langgraph_single_agent.p
287
329
  }
288
330
  ```
289
331
 
332
+ ### LangGraph Adapter
333
+
334
+ ```python
335
+ {
336
+ "adapter": "langgraph",
337
+ "graph": compiled_graph, # Required: CompiledGraph from StateGraph.compile()
338
+ "input_key": "messages", # Optional, default: "messages" (for chat) or "input"
339
+ "output_key": None, # Optional, extracts specific key from final state
340
+ "async_mode": False, # Optional, enables async task execution
341
+ "async_timeout": 300 # Optional, timeout for async mode (default: 300s)
342
+ }
343
+ ```
344
+
290
345
  ### Callable Adapter
291
346
 
292
347
  ```python
@@ -306,7 +361,8 @@ The `examples/` directory contains complete working examples:
306
361
  - **03_single_langchain_agent.py** - LangChain streaming agent
307
362
  - **04_single_agent_client.py** - A2A client for testing
308
363
  - **05_custom_adapter.py** - Custom adapter implementations
309
- - **06_langgraph_single_agent.py** - LangGraph + A2A integration
364
+ - **06_langgraph_single_agent.py** - Calling A2A agents from LangGraph
365
+ - **07_langgraph_server.py** - LangGraph workflow as A2A server
310
366
 
311
367
  Run any example:
312
368
 
@@ -412,11 +468,13 @@ Check if this adapter supports streaming responses.
412
468
 
413
469
  ## Framework Support
414
470
 
415
- | Framework | Adapter | Non-Streaming | Streaming | Status |
416
- | ------------- | ----------------------- | ------------- | ---------- | ---------- |
417
- | **n8n** | `N8nAgentAdapter` | ✅ | 🔜 Planned | ✅ Stable |
418
- | **CrewAI** | `CrewAIAgentAdapter` | 🔜 Planned | 🔜 Planned | 🔜 Planned |
419
- | **LangChain** | `LangChainAgentAdapter` | 🔜 Planned | 🔜 Planned | 🔜 Planned |
471
+ | Framework | Adapter | Non-Streaming | Streaming | Async Tasks | Status |
472
+ | ------------- | ------------------------ | ------------- | --------- | ----------- | --------- |
473
+ | **n8n** | `N8nAgentAdapter` | ✅ | ❌ | | ✅ Stable |
474
+ | **LangGraph** | `LangGraphAgentAdapter` | ✅ | | | Stable |
475
+ | **CrewAI** | `CrewAIAgentAdapter` | | | | Stable |
476
+ | **LangChain** | `LangChainAgentAdapter` | ✅ | ✅ | ❌ | ✅ Stable |
477
+ | **Callable** | `CallableAgentAdapter` | ✅ | ✅ | ❌ | ✅ Stable |
420
478
 
421
479
  ## 🤝 Contributing
422
480
 
@@ -438,17 +496,18 @@ We welcome contributions from the community! Whether you're fixing bugs, adding
438
496
  4. Run tests (`pytest`)
439
497
  5. Submit a pull request
440
498
 
441
- 📖 **[Read our Contributing Guide →](CONTRIBUTING.md)** for detailed instructions, coding standards, and development setup.
499
+ 📖 **[Read our Contributing Guide →](https://github.com/hybroai/a2a-adapter/blob/main/CONTRIBUTING.md)** for detailed instructions, coding standards, and development setup.
442
500
 
443
501
  ## Roadmap
444
502
 
445
503
  - [x] Core adapter abstraction
446
- - [x] N8n adapter
447
- - [ ] CrewAI adapter
448
- - [ ] LangChain adapter with streaming
449
- - [ ] Callable adapter
450
- - [ ] Comprehensive examples
451
- - [ ] Task support (async execution pattern)
504
+ - [x] N8n adapter (with async task support)
505
+ - [x] LangGraph adapter (with streaming and async tasks)
506
+ - [x] CrewAI adapter (with async task support)
507
+ - [x] LangChain adapter (with streaming)
508
+ - [x] Callable adapter (with streaming)
509
+ - [x] Comprehensive examples
510
+ - [x] Task support (async execution pattern)
452
511
  - [ ] Artifact support (file uploads/downloads)
453
512
  - [ ] AutoGen adapter
454
513
  - [ ] Semantic Kernel adapter
@@ -481,26 +540,20 @@ We welcome contributions from the community! Whether you're fixing bugs, adding
481
540
 
482
541
  ## License
483
542
 
484
- Apache-2.0 License - see [LICENSE](LICENSE) file for details.
485
-
486
- ## Credits
487
-
488
- Built with ❤️ by [HYBRO AI](https://hybro.ai)
489
-
490
- Powered by the [A2A Protocol](https://github.com/a2aproject/A2A)
543
+ Apache-2.0 License - see [LICENSE](https://github.com/hybroai/a2a-adapter/blob/main/LICENSE) file for details.
491
544
 
492
545
  ## 💬 Community & Support
493
546
 
494
- - 📚 **[Full Documentation](README.md)** - Complete API reference and guides
495
- - 🚀 **[Quick Start Guide](QUICKSTART.md)** - Get started in 5 minutes
496
- - 🏗️ **[Architecture Guide](ARCHITECTURE.md)** - Deep dive into design decisions
547
+ - 📚 **[Full Documentation](https://github.com/hybroai/a2a-adapter/blob/main/README.md)** - Complete API reference and guides
548
+ - 🚀 **[Quick Start Guide](https://github.com/hybroai/a2a-adapter/blob/main/QUICKSTART.md)** - Get started in 5 minutes
549
+ - 🏗️ **[Architecture Guide](https://github.com/hybroai/a2a-adapter/blob/main/ARCHITECTURE.md)** - Deep dive into design decisions
497
550
  - 🐛 **[Report Issues](https://github.com/hybroai/a2a-adapter/issues)** - Found a bug? Let us know!
498
551
  - 💬 **[Discussions](https://github.com/hybroai/a2a-adapter/discussions)** - Ask questions and share ideas
499
- - 🤝 **[Contributing Guide](CONTRIBUTING.md)** - Want to contribute? Start here!
552
+ - 🤝 **[Contributing Guide](https://github.com/hybroai/a2a-adapter/blob/main/CONTRIBUTING.md)** - Want to contribute? Start here!
500
553
 
501
554
  ## 📄 License
502
555
 
503
- This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
556
+ This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/hybroai/a2a-adapter/blob/main/LICENSE) file for details.
504
557
 
505
558
  ## 🙏 Acknowledgments
506
559
 
@@ -26,7 +26,7 @@ Example:
26
26
  >>> asyncio.run(main())
27
27
  """
28
28
 
29
- __version__ = "0.1.0"
29
+ __version__ = "0.1.4"
30
30
 
31
31
  from .adapter import BaseAgentAdapter
32
32
  from .client import build_agent_app, serve_agent
@@ -5,6 +5,7 @@ This package contains concrete adapter implementations for various agent framewo
5
5
  - n8n: HTTP webhook-based workflows
6
6
  - CrewAI: Multi-agent collaboration framework
7
7
  - LangChain: LLM application framework with LCEL support
8
+ - LangGraph: Stateful workflow orchestration framework
8
9
  - Callable: Generic Python async function adapter
9
10
  """
10
11
 
@@ -12,6 +13,7 @@ __all__ = [
12
13
  "N8nAgentAdapter",
13
14
  "CrewAIAgentAdapter",
14
15
  "LangChainAgentAdapter",
16
+ "LangGraphAgentAdapter",
15
17
  "CallableAgentAdapter",
16
18
  ]
17
19
 
@@ -26,8 +28,10 @@ def __getattr__(name: str):
26
28
  elif name == "LangChainAgentAdapter":
27
29
  from .langchain import LangChainAgentAdapter
28
30
  return LangChainAgentAdapter
31
+ elif name == "LangGraphAgentAdapter":
32
+ from .langgraph import LangGraphAgentAdapter
33
+ return LangGraphAgentAdapter
29
34
  elif name == "CallableAgentAdapter":
30
35
  from .callable import CallableAgentAdapter
31
36
  return CallableAgentAdapter
32
37
  raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
33
-