Chronos

A Go framework for building durable, scalable AI agents.
Define agents in YAML. Connect any LLM. Let them collaborate.

$ go get github.com/spawn08/chronos
14+
LLM Providers
10
Storage Adapters
4
Team Strategies
6
Middleware Hooks

Why Chronos?

Agentic software is fundamentally different from traditional request-response systems. Agents reason, call tools, pause for human approval, and resume later. They collaborate with other agents, maintain memory across sessions, and make decisions under uncertainty.

Chronos provides the full stack for building this kind of software in Go:

Layer Responsibility
SDK Agent builder, skills, memory, knowledge, teams, inter-agent protocol
Engine StateGraph runtime, model providers, tool registry, guardrails, streaming
ChronosOS HTTP control plane, auth, tracing, audit logs, approval enforcement
Storage Pluggable persistence for sessions, checkpoints, memory, vectors

Key Features

YAML-First Config

Define agents, teams, and models in .chronos/agents.yaml with environment variable expansion and defaults inheritance. Run from CLI with zero Go code.

🤖 14+ LLM Providers

OpenAI, Anthropic, Gemini, Mistral, Ollama, Azure OpenAI, Groq, DeepSeek, and any OpenAI-compatible endpoint. Swap with one line.

👥 Multi-Agent Teams

Sequential, parallel, router, and coordinator strategies. Define teams in YAML and run from the CLI.

🔌 Durable Execution

StateGraph runtime with checkpointing, interrupt nodes, and resume. Survive crashes and restart exactly where you left off.

🛡 Guardrails & Hooks

Input/output validation, retry, rate limiting, cost tracking, caching, and observability. All composable via middleware.

🧠 Memory & RAG

Short-term and long-term memory with LLM-powered extraction. Vector-backed retrieval injected into agent context.

📦 10 Storage Adapters

SQLite, PostgreSQL, Redis, MongoDB, DynamoDB, Qdrant, Pinecone, Weaviate, Milvus. One interface, any backend.

💬 Context Summarization

Automatic conversation summarization when approaching token limits. Rolling summaries preserve key facts within the context window.

🚀 Production Ready

Docker, Helm chart with HPA and Ingress, CI/CD with GitHub Actions, cross-platform binaries.


Architecture

┌──────────────────────────────────────────────────────────────┐
│                   ChronosOS  (Control Plane)                 │
│   Auth & RBAC  │  Tracing & Audit  │  Approval  │  HTTP API │
└────────────────────────────┬─────────────────────────────────┘
                             │
┌────────────────────────────▼─────────────────────────────────┐
│                         Engine                               │
│  StateGraph Runtime │ Model Providers │ Tools │ Guardrails   │
│  Hooks & Middleware │ SSE Streaming                          │
└────────────────────────────┬─────────────────────────────────┘
                             │
┌────────────────────────────▼─────────────────────────────────┐
│                          SDK                                 │
│  Agent Builder │ Teams │ Protocol Bus │ Skills │ Memory/RAG  │
└────────────────────────────┬─────────────────────────────────┘
                             │
┌────────────────────────────▼─────────────────────────────────┐
│                    Storage  (Pluggable)                       │
│  SQLite │ PostgreSQL │ Redis │ MongoDB │ DynamoDB            │
│  Qdrant │ Pinecone │ Weaviate │ Milvus                      │
└──────────────────────────────────────────────────────────────┘

Quick Start

YAML approach — define an agent and run it:

# .chronos/agents.yaml
agents:
  - id: assistant
    name: Assistant
    model:
      provider: openai
      model: gpt-4o
      api_key: ${OPENAI_API_KEY}
    system_prompt: You are a helpful assistant.
export OPENAI_API_KEY=sk-...
go run ./cli/main.go run "What is the capital of France?"

Go builder — for programmatic control:

a, _ := agent.New("chat", "Chat Agent").
    WithModel(model.NewOpenAI(os.Getenv("OPENAI_API_KEY"))).
    WithSystemPrompt("You are a helpful assistant.").
    Build()

resp, _ := a.Chat(ctx, "What is the capital of France?")
fmt.Println(resp.Content)