Documentation
¶
Overview ¶
Package brain is the orchestration loop (the plan's component 3): a stateless harness that claims model_turn work, replays the session's event log into a provider request, streams the model's turn back into Anthropic-native events, and drives the session state machine at turn end. It never runs tools in-process — a tool call is an emitted intent event, and the turn resumes when the matching result event lands (a fresh model_turn item enqueued by the control plane). Any brain can pick up any turn: all durable state is the event log.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Brain ¶
type Brain struct {
// contains filtered or unexported fields
}
Brain runs model turns. All instances are interchangeable ("cattle"): a crashed brain's lease expires and any other replays the session.