Orchestration with a declared loop
An agent is created with its reasoning loop, tool access and persona reference, and the runtime carries it from input through to action without the caller driving each step.
An agent framework that describes an agent the way you would describe a colleague: what they can do, how they think, how they talk, what they notice, and what they habitually do when something happens. Runs, steps and tool calls are tracked end to end, checkpoints pause a run for human approval, and memory is scoped per agent per tenant.
Skills, traits and behaviours combine into a persona an agent runs as, so a personality is something you can version and diff.
OnRunCompleted, OnToolFailed and sixteen others, so metrics and audit trails attach without the core changing.
Every agent, run, skill and persona is scoped to a tenant through context, which makes a cross-tenant read impossible.
The runtime agents run inside: a reasoning loop, the persona it wears and the store both are kept in.
An agent is created with its reasoning loop, tool access and persona reference, and the runtime carries it from input through to action without the caller driving each step.
Skills carry tool mastery levels and guidance notes. Traits carry dimensional values that move tone and style. A persona is the composition, which makes a personality something you can diff.
Agents, runs, skills and personas all carry their tenant on the context, so cross-tenant access is structurally impossible.
Every domain entity is a Go interface, fifty methods across eight sub-interfaces. In-memory for development, Postgres for production, and your own if neither fits.
OnRunCompleted, OnToolFailed and sixteen more. Metrics, audit trails and custom behaviour attach at the edges of a run.
A skill declares which tools it covers and how well, with notes the agent reads before acting. Traits sit alongside as dimensional values that shape behaviour.
Skills, traits, behaviours, cognitive and communication styles, perception.
A switchable identity composing the other six.
Runs, steps and tool calls, each transition recorded.
Human-in-the-loop gates at declared decision points.
Cortex is a Go framework for building agents that are described the way you would describe a colleague, rather than as a single long system prompt. An agent is composed from primitives that can be versioned, swapped and evaluated independently.
The reason for the decomposition is maintenance. A 900-line system prompt cannot be tested, nobody can say which paragraph is load-bearing, and fixing one behaviour reliably breaks another. Each primitive here can be evaluated against a Sentinel suite on its own.
Runs, steps and tool calls are tracked through a state machine with full observability. Memory is split into conversation history, bounded working memory and summaries, scoped per agent per tenant. Checkpoints are human-in-the-loop approval gates that pause a run until someone acts.
Identifiers are TypeIDs: twelve type-prefixed, UUIDv7-based and K-sortable, so an id in a log line tells you what it refers to and roughly when it was created.
Sixteen lifecycle hooks with type-cached dispatch, so an unimplemented hook costs nothing. Two extensions ship in-tree: Prometheus-compatible metrics with eleven counters, and a structured audit trail covering eighteen actions across eight resource types.
Storage is a composite interface of eight sub-interfaces. A production PostgreSQL store using bun with embedded migrations, and an in-memory store for tests, both satisfy it.
Cortex handles the episode. KGKit handles what survives it. At episode close, conclusions are emitted as typed claims carrying the observations they rest on, and written into the graph as revisable edges. Weave supplies retrieval, Nexus routes the provider traffic, Shield scans input and output, and Sentinel evaluates the result.
Shipping something on Cortex? Nobody is listed here yet. Tell me what you built and you will be the first.
Get listed →