Skip to main content

Synapse

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.

PyPI version GitHub Apache 2.0

English · 简体中文 · Docs · Changelog

Synapse TUI demo — click to watch the full video

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 global recent-sessions switcher: it lists the most recently changed sessions across every registered project (from the user-layer catalog), marks each one's live runtime status — running / queued / idle / cold, etc. — 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 /compact keep 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.json profiles (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 skillsAGENTS.md memory plus Agent Skills (skills/**) that load only when relevant.
  • Sub-agents — built-in researcher, tester, and reviewer roles 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

synapse_cli_agent-0.1.31.tar.gz (6.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synapse_cli_agent-0.1.31-py3-none-any.whl (686.7 kB view details)

Uploaded Python 3

File details

Details for the file synapse_cli_agent-0.1.31.tar.gz.

File metadata

  • Download URL: synapse_cli_agent-0.1.31.tar.gz
  • Upload date:
  • Size: 6.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for synapse_cli_agent-0.1.31.tar.gz
Algorithm Hash digest
SHA256 84c0b63ae82d0a5dd24653e1cae5e08f419ecfa5ddcf8a7b17cb8239fe0a9082
MD5 b8d3208d33ae84799e5f06326396023a
BLAKE2b-256 edfb2ff019460b24909aa7050a321c5620b09524ce4daaf4e888087f5f061347

See more details on using hashes here.

Provenance

The following attestation bundles were made for synapse_cli_agent-0.1.31.tar.gz:

Publisher: release.yml on alex8224/synapse-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synapse_cli_agent-0.1.31-py3-none-any.whl.

File metadata

File hashes

Hashes for synapse_cli_agent-0.1.31-py3-none-any.whl
Algorithm Hash digest
SHA256 2e4d2bb3be0b2753d7a9b096e00027cac128d44028a16b6d078f7cb50be557df
MD5 6e9c81de59ceba127a036b3a2e2c2204
BLAKE2b-256 25a9d48397a2b9ca8721e13f299b41985f1443fd860d995340762ba81db51dab

See more details on using hashes here.

Provenance

The following attestation bundles were made for synapse_cli_agent-0.1.31-py3-none-any.whl:

Publisher: release.yml on alex8224/synapse-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.44

2 files

0.1.43

2 files

0.1.42

2 files

0.1.41

2 files

0.1.40

2 files

0.1.39

2 files

0.1.38

2 files

0.1.37

2 files

0.1.36

2 files

0.1.35

2 files

0.1.34

2 files

0.1.33

2 files

0.1.32

2 files

This release

0.1.31 This release

2 files

0.1.30

2 files

0.1.29

2 files

0.1.28

2 files

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 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