Subagent

Trait Subagent 

Source
pub trait Subagent:
    Send
    + Sync
    + Debug {
    // Required methods
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn execute<'a>(
        &'a self,
        context: &'a SubagentContext,
        ast_tools: &'a mut ASTAgentTools,
        cancel_flag: Arc<AtomicBool>,
    ) -> Pin<Box<dyn Future<Output = SubagentResult<AgentResult>> + Send + 'a>>;
    fn capabilities(&self) -> Vec<String>;
    fn supports_file_type(&self, file_path: &Path) -> bool;

    // Provided method
    fn execution_time_estimate(&self) -> Duration { ... }
}
Expand description

Core trait for all subagents

Required Methods§

Source

fn name(&self) -> &str

Agent name identifier

Source

fn description(&self) -> &str

Agent description

Source

fn execute<'a>( &'a self, context: &'a SubagentContext, ast_tools: &'a mut ASTAgentTools, cancel_flag: Arc<AtomicBool>, ) -> Pin<Box<dyn Future<Output = SubagentResult<AgentResult>> + Send + 'a>>

Execute the agent with given context Returns a boxed future to make the trait object-safe

Source

fn capabilities(&self) -> Vec<String>

Get agent capabilities and tool requirements

Source

fn supports_file_type(&self, file_path: &Path) -> bool

Check if agent can handle the given file types

Provided Methods§

Source

fn execution_time_estimate(&self) -> Duration

Get expected execution time range

Implementors§

Source§

impl Subagent for agcodex_core::subagents::built_in::code_reviewer::CodeReviewerAgent

Source§

impl Subagent for agcodex_core::subagents::built_in::debugger::DebuggerAgent

Source§

impl Subagent for agcodex_core::subagents::built_in::performance::PerformanceAgent

Source§

impl Subagent for agcodex_core::subagents::built_in::refactorer::RefactorerAgent

Source§

impl Subagent for agcodex_core::subagents::built_in::test_writer::TestWriterAgent

Source§

impl Subagent for agcodex_core::subagents::agents::CodeReviewerAgent

Source§

impl Subagent for agcodex_core::subagents::agents::DebuggerAgent

Source§

impl Subagent for DocsAgent

Source§

impl Subagent for agcodex_core::subagents::agents::PerformanceAgent

Source§

impl Subagent for agcodex_core::subagents::agents::RefactorerAgent

Source§

impl Subagent for SecurityAgent

Source§

impl Subagent for agcodex_core::subagents::agents::TestWriterAgent