a2a-adapter 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
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.
- {a2a_adapter-0.1.0.dist-info → a2a_adapter-0.1.2.dist-info}/METADATA +121 -161
- {a2a_adapter-0.1.0.dist-info → a2a_adapter-0.1.2.dist-info}/RECORD +5 -5
- {a2a_adapter-0.1.0.dist-info → a2a_adapter-0.1.2.dist-info}/WHEEL +0 -0
- {a2a_adapter-0.1.0.dist-info → a2a_adapter-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {a2a_adapter-0.1.0.dist-info → a2a_adapter-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: a2a-adapter
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A2A Protocol Adapter SDK for integrating various agent frameworks
|
|
5
5
|
Author-email: HYBRO AI <info@hybro.ai>
|
|
6
|
-
License:
|
|
7
|
-
Project-URL: Homepage, https://github.com/
|
|
8
|
-
Project-URL: Documentation, https://github.com/
|
|
9
|
-
Project-URL: Repository, https://github.com/
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/hybroai/a2a-adapter
|
|
8
|
+
Project-URL: Documentation, https://github.com/hybroai/a2a-adapter#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/hybroai/a2a-adapter
|
|
10
10
|
Classifier: Development Status :: 3 - Alpha
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: License :: OSI Approved ::
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -45,16 +45,25 @@ Dynamic: license-file
|
|
|
45
45
|
|
|
46
46
|
# A2A Adapter
|
|
47
47
|
|
|
48
|
-
[](https://badge.fury.io/py/a2a-adapter)
|
|
49
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
50
|
+
[](https://www.python.org/downloads/)
|
|
51
|
+
[](https://github.com/psf/black)
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
**🚀 Open Source A2A Protocol Adapter SDK - Make Any Agent Framework A2A-Compatible in 3 Lines**
|
|
52
54
|
|
|
53
|
-
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/
|
|
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.
|
|
56
|
+
|
|
57
|
+
**✨ Key Benefits:**
|
|
58
|
+
|
|
59
|
+
- 🔌 **3-line setup** - Expose any agent as A2A-compliant
|
|
60
|
+
- 🌐 **Framework agnostic** - Works with n8n, CrewAI, LangChain, and more
|
|
61
|
+
- 🌊 **Streaming support** - Built-in streaming for real-time responses
|
|
62
|
+
- 🎯 **Production ready** - Type-safe, well-tested, and actively maintained
|
|
54
63
|
|
|
55
64
|
## Features
|
|
56
65
|
|
|
57
|
-
✨ **Framework Agnostic**: Integrate n8n workflows, CrewAI crews, LangChain chains,
|
|
66
|
+
✨ **Framework Agnostic**: Integrate n8n workflows, CrewAI crews, LangChain chains, and more
|
|
58
67
|
🔌 **Simple API**: 3-line setup to expose any agent as A2A-compliant
|
|
59
68
|
🌊 **Streaming Support**: Built-in streaming for LangChain and custom adapters
|
|
60
69
|
🎯 **Type Safe**: Leverages official A2A SDK types
|
|
@@ -87,6 +96,14 @@ A Python SDK that enables seamless integration of various agent frameworks (n8n,
|
|
|
87
96
|
|
|
88
97
|
See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed design documentation.
|
|
89
98
|
|
|
99
|
+
## Documentation
|
|
100
|
+
|
|
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
|
+
|
|
90
107
|
## Installation
|
|
91
108
|
|
|
92
109
|
### Basic Installation
|
|
@@ -117,39 +134,17 @@ pip install a2a-adapter[all]
|
|
|
117
134
|
pip install a2a-adapter[dev]
|
|
118
135
|
```
|
|
119
136
|
|
|
120
|
-
## Quick Start
|
|
137
|
+
## 🚀 Quick Start
|
|
121
138
|
|
|
122
|
-
|
|
139
|
+
**Get started in 5 minutes!** See [QUICKSTART.md](QUICKSTART.md) for detailed guide.
|
|
123
140
|
|
|
124
|
-
|
|
141
|
+
### Install
|
|
125
142
|
|
|
126
143
|
```bash
|
|
127
|
-
|
|
128
|
-
git clone <repository>
|
|
129
|
-
cd a2a-adapter
|
|
130
|
-
python -m venv .venv
|
|
131
|
-
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
132
|
-
pip install -e .
|
|
133
|
-
|
|
134
|
-
# Start an agent
|
|
135
|
-
./run_agent.sh n8n # N8n workflow agent
|
|
136
|
-
./run_agent.sh crewai # CrewAI agent
|
|
137
|
-
./run_agent.sh langchain # LangChain agent
|
|
138
|
-
|
|
139
|
-
# Stop with Ctrl+C
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
**Environment Variables:**
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
export N8N_WEBHOOK_URL="https://your-n8n.com/webhook/your-workflow"
|
|
144
|
+
pip install a2a-adapter
|
|
146
145
|
```
|
|
147
146
|
|
|
148
|
-
###
|
|
149
|
-
|
|
150
|
-
### 1. N8n Workflow Agent
|
|
151
|
-
|
|
152
|
-
Expose an n8n workflow as an A2A agent:
|
|
147
|
+
### Your First Agent (3 Lines!)
|
|
153
148
|
|
|
154
149
|
```python
|
|
155
150
|
import asyncio
|
|
@@ -157,124 +152,66 @@ from a2a_adapter import load_a2a_agent, serve_agent
|
|
|
157
152
|
from a2a.types import AgentCard
|
|
158
153
|
|
|
159
154
|
async def main():
|
|
160
|
-
# Load adapter
|
|
161
155
|
adapter = await load_a2a_agent({
|
|
162
156
|
"adapter": "n8n",
|
|
163
|
-
"webhook_url": "https://n8n.
|
|
164
|
-
"timeout": 30
|
|
157
|
+
"webhook_url": "https://your-n8n.com/webhook/workflow"
|
|
165
158
|
})
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
name="Math Agent",
|
|
170
|
-
description="Performs mathematical calculations via n8n"
|
|
159
|
+
serve_agent(
|
|
160
|
+
agent_card=AgentCard(name="My Agent", description="..."),
|
|
161
|
+
adapter=adapter
|
|
171
162
|
)
|
|
172
163
|
|
|
173
|
-
# Start server
|
|
174
|
-
serve_agent(agent_card=card, adapter=adapter, port=9000)
|
|
175
|
-
|
|
176
164
|
asyncio.run(main())
|
|
177
165
|
```
|
|
178
166
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
Expose a CrewAI crew as an A2A agent:
|
|
182
|
-
|
|
183
|
-
```python
|
|
184
|
-
import asyncio
|
|
185
|
-
from crewai import Crew, Agent, Task
|
|
186
|
-
from a2a_adapter import load_a2a_agent, serve_agent
|
|
187
|
-
from a2a.types import AgentCard
|
|
188
|
-
|
|
189
|
-
# Create your crew
|
|
190
|
-
crew = Crew(
|
|
191
|
-
agents=[...],
|
|
192
|
-
tasks=[...],
|
|
193
|
-
verbose=True
|
|
194
|
-
)
|
|
167
|
+
**That's it!** Your agent is now A2A-compatible and ready to communicate with other A2A agents.
|
|
195
168
|
|
|
196
|
-
|
|
197
|
-
adapter = await load_a2a_agent({
|
|
198
|
-
"adapter": "crewai",
|
|
199
|
-
"crew": crew
|
|
200
|
-
})
|
|
169
|
+
👉 **[Read the full Quick Start Guide →](QUICKSTART.md)**
|
|
201
170
|
|
|
202
|
-
|
|
203
|
-
name="Research Crew",
|
|
204
|
-
description="Multi-agent research team"
|
|
205
|
-
)
|
|
171
|
+
## 📖 Usage Examples
|
|
206
172
|
|
|
207
|
-
|
|
173
|
+
### n8n Workflow → A2A Agent
|
|
208
174
|
|
|
209
|
-
|
|
175
|
+
```python
|
|
176
|
+
adapter = await load_a2a_agent({
|
|
177
|
+
"adapter": "n8n",
|
|
178
|
+
"webhook_url": "https://n8n.example.com/webhook/math"
|
|
179
|
+
})
|
|
210
180
|
```
|
|
211
181
|
|
|
212
|
-
###
|
|
213
|
-
|
|
214
|
-
Expose a LangChain chain with streaming support:
|
|
182
|
+
### CrewAI Crew → A2A Agent
|
|
215
183
|
|
|
216
184
|
```python
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
from a2a.types import AgentCard
|
|
222
|
-
|
|
223
|
-
# Create chain
|
|
224
|
-
prompt = ChatPromptTemplate.from_messages([
|
|
225
|
-
("system", "You are a helpful assistant."),
|
|
226
|
-
("user", "{input}")
|
|
227
|
-
])
|
|
228
|
-
llm = ChatOpenAI(model="gpt-4o-mini", streaming=True)
|
|
229
|
-
chain = prompt | llm
|
|
230
|
-
|
|
231
|
-
async def main():
|
|
232
|
-
adapter = await load_a2a_agent({
|
|
233
|
-
"adapter": "langchain",
|
|
234
|
-
"runnable": chain,
|
|
235
|
-
"input_key": "input"
|
|
236
|
-
})
|
|
237
|
-
|
|
238
|
-
card = AgentCard(
|
|
239
|
-
name="Chat Agent",
|
|
240
|
-
description="Streaming chat agent powered by GPT-4"
|
|
241
|
-
)
|
|
242
|
-
|
|
243
|
-
serve_agent(agent_card=card, adapter=adapter, port=8002)
|
|
244
|
-
|
|
245
|
-
asyncio.run(main())
|
|
185
|
+
adapter = await load_a2a_agent({
|
|
186
|
+
"adapter": "crewai",
|
|
187
|
+
"crew": your_crew_instance
|
|
188
|
+
})
|
|
246
189
|
```
|
|
247
190
|
|
|
248
|
-
###
|
|
249
|
-
|
|
250
|
-
Create a custom agent with any async function:
|
|
191
|
+
### LangChain Chain → A2A Agent (with Streaming)
|
|
251
192
|
|
|
252
193
|
```python
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
message = inputs["message"]
|
|
260
|
-
return f"Echo: {message}"
|
|
261
|
-
|
|
262
|
-
async def main():
|
|
263
|
-
adapter = await load_a2a_agent({
|
|
264
|
-
"adapter": "callable",
|
|
265
|
-
"callable": my_agent_function
|
|
266
|
-
})
|
|
194
|
+
adapter = await load_a2a_agent({
|
|
195
|
+
"adapter": "langchain",
|
|
196
|
+
"runnable": your_chain,
|
|
197
|
+
"input_key": "input"
|
|
198
|
+
})
|
|
199
|
+
```
|
|
267
200
|
|
|
268
|
-
|
|
269
|
-
name="Echo Agent",
|
|
270
|
-
description="Simple echo agent"
|
|
271
|
-
)
|
|
201
|
+
### Custom Function → A2A Agent
|
|
272
202
|
|
|
273
|
-
|
|
203
|
+
```python
|
|
204
|
+
async def my_agent(inputs: dict) -> str:
|
|
205
|
+
return f"Processed: {inputs['message']}"
|
|
274
206
|
|
|
275
|
-
|
|
207
|
+
adapter = await load_a2a_agent({
|
|
208
|
+
"adapter": "callable",
|
|
209
|
+
"callable": my_agent
|
|
210
|
+
})
|
|
276
211
|
```
|
|
277
212
|
|
|
213
|
+
📚 **[View all examples →](examples/)**
|
|
214
|
+
|
|
278
215
|
## Advanced Usage
|
|
279
216
|
|
|
280
217
|
### Custom Adapter Class
|
|
@@ -520,38 +457,42 @@ Check if this adapter supports streaming responses.
|
|
|
520
457
|
|
|
521
458
|
## Framework Support
|
|
522
459
|
|
|
523
|
-
| Framework
|
|
524
|
-
|
|
|
525
|
-
| **n8n**
|
|
526
|
-
| **CrewAI**
|
|
527
|
-
| **LangChain**
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
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 |
|
|
465
|
+
|
|
466
|
+
## 🤝 Contributing
|
|
467
|
+
|
|
468
|
+
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help makes this project better.
|
|
531
469
|
|
|
532
|
-
|
|
470
|
+
**Ways to contribute:**
|
|
533
471
|
|
|
534
|
-
|
|
472
|
+
- 🐛 **Report bugs** - Help us improve by reporting issues
|
|
473
|
+
- 💡 **Suggest features** - Share your ideas for new adapters or improvements
|
|
474
|
+
- 🔧 **Add adapters** - Integrate new agent frameworks (AutoGen, Semantic Kernel, etc.)
|
|
475
|
+
- 📝 **Improve docs** - Make documentation clearer and more helpful
|
|
476
|
+
- 🧪 **Write tests** - Increase test coverage and reliability
|
|
535
477
|
|
|
536
|
-
|
|
537
|
-
2. Implement a class extending `BaseAgentAdapter`
|
|
538
|
-
3. Add to `loader.py` factory function
|
|
539
|
-
4. Update `integrations/__init__.py`
|
|
540
|
-
5. Add optional dependency to `pyproject.toml`
|
|
541
|
-
6. Create an example in `examples/`
|
|
542
|
-
7. Add tests in `tests/`
|
|
543
|
-
8. Update this README
|
|
478
|
+
**Quick start contributing:**
|
|
544
479
|
|
|
545
|
-
|
|
480
|
+
1. Fork the repository
|
|
481
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
482
|
+
3. Make your changes
|
|
483
|
+
4. Run tests (`pytest`)
|
|
484
|
+
5. Submit a pull request
|
|
485
|
+
|
|
486
|
+
📖 **[Read our Contributing Guide →](CONTRIBUTING.md)** for detailed instructions, coding standards, and development setup.
|
|
546
487
|
|
|
547
488
|
## Roadmap
|
|
548
489
|
|
|
549
490
|
- [x] Core adapter abstraction
|
|
550
491
|
- [x] N8n adapter
|
|
551
|
-
- [
|
|
552
|
-
- [
|
|
553
|
-
- [
|
|
554
|
-
- [
|
|
492
|
+
- [ ] CrewAI adapter
|
|
493
|
+
- [ ] LangChain adapter with streaming
|
|
494
|
+
- [ ] Callable adapter
|
|
495
|
+
- [ ] Comprehensive examples
|
|
555
496
|
- [ ] Task support (async execution pattern)
|
|
556
497
|
- [ ] Artifact support (file uploads/downloads)
|
|
557
498
|
- [ ] AutoGen adapter
|
|
@@ -585,20 +526,39 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed guidance.
|
|
|
585
526
|
|
|
586
527
|
## License
|
|
587
528
|
|
|
588
|
-
|
|
529
|
+
Apache-2.0 License - see [LICENSE](LICENSE) file for details.
|
|
589
530
|
|
|
590
531
|
## Credits
|
|
591
532
|
|
|
592
533
|
Built with ❤️ by [HYBRO AI](https://hybro.ai)
|
|
593
534
|
|
|
594
|
-
Powered by the [A2A Protocol](https://github.com/
|
|
535
|
+
Powered by the [A2A Protocol](https://github.com/a2aproject/A2A)
|
|
536
|
+
|
|
537
|
+
## 💬 Community & Support
|
|
538
|
+
|
|
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
|
|
542
|
+
- 🐛 **[Report Issues](https://github.com/hybroai/a2a-adapter/issues)** - Found a bug? Let us know!
|
|
543
|
+
- 💬 **[Discussions](https://github.com/hybroai/a2a-adapter/discussions)** - Ask questions and share ideas
|
|
544
|
+
- 🤝 **[Contributing Guide](CONTRIBUTING.md)** - Want to contribute? Start here!
|
|
545
|
+
|
|
546
|
+
## 📄 License
|
|
595
547
|
|
|
596
|
-
|
|
548
|
+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
|
|
597
549
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
-
|
|
550
|
+
## 🙏 Acknowledgments
|
|
551
|
+
|
|
552
|
+
- Built with ❤️ by [HYBRO AI](https://hybro.ai)
|
|
553
|
+
- Powered by the [A2A Protocol](https://github.com/a2aproject/A2A)
|
|
554
|
+
- Thanks to all [contributors](https://github.com/hybroai/a2a-adapter/graphs/contributors) who make this project better!
|
|
601
555
|
|
|
602
556
|
---
|
|
603
557
|
|
|
604
|
-
|
|
558
|
+
<div align="center">
|
|
559
|
+
|
|
560
|
+
**⭐ Star this repo if you find it useful! ⭐**
|
|
561
|
+
|
|
562
|
+
[⬆ Back to Top](#a2a-adapter)
|
|
563
|
+
|
|
564
|
+
</div>
|
|
@@ -7,8 +7,8 @@ a2a_adapter/integrations/callable.py,sha256=GsKZO5TyJVMOAS21cr7JNVKqjg7Z2CSc9Q9v
|
|
|
7
7
|
a2a_adapter/integrations/crewai.py,sha256=S4mF1mJeTAfMdif-su1E7jUjWgxAeFKlgz9WXlZEKN0,4813
|
|
8
8
|
a2a_adapter/integrations/langchain.py,sha256=raaaJA_FS3qBsURbCbBq2bcfsRMdKgpVbKEUN3rWA4s,5866
|
|
9
9
|
a2a_adapter/integrations/n8n.py,sha256=d9RqAS7y4eJZPWBaSOHBnT-wqFvTuJtmbE4rsvu5V2o,30171
|
|
10
|
-
a2a_adapter-0.1.
|
|
11
|
-
a2a_adapter-0.1.
|
|
12
|
-
a2a_adapter-0.1.
|
|
13
|
-
a2a_adapter-0.1.
|
|
14
|
-
a2a_adapter-0.1.
|
|
10
|
+
a2a_adapter-0.1.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
11
|
+
a2a_adapter-0.1.2.dist-info/METADATA,sha256=K_g0olwZxjTpVQeSOuabouysGIDSIOeJMvsTRogVtYM,16666
|
|
12
|
+
a2a_adapter-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
a2a_adapter-0.1.2.dist-info/top_level.txt,sha256=b1O1dTJ2AoPEB2x-r5IHEsS2x1fczOzTrpR2DgF3LgE,12
|
|
14
|
+
a2a_adapter-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|