Expand description
Cognitive architecture — optional inner subgraph for agent reasoning.
When present on an Agent, the cognitive architecture
decomposes the agent’s reasoning into parallel cognitive streams that process
the same input through different lenses (emotional, logical, devil’s advocate, etc.)
and synthesize the results before the main LLM call.
§How it works
None→ normal execution. Single LLM call, zero overhead.Some(CognitiveArchitecture)→ the agent carries an inner subgraph. When a node calls the LLM, the cognitive architecture runs first: parallel streams process the agent’s self-context, a hippocampus node synthesizes them, and the main LLM receives an enriched prompt.
§Multi-model
Each stream can use a different (typically smaller/cheaper) model.
The main model is always the agent’s model_preference.primary.
Streams do pre-processing — the main model gets richer input.
§Runtime wiring
The types here define the cognitive architecture configuration and state.
The actual inner graph execution is wired by pe-runtime (future plan).
The inner graph uses the same CompiledGraph<CognitiveState> primitives
from pe-graph — no new engine needed.
Structs§
- Cognitive
Architecture - Defines how an agent’s reasoning is decomposed into parallel streams.
- Cognitive
State - State for the inner cognitive subgraph.
- Cognitive
State Update - Partial update for
CognitiveState. - Cognitive
Stream - A single cognitive processing stream — one lens on the agent’s identity.
Enums§
- Synthesis
Strategy - How cognitive stream outputs are combined into the final result.