Crate ricecoder_agents

Crate ricecoder_agents 

Source
Expand description

Multi-Agent Framework for RiceCoder

This crate provides a framework for specialized agents that perform different tasks (code review, testing, documentation, refactoring) with orchestration capabilities for sequential, parallel, and conditional workflows.

§Architecture

The framework consists of:

  • Agent Trait: Unified interface for all agents
  • AgentRegistry: Discovers and registers agents at runtime
  • AgentScheduler: Schedules agent execution with dependency management
  • AgentCoordinator: Aggregates and prioritizes results from multiple agents
  • AgentOrchestrator: Central coordinator for agent lifecycle and workflows

§Example

use ricecoder_agents::{Agent, AgentRegistry, AgentOrchestrator};

// Create registry and register agents
let registry = AgentRegistry::new();
// ... register agents ...

// Create orchestrator
let orchestrator = AgentOrchestrator::new(registry);

// Execute agents
let results = orchestrator.execute(tasks).await?;

Re-exports§

pub use agents::Agent;
pub use agents::CodeReviewAgent;
pub use agents::WebAgent;
pub use coordinator::AgentCoordinator;
pub use error::AgentError;
pub use executor::ExecutionConfig;
pub use executor::ExecutionResult;
pub use executor::ParallelExecutor;
pub use metrics::AgentStats;
pub use metrics::ExecutionMetrics;
pub use metrics::MetricsCollector;
pub use models::AgentConfig;
pub use models::AgentInput;
pub use models::AgentMetadata;
pub use models::AgentMetrics;
pub use models::AgentOutput;
pub use models::AgentTask;
pub use models::Finding;
pub use models::Severity;
pub use models::Suggestion;
pub use models::TaskScope;
pub use models::TaskTarget;
pub use models::TaskType;
pub use orchestrator::AgentOrchestrator;
pub use registry::AgentRegistry;
pub use scheduler::AgentScheduler;
pub use scheduler::ExecutionPhase;
pub use scheduler::ExecutionSchedule;
pub use scheduler::TaskDAG;
pub use tool_registry::ToolInvoker;
pub use tool_registry::ToolMetadata;
pub use tool_registry::ToolRegistry;
pub use tool_invokers::PatchToolInvoker;
pub use tool_invokers::TodoreadToolInvoker;
pub use tool_invokers::TodowriteToolInvoker;
pub use tool_invokers::WebfetchToolInvoker;
pub use tool_invokers::WebsearchToolInvoker;

Modules§

agents
Agent trait and implementations
coordinator
Agent coordinator for aggregating and prioritizing results
domain
Domain-specific agents module
error
Error types for the agent framework
executor
Parallel execution engine for agents
metrics
Performance metrics collection and tracking for agents
models
Data models for the agent framework
orchestrator
Agent orchestrator for managing agent lifecycle and workflows
registry
Agent registry for discovering and managing agents
scheduler
Agent scheduler for managing execution order and parallelism
tool_invokers
Tool invoker implementations for ricecoder-tools
tool_registry
Tool registry for integrating ricecoder-tools with the agent system