Zeus is a next-generation coding agent harness that helps you build better software, faster. It combines intelligent automation, self-improvement, and robust guardrails to deliver a reliable and continuously evolving development partner.
Zeus is a local-first desktop coding-agent shell built with Tauri 2 + React + TypeScript + Rust. The current production surface is a three-panel desktop UI with real provider dispatch (MiniMax, OpenAI, Anthropic), SQLite-backed session state, a Rust agent-runtime service with an approval queue and structured observations, a transactional multi-file patch engine, semantic code search, skill discovery and injection, image and file attachments, project-scoped sessions, slash commands, harness evolution, and visible tool-run panels.
|
Streaming chat with full project context, file awareness, and automatic skill injection. Provider keys for MiniMax, OpenAI, and Anthropic are managed in Settings and never leak through frontend state. |
A persistent Rust runtime owns sessions, active plans, tool-run records, approvals, browser sessions, project memories, and structured code-search observations. Frontend talks to it through a typed Tauri command bridge. |
|
|
|
|
Risky tool calls become |
One tool, eight actions: |
|
|
|
Project-scoped retrieval with source / provenance, tags, stale flags, and supersession links. Deterministic lexical matching for now so it stays local and testable; embeddings can drop in later behind the same interface. |
Reads |
Local |
|
Runs shell commands, applies search-and-replace edits, writes files with |
The |
Harness proposals persist across sessions with full approve / reject / edit / apply-once / rollback state. Every change is snapshotted into |
- Tauri 2 desktop application with a React + TypeScript frontend and Rust backend.
- Compact three-panel coding-agent interface with Home, Sessions, Skills, Memory, Harness Evolution, and Settings views.
- Bottom composer designed as the only file-input surface; grows upward from a compact one-line input.
- Run / stop state for active chat requests, an in-progress agent-run progress bubble, and a visible tool-run panel.
- Cross-platform build configuration through Tauri scripts.
- Rust-side provider trait and dispatcher for chat backends.
- Built-in provider registry for MiniMax, OpenAI, and Anthropic on the Rust side.
- MiniMax M3 is the default wired frontend provider, calling the OpenAI-compatible chat-completions endpoint at
https://api.minimax.io/v1. - Provider API keys are managed in Settings: password-style inputs save to
<app_data>/provider-keys.jsonand are injected into the process env at startup. - Provider responses are normalized into a shared
{ content, model, usage }shape; reasoning blocks are stripped before display. - Missing API keys and provider failures return public errors without exposing secret values.
- Persistent Rust service (
src-tauri/src/agent_runtime.rs) owns sessions, plans, tool-run records, approvals, browser sessions, project memories, and structured code-search observations. - Tauri command bridge (
src-tauri/src/agent_runtime_commands.rs) exposes runtime health, status, sessions, plans, approvals, browser actions, memory, and structured search to the React app. - React client lives at
src/providers/agentRuntime.ts; the bounded observe-and-replan driver is insrc/agentRuntimeDeepLoop.ts. - Approval queue: model-generated tool blocks become
PendingApprovalrecords with risk class, action labels, affected files, and an optional diff preview before risky execution proceeds. - Agent loop policy (see
docs/agent-loop-and-browser-testing.md): a failed tool result is an observation, the next iteration classifies it as workspace / argument / policy / transient / unknown, re-plans with the failure output, and only stops after the bounded recovery budget is exhausted or a policy guard requires a human decision.
- Slash commands
/run,/read,/write,/edit,/ls,/git,/test,/config,/goal,/compact,/new,/stopall dispatch to typed Rust Tauri commands. - The chat model can also emit a fenced
```tool ```block listing JSON steps; the composer parses it after each response and callsrunAgentTask. - Results land as a chat bubble and in the Tool Run panel below the composer.
- The Tool Run panel renders
ShellCommandResult,WriteWorkspaceFileResult,ApplyWorkspaceEditResult, andAgentRunResultwith diffs, files touched, step logs, rollback plans, and any proposed harness rule. - Multi-turn chaining: after
runAgentTaskreturns, the chat driver re-prompts the model with the tool result appended to the conversation history (recursiverunChatTurn, bounded byMAX_TOOL_TURNS = 6).
src-tauri/src/patch.rsaccepts a multi-file unified-diff blob, parses it intoApplyPatchFileentries, validates every hunk against the on-disk content, stages every change in memory, and only writes if every file applies cleanly.- If any write fails, every previously-modified file is restored to its pre-patch content so the repo is never left half-modified.
- Diff format:
--- a/<path>/+++ b/<path>headers,@@ -old_start,old_count +new_start,new_count @@hunk headers,/-/+line prefixes, with\ No newline at end of filemarkers tolerated.
- Server-side regex-based structural indexer in
src-tauri/src/code_intelligence.rsand the matching TypeScript library atsrc/providers/codeGraph.ts. search_codereturns path, line, snippet, nearest symbol, and a "was this file already read" flag.- Outline extraction covers TypeScript / JavaScript, Rust, and Python with symbol classification for
function,method,class,interface,type,const,enum,struct,trait,mod, andmacro.
- Harness proposal state is visible in the UI with approve / reject / edit / apply-once / rollback actions.
- Proposal edits can be made inline; every action records a
harness_historyrow with a body snapshot. - A default proposal is seeded on first run so the panel is never empty.
- When
runAgentTaskreturns aproposedHarnessRule, the chat replaces the pending proposal with one derived from it.
- Access modes are exposed in the UI: Full, Local, Review, and Locked.
- Mode descriptions are shown in the app and persisted through Rust/SQLite.
- The
policymodule enforces shell, file-write, and approval gates at a binary allow/deny level. Lockeddenies every risky command class and every file write.Reviewrequires explicit approval for both shell and file-write operations.FullandLocalonly require approval for known-risky program names.- Command classification (
Safe,Dependency,Network,Destructive,Privileged) drives the badge color in the Tool Run panel.
- New sessions are created from the UI and saved to SQLite.
- Recent sessions are restored from Rust on app startup.
- Session rename is wired from the sidebar and persisted.
- Project grouping is available through
projectIdandprojectName. /newstarts a new session;/compactkeeps the recent chat window and stores a compact anchor so older turns stop being sent to the model./goalsets or displays an active session goal and surfaces it in the Memory view.
- Skills are discovered recursively from a configurable/local skills directory, so categorized skill packs are supported.
ZEUS_SKILLS_DIRis supported, with packaged resource and development-directory fallbacks.- Skill folders are validated by
SKILL.mdfiles with YAML frontmatter. - Active skill instructions are injected on the Rust side into the next provider call rather than shipping full skill bodies through frontend state.
- Manual slash-selected skills take precedence; otherwise Zeus scores the latest user request against each skill's
nameanddescriptionand injects up to three high-confidence matches. - Skills with
disable-model-invocation: trueare available in the picker but skipped by automatic matching.
- Bottom composer file attachment handling is wired.
- Pasted images from the clipboard are converted into image attachments.
- Image attachments get preview URLs when the runtime supports them.
- Attached files are included in the prompt as structured attachment metadata for the current turn.
- Attachments clear after a successful provider response.
The repository includes scripts for:
npm run typecheck
npm run test
npm run build
npm run tauri:build
cd src-tauri && cargo test
cd src-tauri && cargo fmt -- --checkCurrent coverage spans the frontend shell, composer behavior, session/project flows, slash commands, harness proposal editing, context-window helpers, provider dispatch, skill injection, persistence, the agent runtime loop, the validation module, the patch engine, code-intelligence extraction, and provider defaults.
flowchart LR
User[User] --> UI[React + TypeScript UI]
UI --> Composer[Composer / slash commands / attachments]
UI --> Sessions[Sessions, projects, memory panels]
UI --> Tauri[Tauri command bridge]
Tauri --> Rust[Rust core]
Rust --> Runtime[AgentRuntime service]
Runtime --> SQLite[(SQLite app data: zeus.db)]
Runtime --> Memory[(Memory sidecar)]
Rust --> Patch[Patch engine]
Rust --> CodeIntel[Code intelligence]
Rust --> Skills[Local skills directory]
Rust --> Providers[Provider dispatcher]
Providers --> MiniMax[MiniMax M3]
Providers --> OpenAI[OpenAI]
Providers --> Anthropic[Anthropic]
Runtime --> Browser[Browser tool contract]
Runtime --> GH[GitHub workflow]
UI --> Harness[Harness evolution UI]
Harness --> SQLite
The frontend owns the visual shell, composer, views, temporary UI state, and provider-facing context assembly. The Rust core owns native commands, the agent runtime service, SQLite persistence, provider dispatch, provider HTTP calls, the patch engine, code intelligence, skill discovery, skill injection, and the policy gate that enforces the access modes.
| Requirement | Notes |
|---|---|
| Node.js | Node.js 22 or newer is recommended. |
| npm | Used for frontend dependencies and scripts. |
| Rust stable | Required by Tauri. Install with rustup. |
| Cargo | Installed with Rust and used for the Tauri/Rust core. |
| Git | Required to clone and contribute to the repository. |
| WebView runtime | Windows needs Microsoft Edge WebView2 Runtime. Current Windows 10/11 machines usually already have it. |
| C++ build tools on Windows | Install Microsoft Visual Studio Build Tools with the Desktop development with C++ workload if Rust native dependencies fail to compile. |
| Xcode tools on macOS | Install Xcode Command Line Tools with xcode-select --install. |
| Linux Tauri packages | Install WebKitGTK, AppIndicator, librsvg, and build tooling for your distro. |
| Provider API key | Required for live provider calls. MiniMax uses MINIMAX_API_KEY; OpenAI uses OPENAI_API_KEY; Anthropic uses ANTHROPIC_API_KEY. |
Ubuntu packaging dependencies:
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
build-essential \
pkg-config \
curl \
wget \
filegit clone https://github.com/benclawbot/Zeus.git
cd Zeus
npm installConfigure a provider key for live chat:
cp .env.example .env
# add MINIMAX_API_KEY=your_key_here
# optionally add OPENAI_API_KEY=... or ANTHROPIC_API_KEY=...Run the web dev surface:
npm run devRun the Tauri desktop app:
npm run tauri:devBuild the frontend:
npm run buildPackage the desktop app:
npm run tauri:buildnpm run typecheck
npm run test
npm run build
npm run tauri:build
cd src-tauri && cargo test
cd src-tauri && cargo fmt -- --checkZeus reads provider keys from the process environment. .env is loaded on startup when present.
MINIMAX_API_KEY=your_minimax_key
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_keySet ZEUS_SKILLS_DIR to point Zeus at a local skills folder:
ZEUS_SKILLS_DIR=/path/to/skillsIf unset, Zeus checks packaged resources and development paths.
The bundled skills are organized by category. Keep each skill description narrow: it is used for automatic context matching, so broad generic trigger words can make unrelated skills compete.
Use this as the repository description:
Local-first Tauri coding-agent shell with MiniMax M3, a Rust agent-runtime service, transactional multi-file patching, structured code search, an approval queue, and visible harness evolution.
- Do not commit
.envor local API keys. - Provider calls are routed through the Rust side so secrets can stay in the process environment rather than frontend code.
- Access modes are persisted through SQLite and enforced at the Rust
policygate. - File reads are not gated by policy (read-only); shell, file-write, and git-mutation operations all require policy + approval where applicable.
- The Tool Run panel surfaces every policy decision as a colored badge so the user can audit what ran and why.
tauri, coding-agent, minimax, openai, anthropic, react, typescript, rust, sqlite, self-improving, agent-harness, code-graph, unified-diff, semantic-search, agent-runtime, playwright