mini_langchain/agent/
error.rs

1use crate::tools::error::ToolError;
2use crate::llm::error::LLMError;
3
4#[derive(Debug, thiserror::Error)]
5pub enum AgentError {
6    #[error("Tool not found: {0}")]
7    ToolNotFound(String),
8
9    #[error("Tool execution error: {0}")]
10    ToolExecutionError(#[from] ToolError),
11
12
13    #[error("LLM error: {0}")]
14    LLMExecutionError(#[from] LLMError),
15
16    #[error("Maximum iterations exceeded: {0}")]
17    MaxIterationsExceeded(usize)
18
19}