pub struct Runner;Expand description
Runner executes the agent loop
Implementations§
Source§impl Runner
impl Runner
Sourcepub async fn run(
agent: &Agent,
input: String,
config: &RunConfig,
) -> Result<RunResult>
pub async fn run( agent: &Agent, input: String, config: &RunConfig, ) -> Result<RunResult>
Run the agent with the given input
This executes the agent loop:
- Send input to LLM
- If tool calls are returned, execute them
- If a final output is returned, complete
- If handoff occurs, switch to new agent
- Repeat until max_turns or final output
Auto Trait Implementations§
impl Freeze for Runner
impl RefUnwindSafe for Runner
impl Send for Runner
impl Sync for Runner
impl Unpin for Runner
impl UnsafeUnpin for Runner
impl UnwindSafe for Runner
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