opencode-agent-hub
Multi-agent coordination daemon and tools for OpenCode
What it is and what it does
opencode-agent-hub is a daemon that enables multiple AI agents running in separate OpenCode sessions to discover and communicate with each other. It works by polling OpenCode's shared SQLite database to find active sessions, facilitating introductions through a coordinator agent, and then routing messages between agents by watching for JSON files written to ~/.agent-hub/messages/ and injecting them into target sessions via async prompts. Agents do not poll for messages—the daemon wakes them up when new communication arrives.
The package is built for developers who want to orchestrate autonomous multi-agent workflows within OpenCode. It includes a daemon service (installable as a systemd or launchd service), a watch utility for monitoring activity, and configurable rate limiting to control LLM API costs. The daemon relies on agent-hub-mcp being configured in OpenCode, and messages are validated with pydantic on receipt. Known limitations include that injected messages are not visible in the OpenCode TUI, and some models may flag orientation messages as prompt injections.
Use it for:
- Orchestrate collaborative problem-solving where multiple specialized agents work together on a single task without manual routing.
- Build autonomous workflows where agents can request information or assistance from peers, reducing external API calls.
- Monitor and debug multi-agent interactions using agent-hub-watch to see message flow and coordination in real time.
- Control LLM API costs in high-frequency agent communication by enabling rate limiting to throttle message throughput.
- Deploy a persistent agent hub as a system service to coordinate long-running agent sessions across multiple terminals.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Coordinates communication between multiple AI agents running in separate OpenCode sessions, enabling them to discover each other and exchange messages through a daemon.
Yes, with conditions. Install if you are actively using OpenCode and want to enable agent-to-agent communication—the low install friction, active maintenance, and zero known vulnerabilities make it safe to try. However, be aware that it is still in Beta, the project is young, and injected messages are not visible in the OpenCode TUI, which may complicate debugging. Verify that agent-hub-mcp is properly configured before starting the daemon, and enable rate limiting if concerned about LLM API costs.
Install
opencode-agent-hub on PyPI
pip
pip install opencode-agent-hubuv
uv add opencode-agent-hubpoetry
poetry add opencode-agent-hubInstalling opencode-agent-hub
Before you install
Low install friction with a pure Python wheel and four lightweight runtime dependencies (prometheus-client, pydantic, requests, watchdog). Active maintenance with a recent release and ongoing commits, though the project is young and still in Beta status.
License in practice
Licensed under AGPL-3.0-only, which requires that any modifications or derivative works be released under the same license and made available to users. This is a strong copyleft license suitable for open-source projects but may restrict commercial use or closed-source modifications.
Quickstart
pip install opencode-agent-hub
# Terminal 1: start the daemon
agent-hub-daemon
# Terminal 2: monitor activity
agent-hub-watch
Requires agent-hub-mcp to be configured in OpenCode's opencode.json before the daemon will start. Python >= 3.11 required.
Verify before relying
- Whether injected agent-to-agent messages consume additional LLM API tokens beyond the agent's own responses.
- Performance characteristics and latency of message injection across many concurrent agents.
- Compatibility with OpenCode versions and whether upstream issue #8564 (injected messages not visible in TUI) has been resolved.
- Whether rate limiting is sufficient for production use cases with high-frequency agent communication.
Package facts
| License | AGPL-3.0-only (agpl) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — prometheus-client, pydantic, requests, watchdog |
| Maintenance | actively maintained — 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 308,392/month — #7,765 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opencode_agent_hub-1.6.1-py3-none-any.whl
Keywords: agents, ai, coordination, daemon, mcp, opencode
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
trinity-agentTrinity orchestrates multiple AI coding agents…
permissive · top 15,000 on PyPI
omnigentOmnigent is an open-source orchestration layer…
permissive · top 15,000 on PyPI
bernsteinBernstein orchestrates parallel CLI coding…
permissive · top 15,000 on PyPI
ouroboros-aiOuroboros is an Agent OS that turns vague AI…
permissive · top 15,000 on PyPI
code-puppyCode Puppy is an AI-powered code generation…
permissive · top 15,000 on PyPI
clawmetryClawMetry provides a real-time observability…
permissive · top 15,000 on PyPI
mindroomMindRoom is a multi-agent runtime that deploys…
permissive · top 15,000 on PyPI
detect_agentDetects whether code is running in an AI agent…
unclear · top 15,000 on PyPI
PraisonAIPraisonAI is a framework for building and…
permissive · top 15,000 on PyPI
metagit-cliMetagit provides cross-repository awareness and…
unclear · top 15,000 on PyPI