🌉 Agent Context Bridge (ACB)
Universal, zero-dependency context & memory bridge for autonomous coding agents.
Seamlessly share project decisions, architectural constraints, and task progress between Hermes Agent, Claude Code, OpenCode, and Codex.
⏱️ The 10-second version: every AI coding tool starts blind — decisions made in one agent are lost to the next. ACB records them once (
acb record) and replays them in each agent's native format (acb inject).
50s, no audio: init → record → list → inject for Claude & Hermes. One store (.agent_bridge/) → every agent.
💡 The Problem: Multi-Agent Context Fragmentation
When switching between modern AI developer tools (e.g., Claude Code in terminal, Hermes swarm running in background, OpenCode in IDE):
- Each agent starts blind: Context learned by one agent in a prior turn is lost to the next.
- Token waste: Agents re-read entire repository trees to rediscover decisions already made.
- No persistent audit trail: Critical architectural choices disappear with session resets.
Agent Context Bridge solves this with a lightweight, file-backed offline store (.agent_bridge/) and dedicated adapter templates for each agent's native prompt hook format.
✨ Features
- Zero Runtime Dependencies: Pure Python standard library (
argparse,json,dataclasses,datetime). Fast and crash-resilient. - Offline & Local-First: No background daemon, no external database, no network calls. Works 100% offline.
- Multi-Agent Adapters: Native formatters for Hermes Agent, Claude Code, OpenCode, and Codex.
- Human-Readable & Machine-Parseable: Automatically maintains both
records.jsonl(structured) andSHARED_CONTEXT.md(markdown view). - Fast CLI: Simple
agent-bridge(acb) command for CI, shell hooks, or direct agent execution.
📦 Installation
pip install agent-context-bridge
Or install locally from source:
git clone https://github.com/shenn667/agent-context-bridge.git
cd agent-context-bridge
pip install -e .
🚀 Quickstart
1. Initialize a Workspace
acb init
Creates .agent_bridge/records.jsonl and .agent_bridge/SHARED_CONTEXT.md.
2. Record a Context Decision
acb record \
--agent hermes-dev \
--topic "Database Engine" \
--summary "Adopted SQLite WAL mode for local agent state storage" \
--details "PostgreSQL required Docker containers; SQLite provides zero-latency offline access." \
--tag db --tag architecture
3. List Shared Context
acb list
4. Inject Context into an Agent Session
Output prompt-ready context tailored for your target agent:
# For Claude Code SessionStart hook:
acb inject --target claude
# For Hermes Agent system context:
acb inject --target hermes
# For OpenCode:
acb inject --target opencode
✅ Demo locale (3 commandes)
Reproductible depuis une clone fraîche — prouve install + record/inject + version cohérente :
pip install -e .
acb init --dir /tmp/acb-demo && acb record --dir /tmp/acb-demo --agent hermes-dev --topic "Demo" --summary "Bridge OK" && acb inject --dir /tmp/acb-demo --target hermes
acb --version
Attendu : agent-bridge 0.2.0 (identique à pyproject.toml, __init__.__version__ et au tag v0.2.0 — le workflow release.yml refuse la publication si tag ≠ version).
🪝 Hooks natifs (1 commande chacun)
Claude Code — SessionStart
acb hooks claude --print # affiche le snippet .claude/settings.json
acb hooks claude --install # écrit/fusionne <workspace>/.claude/settings.json (idempotent)
echo '{}' | acb hooks run --target claude # teste le hook : exit 0 + contexte sur stdout
Le hook enregistré est acb inject --target claude : Claude Code l'exécute à chaque
SessionStart (payload JSON sur stdin, ignoré) et le stdout est injecté en contexte de session.
Hermes Agent — inject
acb hooks hermes --print # snippet de câblage (préambule de session)
acb inject --target hermes # inject 1-commande, prêt pour le system context
🏗️ Architecture
┌──────────────────────┐
│ Your Project Repo │
└──────────┬───────────┘
│
.agent_bridge/SHARED_CONTEXT.md
.agent_bridge/records.jsonl
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Hermes │ │Claude Code│ │ OpenCode │
│ Adapter │ │ Adapter │ │ Adapter │
└───────────┘ └───────────┘ └───────────┘
🧪 Running Tests
pytest -v
📄 License
This project is open-source under the MIT License.
Authored by shenn667 (lehdev@yandex.com).
Metadata
Release files for agent-context-bridge 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_context_bridge-0.2.0.tar.gz | 301.2 kB | With provenance | Details for agent_context_bridge-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_context_bridge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for agent_context_bridge-0.2.0-py3-none-any.whl |
Total release size: 316.4 kB
Release files / agent_context_bridge-0.2.0.tar.gz
| Download URL | agent_context_bridge-0.2.0.tar.gz |
|---|---|
| Size | 301.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eaba303c3dfb6581d23a9a39ae49a4e78591ac70fb525718a77074d05269fc9c
|
|
BLAKE2b-256 checksum How to use checksums |
e4d70a9ea656c3a938116eceeab4b74a353bfa33ff88b0a1a93fdc0d404ffdd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / agent_context_bridge-0.2.0-py3-none-any.whl
| Download URL | agent_context_bridge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ecb7aea48684c97dddcc8b7da16d4546d91cdfed2fba4d4fd2e2cfffaf7bf6e
|
|
BLAKE2b-256 checksum How to use checksums |
248d5b0ee3facc99a83888c9c0c315586fdd4006fce405f83497d2d6a5e3a105
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logSecurity for agent-context-bridge 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for agent_context_bridge-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.