
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Multi-provider agentic coding with TUI, tool use, session management, Engram memory integration, and infrastructure monitoring.
Quick Start · Commands · Providers · Tools · Configuration · Headless API https://img.shields.io/badge/License-Elastic%202.0-blue](https://www.elastic.co/licensing/elastic-license)
Synapse is an AI coding agent that runs in your terminal. It connects to multiple LLM providers, gives the model tools to read, edit, and execute code, and remembers context across sessions via https://github.com/zanfiel/engram.
bash# Start an interactive session synapse # Use a specific provider synapse anthropic synapse openai # Run as a headless HTTP server (for Forge or other frontends) synapse serve :4300
Key features:
.synapse.json for project-specific system pro***s, custom tools, and model overrides.synapse.jsonsynapse update checks GitHub releases and installs in-placebashgit clone https://github.com/zanfiel/synapse.git cd synapse make build # → ./synapse make install # → /usr/local/bin/synapse
bashmake windows # → synapse.exe make linux # → synapse-linux make all # → all platforms
bash# Option 1: Anthropic API key export ANTHROPIC_API_KEY=sk-ant-... # Option 2: OpenAI API key (or any compatible endpoint) export OPENAI_API_KEY=sk-... export OPENAI_BASE_URL=https://api.openai.com/v1 # optional
bashexport ENGRAM_URL=http://localhost:4200 export ENGRAM_TOKEN=eg_your_key synapse # → Engram context is automatically recalled at session start
synapse Start interactive session synapse serve [addr] Start headless HTTP server (default :4300) synapse sessions List saved sessions synapse resume <id> Resume a saved session synapse branch <id> Branch a session (fork conversation) synapse export <id> Export session as JSON synapse search <query> Search past sessions synapse update Check for and install updates synapse debug <message> Single-shot debug mode (no TUI) synapse version Show version synapse help Show help
| Command | Description |
|---|---|
/quit, /exit | Exit Synapse |
/clear | Clear conversation |
/compact | Compress history |
/model [name] | Show or switch model |
/theme [name] | Show or switch theme |
/git | Show git status |
/tasks | Show background tasks |
/cost | Show session cost estimate |
/branch | Fork conversation at this point |
/export | Export current session |
/mcp | Show MCP server status |
/usage | Show provider usage stats |
/help | Show commands |
| Shortcut | Action |
|---|---|
Ctrl+F | Search output |
PgUp/PgDn | Scroll output |
Tab | Auto-complete commands |
Synapse abstracts multiple LLM providers behind a unified interface. Provider priority (when no explicit provider is set):
ANTHROPIC_API_KEY is setOPENAI_API_KEY is set (supports custom base URL via OPENAI_BASE_URL)Override with environment variables:
bashSYNAPSE_PROVIDER=anthropic synapse SYNAPSE_MODEL=claude-sonnet-4-20250514 synapse
Or force a provider directly:
bashsynapse anthropic # Anthropic API synapse openai # OpenAI API
Synapse gives the AI model access to these tools:
| Tool | Description |
|---|---|
read | Read file contents (supports images for vision) |
write | Create or overwrite files |
edit | Surgical find-and-replace editing |
patch | Multi-edit patch (multiple find/replace pairs) |
bash | Execute shell commands |
tree | List directory structure |
glob | Find files matching a pattern |
grep | Search file contents with regex |
fetch | HTTP GET/POST for web content and APIs |
think | Extended reasoning scratchpad |
todo | Task list management |
undo | Undo file changes from this session |
| Tool | Description |
|---|---|
git_status | Show working tree status |
git_diff | Show uncommitted changes |
git_commit | Stage and commit changes |
git_log | Show recent commit history |
| Tool | Description |
|---|---|
ssh | Execute commands on remote servers |
memory_store | Store memories in Engram |
memory_search | Search memories |
memory_list | List recent memories |
memory_update | Update a memory |
memory_delete | Delete a memory |
memory_archive | Archive a memory |
conversation_search | Search past conversations |
| Tool | Description |
|---|---|
diagnostics | Get compiler/linter errors |
symbol | Search workspace symbols |
hover | Get type info at a position |
definition | Go to definition |
Define project-specific tools in .synapse.json:
json{ "tools": [ { "name": "deploy", "description": "Deploy to staging", "command": "bash deploy.sh staging" } ] }
┌─────────────────────────────────────────────────────┐ │ Synapse │ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │ │ │ TUI │ │ Agent │ │ Prompt Engine │ │ │ │(Bubble │ │ Loop │ │ (dynamic sys │ │ │ │ Tea) │ │ │ │ prompt build) │ │ │ └────┬─────┘ └────┬─────┘ └────────┬─────────┘ │ │ │ │ │ │ │ ┌────┴──────────────┴─────────────────┴────────┐ │ │ │ Provider Layer │ │ │ │ Anthropic │ OpenAI │ │ │ └──────────────────────────────────────────────┘ │ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │ │ │ Tool │ │ Session │ │ Engram │ │ │ │ Registry│ │ Store │ │ Client │ │ │ │ (30+) │ │ (SQLite) │ │ (memory) │ │ │ └──────────┘ └──────────┘ └──────────────────┘ │ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │ │ │ LSP │ │ MCP │ │ Fleet Pulse │ │ │ │ Client │ │ Client │ │ (infra mon.) │ │ │ └──────────┘ └──────────┘ └──────────────────┘ │ └─────────────────────────────────────────────────────┘
Located at ~/.config/synapse/config.json (Linux/macOS) or ~/.synapse/config.json (Windows).
json{ "model": "claude-sonnet-4-20250514", "provider": "anthropic", "anthropic_api_key": "sk-ant-...", "engram_url": "http://localhost:4200", "engram_token": "eg_...", "max_tokens": 8192, "reasoning_level": "medium", "theme": "synapse", "auto_capture": true, "fleet_enabled": true, "fleet_interval": 300, "fleet_servers": [ { "name": "web-1", "host": "10.0.0.1", "user": "deploy", "key_path": "~/.ssh/id_rsa" } ], "mcp_servers": [ { "name": "engram", "command": "node", "args": ["path/to/mcp-server.mjs"], "transport": "stdio" } ] }
Create .synapse.json in any project directory:
json{ "model": "claude-sonnet-4-20250514", "system_prompt": "@AGENTS.md", "reasoning_level": "high", "tools": [ { "name": "test", "description": "Run test suite", "command": "go test ./..." } ] }
| Variable | Description |
|---|---|
SYNAPSE_PROVIDER | Override provider (anthropic, openai) |
SYNAPSE_MODEL | Override model name |
ANTHROPIC_API_KEY | *** API key |
OPENAI_API_KEY | OpenAI API key |
OPENAI_BASE_URL | Custom OpenAI-compatible API base URL |
ENGRAM_URL | Engram memory server URL |
ENGRAM_TOKEN | Engram API token |
Run synapse serve to start an HTTP server for programmatic access. Used by https://github.com/zanfiel/forge and other frontends.
bashsynapse serve :4300
| Method | Path | Description |
|---|---|---|
POST | /v1/chat | Send a message, get a response |
POST | /v1/chat/stream | Send a message, get SSE stream |
bashcurl -X POST http://localhost:4300/v1/chat \ -H "Content-Type: application/json" \ -d '{"message": "What files are in this directory?", "session_id": "my-session"}'
bashcurl -N http://localhost:4300/v1/chat/stream \ -H "Content-Type: application/json" \ -d '{"message": "Explain this codebase", "session_id": "my-session"}' # → SSE events: text, tool_call, tool_result, thinking, done
| Feature | Synapse | Claude Code | Aider | Continue |
|---|---|---|---|---|
| Multi-provider | ✅ (2 providers) | ❌ (*** only) | ✅ | ✅ |
| Rich TUI | ✅ | ✅ | ✅ | ❌ (IDE) |
| Persistent memory (Engram) | ✅ | ❌ | ❌ | ❌ |
| Session save/resume/branch | ✅ | ❌ | ❌ | ❌ |
| Conversation search | ✅ | ❌ | ❌ | ❌ |
| LSP integration | ✅ | ❌ | ❌ | ✅ |
| MCP client | ✅ | ✅ | ❌ | ❌ |
| SSH tool | ✅ | ❌ | ❌ | ❌ |
| Infrastructure monitoring | ✅ | ❌ | ❌ | ❌ |
| Sub-agents | ✅ | ✅ | ❌ | ❌ |
| Headless HTTP API | ✅ | ❌ | ❌ | ❌ |
| Custom tools (per-project) | ✅ | ❌ | ❌ | ✅ |
| Extended thinking | ✅ | ✅ | ❌ | ❌ |
| Themes | ✅ (6) | ❌ | ❌ | ✅ |
| Auto-compact | ✅ | ✅ | ✅ | ❌ |
| Self-update | ✅ | ✅ | ✅ | ❌ |
| Self-hosted | ✅ | ❌ | ✅ | ✅ |
| Single ***ary | ✅ | ❌ | ❌ | ❌ |
Elastic License 2.0 — see LICENSE.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 zanfiel/synapse 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: