ricecoder_agents/
lib.rs

1//! Multi-Agent Framework for RiceCoder
2//!
3//! This crate provides a framework for specialized agents that perform different tasks
4//! (code review, testing, documentation, refactoring) with orchestration capabilities
5//! for sequential, parallel, and conditional workflows.
6//!
7//! # Architecture
8//!
9//! The framework consists of:
10//! - **Agent Trait**: Unified interface for all agents
11//! - **AgentRegistry**: Discovers and registers agents at runtime
12//! - **AgentScheduler**: Schedules agent execution with dependency management
13//! - **AgentCoordinator**: Aggregates and prioritizes results from multiple agents
14//! - **AgentOrchestrator**: Central coordinator for agent lifecycle and workflows
15//!
16//! # Example
17//!
18//! ```ignore
19//! use ricecoder_agents::{Agent, AgentRegistry, AgentOrchestrator};
20//!
21//! // Create registry and register agents
22//! let registry = AgentRegistry::new();
23//! // ... register agents ...
24//!
25//! // Create orchestrator
26//! let orchestrator = AgentOrchestrator::new(registry);
27//!
28//! // Execute agents
29//! let results = orchestrator.execute(tasks).await?;
30//! ```
31
32#![warn(missing_docs)]
33
34pub mod agents;
35pub mod coordinator;
36pub mod domain;
37pub mod error;
38pub mod executor;
39pub mod metrics;
40pub mod models;
41pub mod orchestrator;
42pub mod registry;
43pub mod scheduler;
44pub mod tool_registry;
45pub mod tool_invokers;
46
47#[cfg(test)]
48mod scheduler_properties;
49
50#[cfg(test)]
51mod coordinator_properties;
52
53#[cfg(test)]
54mod orchestrator_properties;
55
56pub use agents::{Agent, CodeReviewAgent, WebAgent};
57pub use coordinator::AgentCoordinator;
58pub use error::AgentError;
59pub use executor::{ExecutionConfig, ExecutionResult, ParallelExecutor};
60pub use metrics::{AgentStats, ExecutionMetrics, MetricsCollector};
61pub use models::{
62    AgentConfig, AgentInput, AgentMetadata, AgentMetrics, AgentOutput, AgentTask, Finding,
63    Severity, Suggestion, TaskScope, TaskTarget, TaskType,
64};
65pub use orchestrator::AgentOrchestrator;
66pub use registry::AgentRegistry;
67pub use scheduler::{AgentScheduler, ExecutionPhase, ExecutionSchedule, TaskDAG};
68pub use tool_registry::{ToolInvoker, ToolMetadata, ToolRegistry};
69pub use tool_invokers::{
70    PatchToolInvoker, TodoreadToolInvoker, TodowriteToolInvoker, WebfetchToolInvoker,
71    WebsearchToolInvoker,
72};