Skip to content

Repository files navigation

Zero — Universal Agent Runtime Platform

简体中文: README.zh-CN.md

What is Zero?

Zero is a universal Agent runtime platform built with Rust, designed for building intelligent, extensible AI applications through a trait-driven architecture.

Core Values

  • Trait-Driven — All core capabilities are swappable through Rust Traits
  • High Performance — Efficient concurrent execution, minimal resource footprint
  • Fully Extensible — Core stays minimal, capabilities come from extensions

Architecture Overview

┌─────────────────────────────────────────┐
│ Applications Layer (CLI/Web) │
├─────────────────────────────────────────┤
│ Core Kernel (Trait-Based) │
│ Agent | Tool | Memory | Provider │
├─────────────────────────────────────────┤
│ Extension Ecosystem │
│ Tools | Providers | Channels │
└─────────────────────────────────────────┘

Learning Path

Choose your journey based on what you want to do:

Quick Start (5 min)

Get Zero running in under 5 minutes. Install, write your first Agent, run it.

Perfect for: Anyone who wants to see it work immediately

Core Concepts (15 min)

Understand the Trait-driven design philosophy and 5 core principles that make Zero extensible.

Perfect for: Developers who want to understand the "why" behind the design

Trait Architecture (30 min)

Deep dive into each core Trait: Agent, Tool, Memory, Provider, Channel. Learn how they interact and how to extend them.

Perfect for: Contributors and advanced users building custom implementations

Code Examples (30 min)

From simple "Hello Agent" to multi-Agent coordination. Real, runnable code with detailed explanations.

Perfect for: Learners who prefer "show me the code"

API Reference

Complete API documentation for all core modules. Type signatures, parameters, return values.

Perfect for: Building with Zero, looking up specific APIs

Hooks System (20 min)

Learn about Zero's plugin/extension system. 6 hook types, when to use them, implementation patterns.

Perfect for: Building extensions and customizations

Contributing Guide

Development setup, coding standards, Git workflow, testing requirements. Everything you need to contribute.

Perfect for: Contributors to Zero itself

5-Minute Example

use zero_core::{Agent,AgentContext};use async_trait::async_trait;structMyAgent;#[async_trait]implAgentforMyAgent{asyncfnexecute(&self,context:&AgentContext) -> Result<String>{Ok(format!("Hello from {}!", context.name))}}#[tokio::main]asyncfnmain() -> Result<()>{let agent = MyAgent;let context = AgentContext::new("MyAgent");let result = agent.execute(&context).await?;println!("{}", result);Ok(())}

Feature Highlights

  • Multi-Model Support — OpenAI, Anthropic, Ollama, and custom providers
  • Unified Tool System — JSON/YAML tools, MCP integration, Rust implementations
  • Layered Memory — Agent isolation + global shared memory
  • Channel System — CLI, Web, Discord, Email, and more
  • Hook System — Extensibility at every critical point
  • Production Ready — Error handling, async/await, type safety

Project Status

  • Phase 1: Core Trait definitions and basic execution
  • Phase 2: Extension ecosystem (tools, memory, providers)
  • Phase 3: Multi-modal UIs (Web, Desktop)
  • Phase 4: Advanced features (security, RAG)

Installation

# Build from source
cargo build -p zero-core
# Run CLI
cargo run -p zero-cli -- --help

Run The Project

  1. Create ~/.zero/config.yaml:
name: "Zero Agent"provider:
name: "openai"# or anthropic / ollamaapi_key: "your-api-key"model: "gpt-4o"settings:
api_bind: "127.0.0.1:3001"# optional, zero-api bind address# api_host/api_port are also supported when api_bind is not set# settings:# api_host: "0.0.0.0"# api_port: 3000
  1. Build binaries:
cargo build
  1. Run CLI:
cargo run -p zero-cli -- --provider openai
  1. Run API server:
cargo run -p zero-api

zero-api bind address resolution order:

  • ZERO_API_BIND environment variable (highest priority)
  • settings.api_bind in ~/.zero/config.yaml
  • settings.api_host + settings.api_port in ~/.zero/config.yaml
  • default: 0.0.0.0:3000

Example:

ZERO_API_BIND=127.0.0.1:3100 cargo run -p zero-api

For detailed setup instructions, see Getting Started.

Roadmap

  • Short-term: Documentation improvements, community examples
  • Medium-term: Performance optimization, advanced RAG capabilities
  • Long-term: Full multi-Agent team coordination, autonomous agents

Contributing

Zero welcomes contributions! See Contributing Guide for:

  • Development environment setup
  • Coding standards and conventions
  • Git workflow and commit process
  • Testing requirements

License

MIT


Have questions? Check out our FAQ section or open an issue on GitHub.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages