a2a-adapter 0.1.0__py3-none-any.whl → 0.1.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: a2a-adapter
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A2A Protocol Adapter SDK for integrating various agent frameworks
5
5
  Author-email: HYBRO AI <info@hybro.ai>
6
6
  License: MIT
@@ -45,16 +45,25 @@ Dynamic: license-file
45
45
 
46
46
  # A2A Adapter
47
47
 
48
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
49
- [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
48
+ [![PyPI version](https://badge.fury.io/py/a2a-adapter.svg)](https://badge.fury.io/py/a2a-adapter)
49
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
50
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
51
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
50
52
 
51
- **Open Source A2A Protocol Adapter SDK for Different Agent Frameworks**
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/a2a-protocol/a2a-protocol). 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, 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, or custom agents
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
- ### 🚀 Easy Start with Examples
139
+ **Get started in 5 minutes!** See [QUICKSTART.md](QUICKSTART.md) for detailed guide.
123
140
 
124
- For the fastest way to get started, use the included examples:
141
+ ### Install
125
142
 
126
143
  ```bash
127
- # Clone and setup
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
- ### 📝 Manual Setup
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.example.com/webhook/math",
164
- "timeout": 30
157
+ "webhook_url": "https://your-n8n.com/webhook/workflow"
165
158
  })
166
-
167
- # Define agent card
168
- card = AgentCard(
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
- ### 2. CrewAI Agent
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
- async def main():
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
- card = AgentCard(
203
- name="Research Crew",
204
- description="Multi-agent research team"
205
- )
171
+ ## 📖 Usage Examples
206
172
 
207
- serve_agent(agent_card=card, adapter=adapter, port=8001)
173
+ ### n8n Workflow → A2A Agent
208
174
 
209
- asyncio.run(main())
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
- ### 3. LangChain Agent (with Streaming)
213
-
214
- Expose a LangChain chain with streaming support:
182
+ ### CrewAI Crew A2A Agent
215
183
 
216
184
  ```python
217
- import asyncio
218
- from langchain_openai import ChatOpenAI
219
- from langchain_core.prompts import ChatPromptTemplate
220
- from a2a_adapter import load_a2a_agent, serve_agent
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
- ### 4. Custom Adapter
249
-
250
- Create a custom agent with any async function:
191
+ ### LangChain Chain → A2A Agent (with Streaming)
251
192
 
252
193
  ```python
253
- import asyncio
254
- from a2a_adapter import load_a2a_agent, serve_agent
255
- from a2a.types import AgentCard
256
-
257
- async def my_agent_function(inputs: dict) -> str:
258
- """Your custom agent logic."""
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
- card = AgentCard(
269
- name="Echo Agent",
270
- description="Simple echo agent"
271
- )
201
+ ### Custom Function → A2A Agent
272
202
 
273
- serve_agent(agent_card=card, adapter=adapter, port=8003)
203
+ ```python
204
+ async def my_agent(inputs: dict) -> str:
205
+ return f"Processed: {inputs['message']}"
274
206
 
275
- asyncio.run(main())
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 | Adapter | Streaming | Status |
524
- | ------------------- | ----------------------- | ----------- | ---------- |
525
- | **n8n** | `N8nAgentAdapter` | | ✅ Stable |
526
- | **CrewAI** | `CrewAIAgentAdapter` | | Stable |
527
- | **LangChain** | `LangChainAgentAdapter` | | Stable |
528
- | **Custom Function** | `CallableAgentAdapter` | ✅ Optional | ✅ Stable |
529
- | **AutoGen** | - | - | 🔜 Planned |
530
- | **Semantic Kernel** | - | - | 🔜 Planned |
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
- ## Contributing
470
+ **Ways to contribute:**
533
471
 
534
- We welcome contributions! To add support for a new framework:
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
- 1. Create `a2a_adapter/integrations/{framework}.py`
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
- See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed guidance.
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
- - [x] CrewAI adapter
552
- - [x] LangChain adapter with streaming
553
- - [x] Callable adapter
554
- - [x] Comprehensive examples
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,7 +526,7 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed guidance.
585
526
 
586
527
  ## License
587
528
 
588
- MIT License - see [LICENSE](LICENSE) file for details.
529
+ Apache-2.0 License - see [LICENSE](LICENSE) file for details.
589
530
 
590
531
  ## Credits
591
532
 
@@ -593,12 +534,31 @@ Built with ❤️ by [HYBRO AI](https://hybro.ai)
593
534
 
594
535
  Powered by the [A2A Protocol](https://github.com/a2a-protocol/a2a-protocol)
595
536
 
596
- ## Support
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/hybro-ai/a2a-adapter/issues)** - Found a bug? Let us know!
543
+ - 💬 **[Discussions](https://github.com/hybro-ai/a2a-adapter/discussions)** - Ask questions and share ideas
544
+ - 🤝 **[Contributing Guide](CONTRIBUTING.md)** - Want to contribute? Start here!
545
+
546
+ ## 📄 License
547
+
548
+ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
597
549
 
598
- - 📚 [Documentation](https://github.com/hybro-ai/a2a-adapter)
599
- - 🐛 [Issue Tracker](https://github.com/hybro-ai/a2a-adapter/issues)
600
- - 💬 [Discussions](https://github.com/hybro-ai/a2a-adapter/discussions)
550
+ ## 🙏 Acknowledgments
551
+
552
+ - Built with ❤️ by [HYBRO AI](https://hybro.ai)
553
+ - Powered by the [A2A Protocol](https://github.com/a2a-protocol/a2a-protocol)
554
+ - Thanks to all [contributors](https://github.com/hybro-ai/a2a-adapter/graphs/contributors) who make this project better!
601
555
 
602
556
  ---
603
557
 
604
- **Star ⭐ this repo if you find it useful!**
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.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
11
- a2a_adapter-0.1.0.dist-info/METADATA,sha256=GV6R5E3sp4b9b0szp53n1UT7EREDAgI9OmZL8oHPLSc,16527
12
- a2a_adapter-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
- a2a_adapter-0.1.0.dist-info/top_level.txt,sha256=b1O1dTJ2AoPEB2x-r5IHEsS2x1fczOzTrpR2DgF3LgE,12
14
- a2a_adapter-0.1.0.dist-info/RECORD,,
10
+ a2a_adapter-0.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
11
+ a2a_adapter-0.1.1.dist-info/METADATA,sha256=KMdCWiROAWlADyhSFl6lmiTuznj4i53hk5meDyl2yQQ,16675
12
+ a2a_adapter-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
+ a2a_adapter-0.1.1.dist-info/top_level.txt,sha256=b1O1dTJ2AoPEB2x-r5IHEsS2x1fczOzTrpR2DgF3LgE,12
14
+ a2a_adapter-0.1.1.dist-info/RECORD,,