Skip to main content

context-bridge — Universal Session Memory for AI Agents

Capture. Index. Retrieve. A local-first context layer that works with any AI coding agent.

CI License Stars Python Release


The Problem

Every AI coding agent (Claude Code, Codex, OpenCode, Hermes, Aider) forgets everything between sessions. You re-explain your project, re-state architecture decisions, and re-teach preferences every single time. Existing solutions are locked to one agent or require manual maintenance.

The Solution

context-bridge is a universal, local-first memory layer that:

  • Captures sessions from any agent automatically
  • Indexes decisions, patterns, lessons in a local SQLite database
  • Retrieves relevant context when you start a new session
  • Works with Claude Code, Codex, OpenCode, Hermes, Aider — anything that writes logs

No cloud. No API keys. No vendor lock-in.

Quick Start

Get started in 5 minutes:

pip install git+https://github.com/yunaremaia/context-bridge.git

# Initialize in your project
context-bridge init

# Index existing agent sessions
context-bridge index ~/.claude/projects/

# Query memory
context-bridge recall "How did we handle authentication?"

# Inject context into new session
context-bridge inject --agent claude

Not yet on PyPI. Install from git with the line above.

Architecture

~/.context-bridge/
├── sessions/           # Captured session transcripts
├── index.db            # SQLite FTS + metadata
├── memories/           # Consolidated memories
└── config.yaml         # Per-project config

Why Now?

  • 67k+ MCP servers deployed, AI agents everywhere
  • No open-source universal memory layer exists
  • Show HN validation: hmem, Engram, Memobase all trending
  • Every developer using AI agents has this problem

Sponsoring

context-bridge is MIT licensed and free to use. If it earns a permanent place in your setup, you can support continued maintenance via GitHub Sponsors or by sending SOL to the project treasury wallet:

Eeztv1nCYUt1fwGWpzKC948gaWfjejYCAuLtUMgzDWbW

Funding platforms are configured in .github/FUNDING.yml.

If this tool is useful to you, a star helps other people find it.

  • driftcheck — detect version drift between docs and toolchain files
  • mcp-guard — audit MCP servers for unsafe permissions
  • memwatch — health-check and prune agent memory stores
  • agent-workspace — isolated workspaces per AI agent session

Part of a family of focused, single-purpose developer tools — each one does one thing and does it well.

License

MIT

Metadata

Release files for context-bridge-py 0.3.0

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

Source distribution (sdist)

Source distribution for context-bridge-py 0.3.0
File Size Uploaded Provenance Actions
context_bridge_py-0.3.0.tar.gz 29.3 kB With provenance Details for context_bridge_py-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for context-bridge-py 0.3.0
File Interpreter ABI Platform Actions
context_bridge_py-0.3.0-py3-none-any.whl Python 3 none any Details for context_bridge_py-0.3.0-py3-none-any.whl

Total release size: 42.1 kB

Release files / context_bridge_py-0.3.0.tar.gz

Download URL context_bridge_py-0.3.0.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a110128faf2a36115f34c0b2c8982df2001738c6b726becb80a646ed5305a0aa
BLAKE2b-256 checksum
How to use checksums
e6cec3b41b8437f916d65b1fcb9a2e57778147d4c8399db752406273730e3ca3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / context_bridge_py-0.3.0-py3-none-any.whl

Download URL context_bridge_py-0.3.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f14993665c3d50b921cf7c2275656bd4358b61fd5f5f8ab7f36affc1c5d3abc4
BLAKE2b-256 checksum
How to use checksums
270c7339b954c040493fb247b4067c3c6134a6c3bb0303e6baaa909de87ef2d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Security for context-bridge-py 0.3.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.

Select from 2 files

Attestation for context_bridge_py-0.3.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 Oct 19, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

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