pub struct AgentSpec {
pub id: AgentId,
pub model: String,
pub max_iterations: u32,
pub token_budget: u32,
pub time_budget_ms: u64,
pub money_budget_usd: f64,
}Expand description
Static, serializable description of an agent. Used by the
registry and Python config; AgentSpec::into_agent
materializes a runnable AgentRef. Strategies and inference
client are passed in (typically constructed from a registry
lookup keyed off the spec’s id / model).
Fields§
§id: AgentId§model: String§max_iterations: u32§token_budget: u32§time_budget_ms: u64§money_budget_usd: f64Implementations§
Source§impl AgentSpec
impl AgentSpec
pub fn default_budgets( &self, ) -> (TokenBudget, TimeBudget, MoneyBudget, IterationBudget)
Sourcepub fn into_agent(
self,
instructions: Box<dyn InstructionStrategy>,
tools: Box<dyn ToolStrategy>,
memory: Box<dyn MemoryStrategy>,
skills: Box<dyn SkillStrategy>,
inference: Arc<dyn InferenceClient>,
) -> AgentRef
pub fn into_agent( self, instructions: Box<dyn InstructionStrategy>, tools: Box<dyn ToolStrategy>, memory: Box<dyn MemoryStrategy>, skills: Box<dyn SkillStrategy>, inference: Arc<dyn InferenceClient>, ) -> AgentRef
Materialize a runnable AgentRef from this static spec
plus a set of object-erased strategies and an inference
client. Typically the strategies are constructed from a
registry lookup keyed off the spec’s id / model.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentSpec
impl<'de> Deserialize<'de> for AgentSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentSpec
impl RefUnwindSafe for AgentSpec
impl Send for AgentSpec
impl Sync for AgentSpec
impl Unpin for AgentSpec
impl UnsafeUnpin for AgentSpec
impl UnwindSafe for AgentSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more