pub struct CognitiveArchitecture {
pub streams: Vec<CognitiveStream>,
pub synthesis: SynthesisStrategy,
pub budget: CognitiveBudget,
pub memory_config: MemoryConfig,
pub self_model: SelfModel,
}Expand description
Defines how an agent’s reasoning is decomposed into parallel streams.
This is a property of the agent, not the graph. The graph is oblivious —
a node calls llm.complete(), and the cognitive architecture intercepts
to run the inner subgraph transparently.
§Example
ⓘ
let cognitive = CognitiveArchitecture::new()
.add_stream(CognitiveStream::new("logical", "Analyze purely logically."))
.add_stream(CognitiveStream::new("antithink", "Challenge every assumption."))
.with_synthesis(SynthesisStrategy::Integrate);
let agent = Agent::new("analyst", "You analyze data.")
.with_cognitive_architecture(cognitive);Fields§
§streams: Vec<CognitiveStream>Parallel cognitive streams — each processes input through a different lens.
synthesis: SynthesisStrategyHow stream outputs are combined into the final enriched prompt.
budget: CognitiveBudgetResource limits for cognitive processing.
memory_config: MemoryConfigMemory tier configuration.
self_model: SelfModelThe agent’s self-model (self/user/collective context).
Implementations§
Source§impl CognitiveArchitecture
impl CognitiveArchitecture
Sourcepub fn add_stream(self, stream: CognitiveStream) -> Self
pub fn add_stream(self, stream: CognitiveStream) -> Self
Add a cognitive stream.
Sourcepub fn with_synthesis(self, strategy: SynthesisStrategy) -> Self
pub fn with_synthesis(self, strategy: SynthesisStrategy) -> Self
Set the synthesis strategy.
Sourcepub fn with_budget(self, budget: CognitiveBudget) -> Self
pub fn with_budget(self, budget: CognitiveBudget) -> Self
Set the cognitive budget.
Sourcepub fn with_memory_config(self, config: MemoryConfig) -> Self
pub fn with_memory_config(self, config: MemoryConfig) -> Self
Set the memory configuration.
Sourcepub fn with_self_model(self, model: SelfModel) -> Self
pub fn with_self_model(self, model: SelfModel) -> Self
Set the self-model.
Trait Implementations§
Source§impl Clone for CognitiveArchitecture
impl Clone for CognitiveArchitecture
Source§fn clone(&self) -> CognitiveArchitecture
fn clone(&self) -> CognitiveArchitecture
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CognitiveArchitecture
impl Debug for CognitiveArchitecture
Source§impl Default for CognitiveArchitecture
impl Default for CognitiveArchitecture
Source§impl<'de> Deserialize<'de> for CognitiveArchitecture
impl<'de> Deserialize<'de> for CognitiveArchitecture
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CognitiveArchitecture
impl RefUnwindSafe for CognitiveArchitecture
impl Send for CognitiveArchitecture
impl Sync for CognitiveArchitecture
impl Unpin for CognitiveArchitecture
impl UnsafeUnpin for CognitiveArchitecture
impl UnwindSafe for CognitiveArchitecture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more