Skip to content

lipish/zene

Repository files navigation

Zene

A High-Performance Multi-Agent Coding Engine with Autonomous Planning and Reflection

Crates.io Build Status License

InstallationUsageDocumentationContributing

Zene Terminal Demo

Philosophy

Zene combines "Zen" and "Engine".

  • Zen: Minimalist, focused, and distraction-free. We avoid bloated frameworks to provide a pure coding flow.
  • Engine: High-performance, reliable, and powerful. Written in Rust to be the robust core driving your intelligent agents.

We believe in:

  • Single Binary: No complex runtime dependencies.
  • Explicit Configuration: No magic, just standard environment variables.
  1. Plan: Generates a DAG of tasks.
  2. Execute: Runs real commands in your shell (Async/Non-blocking).
  3. Reflect: Analyzes stdout/stderr and file changes.

Features

  • Async Native: Built on tokio, Zene is 100% non-blocking and ready for high-concurrency web integration.
  • Streaming Output: Real-time "Thought Delta" events allow for immersive, typewriter-style UI experiences.
  • Workspace Awareness: Real-time FileStateChanged events enable IDE-like file tree updates in frontend integrations.
  • Self-Healing: The Reflector loop automatically fixes linting errors and failed tests.

Key Features

  • Model Agnostic: Built on llm-connector, supporting OpenAI, Anthropic, DeepSeek, Google Gemini, and more.
  • Context Aware: Uses tree-sitter for syntax-level code analysis and efficient file walking to understand project structure.
  • Safe Execution: Features an OODA (Observe-Orient-Decide-Act) loop with "Dry Run" capabilities and atomic file operations.
  • JSON-RPC Server: Functions as a standard server, exposing its capabilities to IDEs and other tools.
  • Blazing Fast: Written in pure Rust with async I/O.

Installation

Pre-built Binaries

Download the latest release for your platform from the Releases Page.

From Crates.io

cargo install zene

Build from Source

git clone https://github.com/lipish/zene.git
cd zene
cargo build --release

Usage

1. Set Environment Variables

Zene prioritizes DeepSeek but supports OpenAI as a fallback.

2. Run a Task (One-Shot)

Execute a single instruction directly from the command line.

# Create a file
zene run "Create a hello.txt with content 'Hello Zene'"

# Refactor code (Context aware)
zene run "Refactor src/main.rs to extract the CLI logic into a separate module"

# Fetch Web Content
zene run "Fetch https://example.com and summarize it in README.md"

3. Server Mode

Start Zene as a JSON-RPC server (over Stdio). This mode supports persistent sessions and multi-turn conversations.

zene server

JSON-RPC API Example

Request (Start Session):

{
  "jsonrpc": "2.0",
  "method": "agent.run",
  "params": {
    "instruction": "Analyze the project structure",
    "session_id": "my-session-001"
  },
  "id": 1
}

Sessions are automatically persisted to ~/.zene/sessions/<session_id>.json.

Documentation

Detailed documentation is available at zene.run (or in the www/ directory):

Contributing

Contributions are welcome! Please read our architecture documentation to understand the core philosophy before submitting PRs.

License

MIT

About

A self-healing AI coding engine written in Rust. It Plans, Executes, and Reflects—fixing its own bugs before you even see them.

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors