Skip to main content

nexus_memory_agent/
error.rs

1//! Agent-specific error types
2
3use thiserror::Error;
4
5#[derive(Debug, Error)]
6pub enum AgentError {
7    #[error("LLM error: {0}")]
8    Llm(String),
9
10    #[error("Storage error: {0}")]
11    Storage(String),
12
13    #[error("IO error: {0}")]
14    Io(#[from] std::io::Error),
15
16    #[error("Configuration error: {0}")]
17    Config(String),
18
19    #[error("Ingest error: {0}")]
20    Ingest(String),
21
22    #[error("Query error: {0}")]
23    Query(String),
24
25    #[error("Consolidation error: {0}")]
26    Consolidation(String),
27
28    #[error("Supervisor error: {0}")]
29    Supervisor(String),
30
31    #[error("Derivation error: {0}")]
32    Derivation(String),
33
34    #[error("Digest error: {0}")]
35    Digest(String),
36
37    #[error("Reflection error: {0}")]
38    Reflection(String),
39}
40
41pub type Result<T> = std::result::Result<T, AgentError>;