Introduction
Infrastructure for building proactive AI agents.
Zgent (pronounced /ziː-dʒent/, zee-gent) is an infrastructure for building proactive agents with built-in AI coding abilities.
It provides the scheduling, state management, and coordination layer for AI agent engines like Claude Code and Codex. Think of it as "Kubernetes for AI Agents" — it doesn't re-implement agent logic, but orchestrates when, how, and where agents operate.
Why Zgent?
Most agent frameworks compete on "who can call LLMs better" — a race to the bottom as providers improve their native SDKs. Zgent takes a different approach:
| Traditional frameworks | Zgent |
|---|---|
| Re-implement agent logic | Leverage existing engines (Claude, Codex) |
| Reactive (user-initiated) | Proactive (scheduled, event-driven) |
| Stateless or basic state | First-class state management |
| "Better LLM calls" | "Better agent orchestration" |
Agents as infrastructure
AI coding agents are transitioning from applications to programmable infrastructure — the same way Docker containers evolved from standalone apps into orchestrated services:
Container world:
Docker = Container Runtime
Kubernetes = Container Orchestration
Agent world:
Claude Code / Codex = Agent Runtime (Execution Engine)
Zgent = Agent Orchestration (Scheduling + State + Communication)Core concepts at a glance
| Concept | What it does | Examples |
|---|---|---|
| Channel | Defines when and how agents are triggered | CronChannel, HttpChannel, WebSocketChannel, FileWatchChannel |
| Context | Manages conversation state and history | Session snapshots, token tracking, message history |
| Agent | Defines agent behavior and capabilities | System prompts, tools, hooks, model selection |
| Dispatcher | Routes messages to the right agent instance | One-per-session, shared, or custom routing |
| Hook | Intercepts and modifies agent behavior at runtime | Pre/post tool use, message filtering, audit logging |
| Tool | Extends agent capabilities with custom functions | API calls, database queries, file operations |