Skip to main content

hanzo_agents/
lib.rs

1//! Hanzo Agents - Specialized AI agents for development workflows
2//!
3//! This crate provides pre-built agent types that can be used across
4//! hanzo-dev (CLI) and hanzo-node for consistent AI-powered development assistance.
5//!
6//! # Agent Types
7//!
8//! - **Architect Agent**: High-level system design and architectural decisions
9//! - **CTO Agent**: Technical leadership, code quality, and best practices
10//! - **Reviewer Agent**: Code review, quality assurance, and suggestions
11//! - **Explorer Agent**: Codebase exploration and documentation
12//! - **Planner Agent**: Task planning and implementation strategy
13//!
14//! # Architecture
15//!
16//! The agent system follows patterns from hanzo-engine:
17//! - **Trait-based extensibility**: Tools implement a consistent callback interface
18//! - **MCP integration**: Tools can be provided via Model Context Protocol servers
19//! - **OpenAI compatibility**: Tool calling uses OpenAI-compatible format
20//! - **Async-first design**: All APIs are async with proper concurrency control
21//!
22//! # Example
23//!
24//! ```ignore
25//! use hanzo_agents::{AgentRegistry, AgentType, AgentConfig};
26//!
27//! #[tokio::main]
28//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
29//!     let mut registry = AgentRegistry::new();
30//!     let architect = registry.get(AgentType::Architect)?;
31//!     let config = AgentConfig::default();
32//!
33//!     let result = architect
34//!         .run("Design a microservices architecture for a payment system", &config)
35//!         .await?;
36//!
37//!     println!("{}", result.output);
38//!     Ok(())
39//! }
40//! ```
41
42pub mod agents;
43pub mod prompts;
44pub mod registry;
45pub mod tools;
46pub mod traits;
47
48pub use agents::*;
49pub use registry::{AgentRegistry, AgentType};
50pub use traits::SpecializedAgent;
51
52/// Re-exports from hanzo-agent for convenience
53pub mod prelude {
54    pub use crate::registry::{AgentRegistry, AgentType};
55    pub use crate::tools::ToolRegistry;
56    pub use crate::traits::SpecializedAgent;
57    pub use hanzo_agent::prelude::*;
58}