1#[derive(Debug, thiserror::Error)]
2pub enum AgentError {
3 #[error("Agent not found: {0}")]
4 AgentNotFound(String),
5 #[error("Tool not found: {0}")]
6 ToolNotFound(String),
7 #[error("Tool execution failed: {0}")]
8 ToolExecutionFailed(String),
9 #[error("Tool execution error: {0}")]
10 ToolExecution(String),
11 #[error("Tool response processing failed: {0}")]
12 ToolResponseProcessing(String),
13 #[error("Authentication required: {0}")]
14 AuthRequired(String),
15 #[error("LLM execution failed: {0}")]
16 LlmExecutionFailed(String),
17 #[error("LLM error: {0}")]
18 LLMError(String),
19 #[error("{0}")]
20 OpenAIError(#[from] async_openai::error::OpenAIError),
21 #[error("Invalid configuration: {0}")]
22 InvalidConfiguration(String),
23 #[error("Session error: {0}")]
24 Session(String),
25 #[error("Not found: {0}")]
26 NotFound(String),
27 #[error("Not implemented: {0}")]
28 NotImplemented(String),
29 #[error("Validation error: {0}")]
30 Validation(String),
31 #[error("Unsupported file type: {0}")]
32 UnsupportedFileType(String),
33 #[error("Halt: {0}")]
34 Halt(String),
35 #[error("Planning error: {0}")]
36 Planning(String),
37 #[error("Parsing error: {0}")]
38 Parsing(String),
39 #[error("XML parsing failed, content: {0}, error: {1}")]
40 XmlParsingFailed(String, String),
41 #[error("JSON parsing failed, content: {0}, error: {1}")]
42 JsonParsingFailed(String, String),
43 #[error("Storage error: {0}")]
44 Storage(String),
45 #[error("Other error: {0}")]
46 Other(String),
47 #[error(transparent)]
48 SerdeError(#[from] serde_json::Error),
49 #[error("Execution error: {0}")]
50 Execution(String),
51 #[error("Workflow execution failed: {0}")]
52 WorkflowExecutionFailed(String),
53 #[error("Invalid workflow step: {0}")]
54 InvalidWorkflowStep(String),
55 #[error("Initialization error: {0}")]
56 Initialization(String),
57}