agent_core/agent/
error.rs

1//! Error types for the agent module.
2
3use thiserror::Error;
4
5use crate::client::error::LlmError;
6
7/// Error type for agent operations.
8#[derive(Error, Debug)]
9pub enum AgentError {
10    /// Tool registration failed.
11    #[error("Tool registration failed: {0}")]
12    ToolRegistration(String),
13
14    /// Session creation failed due to LLM error.
15    #[error("Session creation failed: {0}")]
16    Session(#[from] LlmError),
17
18    /// Controller not initialized.
19    #[error("Controller not initialized")]
20    ControllerNotInitialized,
21
22    /// No LLM configuration found for provider.
23    #[error("No LLM configuration found for provider: {0}")]
24    NoConfiguration(String),
25}