What is Zene?
Zene is a local-first AI coding agent written in Rust. It runs in your project directory, reads and edits files with high precision, executes shell commands, searches the web, and keeps conversation sessions on disk.
The default local UI is the Web Agent console (via zene-gateway).
Zene also supports headless prompts, Keel sandbox profiles, permission modes,
stdio/HTTP MCP servers, lifecycle hooks, skills, and an ACP bridge for editors.
Keel Sandbox
File and shell access are constrained by configurable Keel sandbox profiles:
off, workspace, read-only, strict, or a custom profile
from ~/.zene/sandbox.toml. Credential paths such as ~/.ssh and **/.env*
are denied by default. Network tools can be gated with an allow_hosts egress allowlist.
# Launch Web Agent / REPL in the current directory
zene
# Auto-approve Write / Edit / Bash
zene --yolo
# Stricter sandbox profile
zene --sandbox strict
Context Compaction
Long sessions stay within the model window. Zene tracks usage-driven context water level
and applies full-replace compaction with an input ladder:
verbatim → fitted → lossy.
Oversized tool outputs are truncated first; older turns are summarized when needed.
Recover with /compact, /rewind, and /fork.
Steerable Control
Keep the agent on track without waiting for a turn to finish. Queue follow-up instructions
mid-step with /steer <msg>, or cancel the in-flight turn with Esc / /cancel.
# Inside a session, while Zene is running:
/steer check if compiling before running tests
Planning Mode
For complex work, switch to /plan. Actuators lock to read-only tools while Zene
explores the workspace and writes a proposed plan under .zene/plan.md.
Returning to coding mode requires explicit confirmation.
Extensible with MCP & Skills
Register MCP servers over stdio or HTTP in ~/.zene/mcp.json (or project
.zene/mcp.json). Probe connectivity with zene mcp doctor.
Add skill instruction files under .agents/skills/*/SKILL.md.
# ~/.zene/mcp.json
{
"servers": {
"my_database": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://localhost"
]
}
}
}
Commands
| Command | Description |
|---|---|
| zene | Launch the local agent in the current directory |
| --yolo | Auto-approve Write / Edit / Bash |
| --sandbox <profile> | Keel profile: off, workspace, read-only, strict, or custom |
| -p / --prompt | Run a single headless prompt; optional --output-format json |
| --worktree | Run the session in a dedicated git worktree under .zene/worktrees/ |
| sessions | List saved conversation sessions for the current directory |
| --session <id> | Resume a previous conversation session by ID |
| mcp doctor | Probe configured MCP servers |
| acp | Speak Agent Client Protocol over stdio JSON-RPC |
Configure
Configure Zene globally in ~/.zene/config.toml or override per project in
.zene/config.toml. Set provider keys in the file or via environment variables.
Custom Keel profiles live in ~/.zene/sandbox.toml.
# ~/.zene/config.toml
provider = "openai" # "openai" or "anthropic"
model = "gpt-4o"
include_workspace_context = true
permission_mode = "default" # default | accept_edits | dont_ask | bypass
[sandbox]
profile = "workspace" # off | workspace | read-only | strict | custom
[compaction]
trigger_ratio = 0.85
min_keep_messages = 20
[web_search]
provider = "tavily" # or "duckduckgo"