pub struct Agent { /* private fields */ }Expand description
A runnable agent, composed by value. Cheap to clone (shared internals).
Implementations§
Source§impl Agent
impl Agent
Sourcepub fn builder() -> AgentBuilder
pub fn builder() -> AgentBuilder
Start composing an agent.
Sourcepub fn definition(&self) -> &AgentDefinition
pub fn definition(&self) -> &AgentDefinition
Portable definition of this agent.
Sourcepub fn environment(&self) -> &AgentEnvironment
pub fn environment(&self) -> &AgentEnvironment
Host resources used to run this agent.
Sourcepub fn model(&self) -> &ModelSpec
pub fn model(&self) -> &ModelSpec
The agent’s default model. Per-turn overrides go through
TurnControls.
Sourcepub fn model_profile(&self) -> Option<&ModelProfile>
pub fn model_profile(&self) -> Option<&ModelProfile>
What the attached catalog says this agent’s model supports, if
anything — see AgentBuilder::model_catalog.
Sourcepub fn capabilities(&self) -> &[Arc<dyn Capability>]
pub fn capabilities(&self) -> &[Arc<dyn Capability>]
Everything attached to this agent, in attachment order.
Sourcepub fn driver_for_model(&self) -> Option<Arc<dyn ChatDriver>>
pub fn driver_for_model(&self) -> Option<Arc<dyn ChatDriver>>
The driver that speaks this agent’s model protocol. Guaranteed by
build() to exist.
Sourcepub fn session_with_log(&self, log: Arc<dyn EventLog>) -> Session
pub fn session_with_log(&self, log: Arc<dyn EventLog>) -> Session
Start a session writing to the given event log.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Agent
impl !UnwindSafe for Agent
impl Freeze for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
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