agent-orchestrator-sdk 0.1.0

Rust SDK for orchestrating LLM-powered agents, shared task execution, and teammate coordination
Documentation
use std::path::PathBuf;
use std::sync::Arc;

use tokio::sync::mpsc::UnboundedSender;

use crate::error::AgentId;
use crate::traits::llm_client::LlmClient;
use crate::traits::prompt_builder::PromptBuilder;
use crate::mailbox::broker::MessageBroker;
use crate::task::store::TaskStore;

use super::events::AgentEvent;
use super::hooks::HookRegistry;
use super::memory::MemoryStore;

/// Per-agent working state. Each teammate gets its own context.
#[derive(Clone)]
pub struct AgentContext {
    pub agent_id: AgentId,
    /// Human-readable name for this teammate (e.g. "security-reviewer").
    pub name: String,
    /// Optional role instructions for this teammate.
    pub role_prompt: String,
    pub task_store: Arc<TaskStore>,
    pub broker: Arc<MessageBroker>,
    pub llm_client: Arc<dyn LlmClient>,
    pub prompt_builder: Arc<dyn PromptBuilder>,
    pub work_dir: PathBuf,
    pub source_root: PathBuf,
    pub poll_interval_ms: u64,
    pub memory_store: Arc<MemoryStore>,
    pub max_loop_iterations: usize,
    pub max_context_tokens: usize,
    pub max_idle_cycles: u32,
    pub plan_approval_timeout_secs: u64,
    pub event_tx: Option<UnboundedSender<AgentEvent>>,
    /// If true, the teammate must submit a plan and get approval before implementing.
    pub require_plan_approval: bool,
    /// Hook registry (shared across the team).
    pub hooks: Arc<HookRegistry>,
}