Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

hivemind-a2a-agent-plugin

An agent-protocol plugin for HiveMind that connects the hive to external A2A (Agent-to-Agent) agents.

The plugin forwards natural-language queries from hive satellites to a configured A2A server over JSON-RPC 2.0 (tasks/send or tasks/sendSubscribe). It streams the response back to the satellite that sent the query.


What is A2A?

A2A is an open protocol for agent interoperability. An A2A server does two things:

  1. It publishes an agent card at GET /.well-known/agent.json. The card describes the server's capabilities, skills, and the URL that accepts tasks.
  2. It accepts task requests as JSON-RPC 2.0 at its root URL. A request is either a blocking tasks/send call or a streaming tasks/sendSubscribe call (SSE).

Any compliant A2A server works as a backend for this plugin, including LangChain agents, Google ADK, CrewAI, and custom FastAPI services.


Installation

pip install hivemind-a2a-agent-plugin

The plugin registers itself under the hivemind.agent.protocol entry-point group. HiveMind-core discovers it automatically once it is installed.


Configuration

Add the following to your OVOS / HiveMind config, typically at ~/.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 none Required. Root URL of the A2A server.
auth_header none 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

Run a minimal FastAPI A2A server and the HiveMind master:

# 1. run the example mock A2A server (also used by e2e tests), from tests/
cd tests && uvicorn 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 and context mapping

The plugin maps the HiveMind session_id directly to the A2A sessionId parameter, so multi-turn conversations keep their context on the A2A server side. The plugin stores no extra state. The A2A server owns the conversation history.


Error handling

The plugin never silences errors. The A2A server may be unreachable, return an empty response, or return a JSON-RPC error object. In each case, the plugin yields a human-readable error string to the satellite so the user always gets a reply.


Development

git clone https://github.com/JarbasHiveMind/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.

Metadata

Release files for hivemind-a2a-agent-plugin 0.1.4a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hivemind-a2a-agent-plugin 0.1.4a1
File Size Uploaded Provenance
hivemind_a2a_agent_plugin-0.1.4a1.tar.gz 17.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hivemind-a2a-agent-plugin 0.1.4a1
File Interpreter ABI Platform
hivemind_a2a_agent_plugin-0.1.4a1-py3-none-any.whl Python 3 none any Details

Total release size: 30.0 kB

Release files / hivemind_a2a_agent_plugin-0.1.4a1.tar.gz

Download URL hivemind_a2a_agent_plugin-0.1.4a1.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
887c7356ecfba80d60ab53a996c8b9eff71c9748fcb42e5787f55b8e00bdeb9e
BLAKE2b-256 checksum
How to use checksums
bf170e24085379def936e467195809b3f2953dc8573c7fe45c09c601b6449688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / hivemind_a2a_agent_plugin-0.1.4a1-py3-none-any.whl

Download URL hivemind_a2a_agent_plugin-0.1.4a1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01f00bfdafaf7ee9baa4aa25deacc7cecbff3104e63f9fb5f3effeabcc441797
BLAKE2b-256 checksum
How to use checksums
06ca3ecfc6f090d20677b171b587729e9dcc87b9666528582130ca30db9a0e11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for hivemind-a2a-agent-plugin 0.1.4a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page