A2A agent protocol plugin for HiveMind-core
Project description
hivemind-a2a-agent-plugin
A HiveMind agent-protocol plugin that bridges the hive to external A2A (Agent-to-Agent) agents.
Natural-language queries arriving from hive satellites are forwarded to a configured
A2A server via JSON-RPC 2.0 (tasks/send or tasks/sendSubscribe), and the
response is streamed back to the originating satellite.
What is A2A?
A2A is an open protocol for agent interoperability. An A2A server:
- Publishes an agent card at
GET /.well-known/agent.jsondescribing its capabilities, skills, and the URL that accepts tasks. - Accepts task requests as JSON-RPC 2.0 at its root URL — either a blocking
tasks/sendor a streamingtasks/sendSubscribe(SSE).
Any compliant A2A server (LangChain agents, Google ADK, CrewAI, custom FastAPI services, …) works as a backend for this plugin.
Installation
pip install hivemind-a2a-agent-plugin
The plugin registers itself under the hivemind.agent.protocol entry-point group
so HiveMind-core discovers it automatically when it is installed.
Configuration
Add the following to your OVOS / HiveMind config (typically
~/.config/hivemind/hivemind.conf):
{
"hivemind": {
"agent_protocol": "hivemind-a2a-agent-plugin",
"a2a_agent": {
"agent_url": "http://localhost:9999",
"auth_header": "Bearer secret",
"timeout": 60,
"streaming": false
}
}
}
| Key | Default | Description |
|---|---|---|
agent_url |
— | Required. Root URL of the A2A server. |
auth_header |
— | Optional Authorization header (e.g. Bearer …). |
timeout |
60 |
HTTP timeout in seconds. |
streaming |
false |
Prefer tasks/sendSubscribe (SSE) when true. |
Hive wiring example
HiveMind master
└── hivemind-a2a-agent-plugin ← loaded as agent_protocol
└── A2A server (http://localhost:9999)
└── your LLM / agent / tool backend
Satellite (voice client, phone, …)
→ "what's the capital of France?"
→ HiveMind master receives utterance
→ plugin forwards to A2A server via tasks/send
→ A2A server responds: "Paris is the capital of France."
→ HiveMind master streams answer back to satellite
Start a minimal FastAPI A2A server and the HiveMind master:
# 1. run the example mock A2A server (also used by e2e tests)
uvicorn tests.e2e.mock_a2a_server:app --port 9999
# 2. configure hivemind-core to use this plugin (see above)
# 3. start hivemind-core
hivemind-core listen
Session / context mapping
The plugin maps the HiveMind session_id directly to the A2A sessionId parameter
so multi-turn conversations are kept in context on the A2A server side. No extra
state is stored in the plugin; the A2A server owns conversation history.
Error handling
The plugin never silences errors. If the A2A server is unreachable, returns an empty response, or returns a JSON-RPC error object, a human-readable error string is yielded to the satellite so the user always receives a reply.
Development
git clone https://github.com/TigreGotico/hivemind-a2a-agent-plugin
cd hivemind-a2a-agent-plugin
pip install -e ".[dev]"
pytest tests/ # unit tests (no server needed)
pytest tests/e2e/ # e2e tests (spins up a FastAPI mock server in-process)
Credits
Funded by NGI0 Commons Fund / NLnet under grant agreement No 101135429, through the European Commission's Next Generation Internet programme.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hivemind_a2a_agent_plugin-0.1.0a2.tar.gz.
File metadata
- Download URL: hivemind_a2a_agent_plugin-0.1.0a2.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03a28d10cc40486ef69753c448fef51b9193f514ac007a1209979a6cd5a5a36a
|
|
| MD5 |
3a6d6f4b5ff454cb6489c7ecb148f95d
|
|
| BLAKE2b-256 |
2e8b5fe667a1c5d5b3d2d1f57fe6beb1ac6bbb7a121aea3a1c90643eb2a6dcd2
|
File details
Details for the file hivemind_a2a_agent_plugin-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: hivemind_a2a_agent_plugin-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01f3e216601ee9d437b84d7e8cb2ef818e2b695dd61175e05d9860d7cb11d084
|
|
| MD5 |
c9f47d6f9d1df5cdbbd9bc4b02b4408e
|
|
| BLAKE2b-256 |
54a24ceb65cbb44d5d855e55ebaa6b5cb11ae00e307ebb45b7b51a132395b699
|