terraphim_kg_agents/lib.rs
1//! # Terraphim Knowledge Graph Agents
2//!
3//! Specialized GenAgent implementations that leverage knowledge graph capabilities
4//! for intelligent task planning, execution, and coordination.
5//!
6//! This crate provides concrete implementations of the GenAgent trait that integrate
7//! deeply with Terraphim's knowledge graph infrastructure to provide:
8//!
9//! - **Planning Agents**: Intelligent task decomposition and execution planning
10//! - **Worker Agents**: Domain-specialized task execution with knowledge graph context
11//! - **Coordination Agents**: Multi-agent workflow coordination and supervision
12//!
13//! ## Core Features
14//!
15//! - **Knowledge Graph Integration**: Deep integration with automata and role graphs
16//! - **Domain Specialization**: Agents specialized for specific knowledge domains
17//! - **Task Compatibility**: Intelligent task-agent matching using connectivity analysis
18//! - **Context-Aware Execution**: Task execution guided by knowledge graph context
19//! - **Coordination Capabilities**: Multi-agent workflow orchestration
20
21// Re-export core types
22pub use terraphim_agent_registry::{AgentMetadata, AgentPid, SupervisorId};
23// Define GenAgent types locally since we removed gen_agent dependency
24pub type GenAgentResult<T> = Result<T, Box<dyn std::error::Error + Send + Sync>>;
25
26#[derive(Debug, Clone, thiserror::Error)]
27pub enum GenAgentError {
28 #[error("Execution error: {0}")]
29 ExecutionError(String),
30}
31pub use terraphim_types::*;
32
33// TODO: Re-enable when GenAgent trait framework is implemented
34// These modules depend on terraphim_gen_agent and terraphim_automata::Automata
35// which don't exist yet in the current codebase
36// pub mod coordination;
37pub mod error;
38// pub mod planning;
39// pub mod worker;
40
41// pub use coordination::*;
42pub use error::*;
43// pub use planning::*;
44// pub use worker::*;
45
46/// Result type for knowledge graph agent operations
47pub type KgAgentResult<T> = Result<T, KgAgentError>;
48
49#[cfg(test)]
50mod tests {
51 use super::*;
52
53 #[test]
54 fn test_basic_imports() {
55 // Test that all modules compile and basic types are available
56 let _agent_id = AgentPid::new();
57 let _supervisor_id = SupervisorId::new();
58 }
59}