agentwerk 0.1.0

A minimal Rust crate that gives any application agentic capabilities.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::future::Future;
use std::pin::Pin;

use crate::error::Result;

use super::output::AgentOutput;
use super::context::InvocationContext;

/// The single agent interface. Implemented by AgentLoop (via AgentBuilder)
/// and any user-defined agent.
pub trait Agent: Send + Sync {
    fn name(&self) -> &str;
    fn run(
        &self,
        ctx: InvocationContext,
    ) -> Pin<Box<dyn Future<Output = Result<AgentOutput>> + Send + '_>>;
}