Zgent
Getting Started

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 frameworksZgent
Re-implement agent logicLeverage existing engines (Claude, Codex)
Reactive (user-initiated)Proactive (scheduled, event-driven)
Stateless or basic stateFirst-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

ConceptWhat it doesExamples
ChannelDefines when and how agents are triggeredCronChannel, HttpChannel, WebSocketChannel, FileWatchChannel
ContextManages conversation state and historySession snapshots, token tracking, message history
AgentDefines agent behavior and capabilitiesSystem prompts, tools, hooks, model selection
DispatcherRoutes messages to the right agent instanceOne-per-session, shared, or custom routing
HookIntercepts and modifies agent behavior at runtimePre/post tool use, message filtering, audit logging
ToolExtends agent capabilities with custom functionsAPI calls, database queries, file operations

On this page