Brain, Forge, Cortex, and workers
Status: Ready
Article ID: 002
Truth label: Current
Audience: New builder
Reader outcome: Place each system responsibility in the correct component.
Related articles: 001, 003, 004
Target week: 01
Last verified: 2026-09-13
Technical reviewer: Codex source audit
Editorial reviewer: Codex editorial audit
Start with ownership
Distributed agent systems become hard to reason about when several services appear to own the same decision. AGENTASIAN uses four clear boundaries.
| Component | Owns | Does not own |
|---|---|---|
| Cortex | Browser state, forms, status rendering, operator controls | Authoritative task rules |
| Brain | Chat, retrieval, memory, provider selection, response shaping | Forge task execution |
| Forge Central | Projects, tasks, claims, leases, checkpoints, pipelines, traces | Repository file edits |
| Forge Worker | Context assembly, CLI process, cancellation, verification, result delivery | Final task-state authority |
Cortex is the control surface
Cortex is a static JavaScript application. It shows the operator what is running, what is waiting, what failed, and what requires approval. It sends requests to Brain and Central.
Keeping business rules out of Cortex prevents a browser refresh or an edited front end from changing the real task state. Central validates every state transition again.
Brain is the context service
Brain assembles chat requests and retrieves bounded context from memory. It also manages provider controls, reasoning lenses, voice registers, feedback, and chat-turn traces.
When a worker prepares a task, it can ask Brain for current rules, session context, canonical project memory, and related learnings. Retrieved material is inserted as evidence, not as a higher-priority instruction.
Forge Central is the control plane
Central is the single active writer for its data root. It decides whether a worker may claim a task, which attempt is current, whether a result is stale, and whether completed work moves to done or a checkpoint.
The claim transaction rechecks task state, dependencies, worker identity, engine, capabilities, and pins. It then issues a run id, a fence, a lease, and, for credentialed workers, a run token.
Workers own execution
A worker runs on the machine that can access the project checkout. It polls Central, claims one eligible task, builds the prompt, launches an adapter, runs verification, writes the terminal result to a local outbox, and delivers it to Central.
Workers do not listen on a network port. This reduces the exposed execution surface. It also means every worker must be able to reach Central and must have the selected CLI installed and authenticated.
Follow one task
1. Operator creates a task in Cortex.
2. Central stores it as pending.
3. An eligible worker polls and claims it.
4. The worker asks Brain for bounded context.
5. The worker launches the coding CLI in the project directory.
6. The worker renews its lease and watches for cancellation.
7. Verification runs after the engine returns.
8. The worker saves and sends the result.
9. Central authenticates, checks the fence, and applies supervision.
10. Cortex shows the new state and evidence.
This sequence provides a useful debugging rule: inspect the component that owns the missing transition. A display problem starts in Cortex. A retrieval problem starts in Brain. A claim or state problem starts in Central. A process or verification problem starts on the worker.
Current limits
Clear ownership does not create complete isolation. Cortex, Brain, Central, and workers still operate for one trusted operator and trusted repositories. The current client-scope and service-authority work must not be described as a public multi-tenant boundary.
Next lesson
Continue with Run your first task.
Derivative map
- Weekly package: WEEK-01
- Long video: VIDEO-W01-LONG
- Shorts: SHORT-W01-PROBLEM, SHORT-W01-MECHANISM, SHORT-W01-WARNING
- Email: EMAIL-W01
- LinkedIn: LI-W01-A, LI-W01-B
- X: X-W01-A, X-W01-B
- Visual: VISUAL-W01
Review record
- Technical claims checked against the current canonical sources.
- Truth label and nearby limitations reviewed.
- Examples checked for secrets, client material, and private paths.
- Editorial structure, internal links, and repository voice reviewed.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13