pub struct Agent {
pub engine: InferenceEngine,
pub context: ContextEngine,
pub tools: ToolRegistry,
pub hooks: HookSystem,
pub skills: SkillRegistry,
pub permissions: PermissionEngine,
pub mcp: McpRegistry,
pub stats: AgentStats,
pub cwd: String,
}Expand description
High-level agent interface for library consumers.
Wraps all 11 layers into a single entry point. Create with Agent::new,
then call Agent::chat to send messages.
Fields§
§engine: InferenceEngine§context: ContextEngine§tools: ToolRegistry§hooks: HookSystem§skills: SkillRegistry§permissions: PermissionEngine§mcp: McpRegistry§stats: AgentStats§cwd: StringImplementations§
Source§impl Agent
impl Agent
Sourcepub async fn new(config: AgentConfig) -> Result<Self>
pub async fn new(config: AgentConfig) -> Result<Self>
Create a new agent with the given configuration.
This authenticates, loads MCP servers, builds the system prompt, and initializes all 11 layers.
Sourcepub async fn chat(&self, prompt: &str) -> Result<AgentResponse>
pub async fn chat(&self, prompt: &str) -> Result<AgentResponse>
Send a message and get a response (single turn, no tool execution).
Auto Trait Implementations§
impl Freeze for Agent
impl !RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl !UnwindSafe 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