Synapse
The open-source coding agent that lives in your terminal — built on LangChain Deep Agents. Ask it to fix a test, refactor a module, or carry a goal across turns until it is done.
English · 简体中文 · Docs · Changelog
Synapse is a terminal-first coding-agent runtime. Unlike a one-shot "run this and reply" prompt, it is designed for sessions that last more than a few turns: a responsive TUI that keeps the timeline, tool calls, and context usage visible; token-aware handling of tool output; and persistent goals that keep the agent working until the work is actually done.
Install
One command, no clone required:
uv tool install synapse-cli-agent
Then start the TUI from anywhere:
synapse tui -w .
Open a session in any registered project from the global catalog:
synapse --session <project_id>:<thread_id> # global session reference
synapse --project <ref> # project by id prefix, name, or path
Inside the TUI, click the topbar ≡ (or the workspace label) to open the
floating project drawer: it lists every registered project, groups their
sessions, marks live runtime status, and lets you switch sessions in place or
jump to another project (the TUI restarts into that project).
Press Ctrl+Tab for a lighter active-session switcher: it lists only sessions
that are doing work right now (across projects), lets you Tab / Shift+Tab
through them and Enter to switch — the old session keeps running in the
background and is never cancelled. Some terminals never forward Ctrl+Tab to
the app; Ctrl+O is a drop-in alternative.
Or run from source
git clone https://github.com/alex8224/synapse-agent.git
cd synapse-agent
uv sync
# Windows venv entry
.\.venv\Scripts\synapse.exe tui -w .
# Or module entry
uv run python -m synapse tui -w .
Use it
Type it like you would ask a colleague:
- "Fix the failing test in
tests/test_backends.py" - "Refactor this module and add type annotations"
- "Review the latest commit and suggest improvements"
- "Keep working on this goal until it is done" (via
/goal)
Three ways to talk to it:
| Mode | What it does |
|---|---|
| TUI | Full terminal UI: timeline, turn rail, tool groups, context usage, themes |
| Chat | Plain interactive REPL — synapse chat -w . |
| Run | One-shot task that prints the answer — synapse run "summarize this repo" -w . |
Why it is built for long sessions
- Long-running goals —
/goal <objective>survives turn boundaries, tracks tokens and elapsed time, and steers the next turn automatically until the goal is completed, paused, blocked, or budget-limited. - Token-aware tool output — search results, logs, diffs, JSON, and code are classified and compressed before they re-enter the model context; large originals stay recoverable through references.
- Managed long context — automatic summarization and
/compactkeep sessions inside the model window, with occupancy and savings visible in the TUI. - Direct Codex OAuth — sign in with the Codex-compatible browser flow or import an existing Codex grant. No API key required; tokens refresh automatically.
- Your model, your choice — OpenAI-compatible providers via
models.jsonprofiles (OpenAI, DeepSeek, local gateways, and more), including a persistent WebSocket mode. - MCP built in — attach MCP servers and their tools appear in the agent automatically.
- Sessions that resume — SQLite checkpoints, a global project catalog across all your projects, and a lightweight paged transcript so even huge sessions reopen fast.
- Memory and skills —
AGENTS.mdmemory plus Agent Skills (skills/**) that load only when relevant. - Sub-agents — built-in
researcher,tester, andreviewerroles for parallel delegation. - Approvals when you want them — optional human-in-the-loop (
--require-approval) and safety profiles.
Slash commands
Type /help in the TUI for the full reference. The essentials:
| Command | What it does |
|---|---|
/goal <objective> |
Set a long-running goal that auto-continues across turns |
/goal pause · /goal resume · /goal clear |
Manage the active goal |
/new · /switch <id> · /sessions |
Create, switch, and list sessions |
/export [md|json] |
Export the transcript to a file |
/model <provider:model> |
Switch models at runtime |
/fast [on|off|status] |
Toggle the Codex Fast tier (OAuth profiles) |
/mcp list · /mcp reload |
Manage MCP servers |
/theme <name> |
Switch UI themes |
/compact |
Force context compaction |
/context |
Show context usage stats |
/safety <profile> |
Switch safety profiles |
/approve · /reject |
Human-in-the-loop decisions |
Pick a model
Synapse works with any OpenAI-compatible endpoint. Configure profiles in ~/.synapse/models.json (or <workspace>/.synapse/models.json):
{
"default": "deepseek",
"models": {
"deepseek": {
"model": "openai:deepseek-v4-pro",
"api_key": "sk-...",
"base_url": "http://127.0.0.1:3000/v1",
"thinking": "high"
}
}
}
For a zero-config Codex experience, use the OAuth profile — see Models.
Documentation
| Quickstart | First run, CLI reference, common workflows |
| Configuration | Layered settings, environment variables, paths |
| Models | Provider profiles, OAuth, Fast tier, WebSocket mode |
| MCP | Attaching and managing MCP servers |
| Sessions | Checkpoints, resume, transcript paging |
| Skills | Bundled skills and the Agent Skills format |
| Permissions | Read-only mode and approval flows |
| Install | All installation methods |
Repository layout
src/synapse/ Agent assembly, commands, runtime, sessions, TUI, integrations
rust/ Optional native compression cores (PyO3)
docs/ User documentation
tests/ Python test suite
scripts/ Install / release helpers
License
Apache License 2.0 — see LICENSE. Third-party dependencies and Rust subcomponents may carry their own licenses; retain the corresponding license and NOTICE files when distributing.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synapse_cli_agent-0.1.28.tar.gz.
File metadata
- Download URL: synapse_cli_agent-0.1.28.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59392d6b617a8426609bc38e4c1122816714a8ed3554cac0b93161bd06089d4a
|
|
| MD5 |
6936c15634c9ded7bcf4cc3c8b324e79
|
|
| BLAKE2b-256 |
b147d57f087c896e5f146742c3ef29c900fd2390b51779896d2feecd56e753da
|
Provenance
The following attestation bundles were made for synapse_cli_agent-0.1.28.tar.gz:
Publisher:
release.yml on alex8224/synapse-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synapse_cli_agent-0.1.28.tar.gz -
Subject digest:
59392d6b617a8426609bc38e4c1122816714a8ed3554cac0b93161bd06089d4a - Sigstore transparency entry: 2419151884
- Sigstore integration time:
-
Permalink:
alex8224/synapse-agent@62ae35aac91cdba113a88b8c0fc4fc6548ba238a -
Branch / Tag:
refs/tags/v0.1.28 - Owner: https://github.com/alex8224
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62ae35aac91cdba113a88b8c0fc4fc6548ba238a -
Trigger Event:
push
-
Statement type:
File details
Details for the file synapse_cli_agent-0.1.28-py3-none-any.whl.
File metadata
- Download URL: synapse_cli_agent-0.1.28-py3-none-any.whl
- Upload date:
- Size: 672.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ff1aa9922201e941f7fe3eb1ffe3df34692c28bba7beb57787e9bf1ca2c71b5
|
|
| MD5 |
55effa59524b73d7609783a03b878ce9
|
|
| BLAKE2b-256 |
5075749a0b67bdea95a431dc1817e07c40883036f6a7f1ff1cf71ea999f8f28f
|
Provenance
The following attestation bundles were made for synapse_cli_agent-0.1.28-py3-none-any.whl:
Publisher:
release.yml on alex8224/synapse-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synapse_cli_agent-0.1.28-py3-none-any.whl -
Subject digest:
5ff1aa9922201e941f7fe3eb1ffe3df34692c28bba7beb57787e9bf1ca2c71b5 - Sigstore transparency entry: 2419151934
- Sigstore integration time:
-
Permalink:
alex8224/synapse-agent@62ae35aac91cdba113a88b8c0fc4fc6548ba238a -
Branch / Tag:
refs/tags/v0.1.28 - Owner: https://github.com/alex8224
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62ae35aac91cdba113a88b8c0fc4fc6548ba238a -
Trigger Event:
push
-
Statement type: