Introduction
A Go runtime that enables developers to build trustworthy, adaptable AI-powered systems by designing constraints, not scripting intelligence.
What is agent-go?
agent-go is a state-driven agent runtime for Go that enables developers to build trustworthy, adaptable AI-powered systems. Instead of scripting intelligence with prompts, you design the structure and constraints of agent behavior.
The key principle: Trust is the product. Intelligence is constrained by design, not hope.
Why agent-go?
Structural Trust
Side effects only occur in explicitly designated states. The planner cannot bypass constraints no matter what.
Testable Without LLMs
Use ScriptedPlanner for deterministic tests. No API calls needed during development.
Production Ready
Built-in resilience patterns: circuit breakers, retry, bulkheads, timeouts. Battle-tested via Fortify.
Domain-Driven Design
Clean architecture with separated domain, application, and infrastructure layers.
Core Design Principles
- States are constraints, not behaviors - The canonical state machine defines where actions can occur
- Planners propose, engines dispose - All decisions are validated against policies
- Evidence is append-only - Complete audit trail of all operations
- Optional everything - No required external services for basic operation
Design Invariants
These invariants hold in all code paths:
- Tool eligibility - Tools only run in explicitly allowed states
- Transition validity - State changes follow the defined graph
- Approval enforcement - Destructive actions require approval
- Budget enforcement - Limits are never exceeded
- State semantics - Only Act state allows side effects
- Tool uniqueness - Tool names are unique per registry
- Run lifecycle - Runs progress through states to terminal state
- Evidence accumulation - Evidence is append-only, order preserved