Expand description
Domain-Specific Agents for RiceCoder
This crate provides a framework for specialized agents that focus on specific domains (frontend, backend, DevOps, etc.) with domain-specific knowledge bases and capabilities.
§Architecture
The framework consists of:
- Domain Agents: Specialized agents for specific domains (Frontend, Backend, DevOps)
- Knowledge Base: Domain-specific knowledge entries and best practices
- Registry: Central registry for discovering and managing domain agents
- Models: Data structures for domains, agents, and knowledge
§Example
ⓘ
use ricecoder_domain_agents::{DomainAgentRegistryManager, DomainAgentInput};
use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create registry with default agents
let registry = DomainAgentRegistryManager::with_defaults();
// Execute frontend agent
let input = DomainAgentInput {
domain: "frontend".to_string(),
task: "Design a React component".to_string(),
context: "User profile component".to_string(),
parameters: HashMap::new(),
};
let output = registry.execute_agent("frontend", input).await?;
println!("Response: {}", output.response);
Ok(())
}Re-exports§
pub use domain_agents::BackendAgent;pub use domain_agents::DevOpsAgent;pub use domain_agents::DomainAgent;pub use domain_agents::DomainAgentInput;pub use domain_agents::DomainAgentOutput;pub use domain_agents::FrontendAgent;pub use error::DomainAgentError;pub use error::Result;pub use knowledge_base::KnowledgeBaseManager;pub use models::Domain;pub use models::DomainAgentConfig;pub use models::DomainAgentMetadata;pub use models::DomainAgentRegistry;pub use models::KnowledgeBase;pub use models::KnowledgeEntry;pub use registry::DomainAgentRegistryManager;
Modules§
- domain_
agents - Specialized domain agents
- error
- Error types for domain-specific agents
- knowledge_
base - Domain knowledge base management
- models
- Data models for domain-specific agents
- registry
- Domain agent registry and management