pub struct CognitiveState {Show 13 fields
pub input: String,
pub stream_outputs: HashMap<String, LobeOutput>,
pub synthesis_result: Option<String>,
pub budget_tokens: Option<u32>,
pub loaded_memories: Vec<String>,
pub working_notes: Vec<WorkingNote>,
pub current_plan: Option<String>,
pub confidence: f64,
pub quality_trend: Vec<f64>,
pub error_history: Vec<String>,
pub signals: Vec<CognitiveSignal>,
pub negative_knowledge: Vec<NegativeKnowledge>,
pub failure_records: Vec<FailureRecord>,
}Expand description
State for the inner cognitive subgraph.
Defines the fields the cognitive architecture operates on.
Separate from the outer task state. Implements State
so it can be used with CompiledGraph<CognitiveState> directly.
§Merge semantics
Last-value-wins (replace):
input, synthesis_result, budget_tokens, current_plan, confidence
Merge (HashMap extend):
stream_outputs — new keys overwrite, old keys preserved.
Key is CognitiveStream::lens or Lobe::name().
Append (Vec extend):
loaded_memories, working_notes, quality_trend, error_history,
signals, negative_knowledge, failure_records
Fields§
§input: StringThe input prompt/task the agent is processing.
stream_outputs: HashMap<String, LobeOutput>Full outputs from each cognitive lobe, keyed by lobe name.
Stores the complete LobeOutput (content + confidence + signals + metadata)
so the synthesizer receives lossless data. The key is Lobe::name().
synthesis_result: Option<String>The synthesized result from synthesis node.
budget_tokens: Option<u32>Token budget for cognitive processing (fraction of agent’s budget).
loaded_memories: Vec<String>Relevant memories loaded for this cognitive cycle.
working_notes: Vec<WorkingNote>Agent’s scratchpad — structured notes with categories.
current_plan: Option<String>What the agent thinks it should do next.
confidence: f64Confidence level (0.0-1.0), fed from matrix C value when available.
quality_trend: Vec<f64>Rolling quality scores — is the agent getting better or worse?
error_history: Vec<String>Record of errors/failures during this session.
signals: Vec<CognitiveSignal>Signals emitted by lobes for the outer graph to read.
negative_knowledge: Vec<NegativeKnowledge>Negative knowledge — things the agent learned NOT to do.
failure_records: Vec<FailureRecord>Structured failure records for pattern recognition.
Trait Implementations§
Source§impl Clone for CognitiveState
impl Clone for CognitiveState
Source§fn clone(&self) -> CognitiveState
fn clone(&self) -> CognitiveState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more