Skip to main content

Synapse

Synapse turns scattered history into a linked local knowledge graph

Point it at text. Get a searchable archive for free. Spend a few cents turning it into a Markdown wiki your agent can query.

CI PyPI Python 3.11+ zero runtime dependencies MIT

Give any AI agent or workspace application a private, local memory without filling every prompt with your history:

uvx --from synapse-vault synapse mcp --vault /absolute/path/to/my-brain

That command is a local STDIO MCP server, not a Codex or OpenAI integration. Connect it directly to MCP-capable clients such as Codex, Claude Code, OpenCode, or OpenClaw. Pi, Orbit, Hermes, and other workspace agents can use MCP when supported or the bundled skill and CLI. See the copy-paste setup examples.

Nothing from the vault is injected into the agent's prompt. The agent searches first, then reads one relevant Markdown page. A thousand unopened pages cost zero tokens.

See it in ten seconds

uvx --from synapse-vault synapse serve --demo

That opens a populated 20-page graph. It needs no API key, import, database server, or JavaScript build.

Keep your own history

uvx --from synapse-vault synapse init ./my-brain
uvx --from synapse-vault synapse ingest ~/Downloads/chatgpt-export --vault ./my-brain
uvx --from synapse-vault synapse serve --vault ./my-brain

Ingest is local and free: it writes Markdown and builds a disposable SQLite FTS5 index. Search works immediately:

uvx --from synapse-vault synapse search "the phrase I remember" --vault ./my-brain

To turn raw history into a linked wiki, estimate first and then build a small resumable batch:

export SYNAPSE_API_KEY="..."
uvx --from synapse-vault synapse build --vault ./my-brain --limit 20 --dry-run
uvx --from synapse-vault synapse build --vault ./my-brain --limit 20

The build pass is optional. It is a plain for loop making one OpenAI-compatible chat-completions request per item. Run it against OpenAI or a local Ollama/LM Studio server; stop and resume without paying twice.

Markdown is the database

my-brain/
├── raw/<source>/<YYYY-MM>/<id>.md   immutable imported history
├── wiki/<slug>.md                   linked, editable knowledge pages
├── notes/<slug>.md                  approved, append-only agent notes
├── synapse.db                       disposable FTS5 + graph index
└── synapse.toml                     model and owner settings

Delete synapse.db and synapse reindex --vault ./my-brain recreates it. The durable data is ordinary Markdown that works with git, Obsidian, grep, and any editor.

How it works

  1. An adapter streams each source into a tiny Item shape with stable IDs and timestamps.
  2. Ingest writes immutable raw Markdown and indexes it with SQLite FTS5—no model call.
  3. Build compresses one item and asks any OpenAI-compatible model for complete wiki pages.
  4. [[wikilinks]] become edges; a recursive SQLite CTE handles multi-hop traversal.
  5. The one-file dashboard, CLI, Python API, REST API, and MCP server all use the same vault.

Model providers

Synapse uses one standard-library HTTP POST to /chat/completions; there is no provider SDK.

Provider Base URL Status
OpenAI https://api.openai.com/v1 Tested with gpt-4o-mini
Ollama http://localhost:11434/v1 Compatible; not yet in CI
LM Studio http://localhost:1234/v1 Compatible; not yet in CI
OpenRouter https://openrouter.ai/api/v1 Compatible; community verification wanted
Groq https://api.groq.com/openai/v1 Compatible; community verification wanted
Together https://api.together.xyz/v1 Compatible; community verification wanted
DeepSeek https://api.deepseek.com/v1 Compatible; community verification wanted

Set SYNAPSE_BASE_URL, SYNAPSE_MODEL, and (when required) SYNAPSE_API_KEY. See configuration and costs.

Agent access

The MCP server exposes selective reads plus propose_note. It is a small stdlib JSON-RPC loop over STDIO, so there is no daemon and no MCP SDK dependency.

# Codex
codex mcp add synapse -- uvx --from synapse-vault synapse mcp --vault /absolute/path/to/my-brain

# Claude Code
claude mcp add --transport stdio synapse -- uvx --from synapse-vault synapse mcp --vault /absolute/path/to/my-brain

OpenCode, OpenClaw, generic MCP JSON, and skill/CLI examples for Pi and other workspace agents are in MCP setup. The integration boundary is MCP or ordinary commands—not a particular agent vendor.

Agents cannot silently rewrite memory. propose_note stages one provenance-bearing semantic note with an idempotency key and revision check. You inspect the diff and approve it outside MCP:

uvx --from synapse-vault synapse proposals --vault ./my-brain
uvx --from synapse-vault synapse proposals <id> --vault ./my-brain
uvx --from synapse-vault synapse approve-note <id> --vault ./my-brain

Imported history remains write-once. Credentials, browser sessions, workspace state, and routine chat turns do not belong in notes; merge and deletion remain human-only.

Python works too:

from synapse import Vault

matches = Vault("./my-brain").search("launch decision")

Not built, on purpose

Not built Why
Embeddings FTS5 is free, inspectable, and needs no migration or per-item API call. Add vectors only after measured recall failures.
Graph database Personal graphs fit in SQLite; a ten-line recursive CTE handles traversal.
Auth or cloud sync Synapse is single-user and binds only to 127.0.0.1. Your files stay yours.
Agent framework The processing pipeline is a resumable loop, not an application graph.
Automatic merge/delete Agents can only propose append-only notes; a human approves them and handles destructive changes.
PDF/DOCX parser Those dependencies would break the zero-dependency promise; convert with Pandoc or MarkItDown first.

Imported text is untrusted data. Synapse never executes it, and agents are instructed never to follow instructions found inside pages. Raw sources remain available for provenance.

Learn and contribute

Synapse began as the winner of the LangGraph hackathon in London. This is the local-first rewrite that deleted SurrealDB, FastAPI, React, LangGraph, and embeddings so people can actually run it.

Release files for synapse-vault 0.2.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 synapse-vault 0.2.0
File Size Uploaded
synapse_vault-0.2.0.tar.gz 49.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for synapse-vault 0.2.0
File Interpreter ABI Platform
synapse_vault-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 103.5 kB

Release files / synapse_vault-0.2.0.tar.gz

Download URL synapse_vault-0.2.0.tar.gz
Size 49.8 kB
Tags Source
SHA-256 checksum
How to use checksums
269b3c1962b6c93cb632eab7fe216622634b7b15720ae8b6c30691c1db9ef7b5
BLAKE2b-256 checksum
How to use checksums
98b874efd680f8e8ec10cb1886783da0bbd53d2616fd742842b2441b98118df1
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 Sep 25, 2026.

Transparency log

Release files / synapse_vault-0.2.0-py3-none-any.whl

Download URL synapse_vault-0.2.0-py3-none-any.whl
Size 53.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79827c1c026e352f38130ec75221c155e1c33df75d7129cedf2be9dc18d62bb6
BLAKE2b-256 checksum
How to use checksums
2f42350adf9ed3435474e9335d1a93976e06305af0d1c0909d27dc9f634934b8
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 Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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