Skip to main content

terraphim_agent_evolution/
lib.rs

1//! # Terraphim Agent Evolution System
2//!
3//! A comprehensive agent memory, task, and learning evolution system that tracks
4//! the complete development and learning journey of AI agents over time.
5//!
6//! ## Core Features
7//!
8//! - **Versioned Memory**: Time-based snapshots of agent memory states
9//! - **Task List Evolution**: Complete lifecycle tracking of agent tasks
10//! - **Lessons Learned**: Comprehensive learning and knowledge retention system
11//! - **Goal Alignment**: Continuous tracking of agent alignment with objectives
12//! - **Evolution Visualization**: Tools to view agent development over time
13//!
14//! ## Architecture
15//!
16//! The evolution system consists of three core tracking components that work together:
17//!
18//! - **Memory Evolution**: Tracks what the agent remembers and knows
19//! - **Task List Evolution**: Tracks what the agent needs to do and has done
20//! - **Lessons Evolution**: Tracks what the agent has learned and how it applies knowledge
21//!
22//! All components use terraphim_persistence for storage with time-based versioning.
23
24pub mod error;
25pub mod evolution;
26pub mod integration;
27pub mod lessons;
28pub mod llm_adapter;
29pub mod memory;
30pub mod tasks;
31pub mod viewer;
32pub mod workflows;
33
34pub use error::*;
35pub use evolution::*;
36pub use integration::*;
37pub use lessons::*;
38pub use llm_adapter::*;
39pub use memory::*;
40pub use tasks::*;
41pub use viewer::*;
42
43/// Result type for agent evolution operations
44pub type EvolutionResult<T> = Result<T, EvolutionError>;
45
46/// Agent identifier type
47pub type AgentId = String;
48
49/// Task identifier type
50pub type TaskId = String;
51
52/// Lesson identifier type
53pub type LessonId = String;
54
55/// Memory item identifier type
56pub type MemoryId = String;
57
58#[cfg(test)]
59mod tests {
60    use super::*;
61
62    #[test]
63    fn test_basic_types() {
64        let _agent_id: AgentId = "test_agent".to_string();
65        let _task_id: TaskId = "test_task".to_string();
66        let _lesson_id: LessonId = "test_lesson".to_string();
67        let _memory_id: MemoryId = "test_memory".to_string();
68    }
69}