Skip to main content

brainwires_knowledge/knowledge/
mod.rs

1//! # Brainwires Brain — Central Knowledge Module
2//!
3//! The canonical home for all knowledge systems in the Brainwires Agent Framework:
4//!
5//! - **Knowledge Systems**: BKS (behavioral truths) and PKS (personal facts)
6//! - **Entity Graph**: Entity types, entity store, relationship graph
7//! - **Brain Client**: Persistent thought storage with semantic search
8//! - **Thought Types**: Categories, sources, and metadata
9//! - **Fact Extraction**: Automatic categorization and tag extraction
10//!
11//! ## Library Usage
12//!
13//! ```no_run
14//! use brainwires_knowledge::knowledge::BrainClient;
15//!
16//! #[tokio::main]
17//! async fn main() -> anyhow::Result<()> {
18//!     let client = BrainClient::new().await?;
19//!     Ok(())
20//! }
21//! ```
22
23/// Knowledge systems (BKS and PKS).
24pub mod bks_pks;
25/// Persistent thought storage with semantic search.
26pub mod brain_client;
27/// Memory bank configuration: mission, directives, disposition traits.
28pub mod config;
29/// Entity types and store for the knowledge graph.
30pub mod entity;
31/// Automatic fact extraction from text.
32pub mod fact_extractor;
33/// Entity relationship graph storage and queries.
34pub mod relationship_graph;
35/// Thought types, categories, and sources.
36pub mod thought;
37/// Request/response types for MCP tool endpoints.
38pub mod types;
39
40// Re-export main types
41pub use brain_client::BrainClient;
42pub use config::{DispositionTrait, MemoryBankConfig};
43pub use entity::{
44    ContradictionEvent, ContradictionKind, Entity, EntityStore, EntityStoreStats, EntityType,
45    ExtractionResult, Relationship,
46};
47pub use relationship_graph::{EdgeType, EntityContext, GraphEdge, GraphNode, RelationshipGraph};
48pub use thought::{Thought, ThoughtCategory, ThoughtSource};
49pub use types::{
50    CaptureThoughtRequest, CaptureThoughtResponse, DeleteThoughtRequest, DeleteThoughtResponse,
51    GetThoughtRequest, GetThoughtResponse, ListRecentRequest, ListRecentResponse,
52    MemoryStatsRequest, MemoryStatsResponse, SearchKnowledgeRequest, SearchKnowledgeResponse,
53    SearchMemoryRequest, SearchMemoryResponse,
54};