Error Catalog
Complete list of AgentForge error codes and their meanings.
ErrorCatalog
import { ErrorCatalog } from '@ahzan-agentforge/core';The ErrorCatalog is a map of error codes to their metadata. Use it to look up error details programmatically.
ErrorCode
type ErrorCode = string;Error codes follow the pattern {CATEGORY}_{DESCRIPTION}:
| Category | Examples |
|---|---|
AGENT_* | Agent lifecycle errors |
TOOL_* | Tool execution errors |
LLM_* | LLM provider errors |
STATE_* | State store errors |
BUDGET_* | Budget violation errors |
POLICY_* | Autonomy policy errors |
MEMORY_* | Memory store errors |
Common Error Codes
| Code | Source | Description |
|---|---|---|
AGENT_MAX_STEPS | framework | Agent exceeded maxSteps limit |
TOOL_TIMEOUT | tool | Tool execution timed out |
TOOL_VALIDATION | tool | Input/output schema validation failed |
LLM_API_ERROR | llm | LLM provider returned an error |
LLM_RATE_LIMIT | llm | Rate limited by the provider |
BUDGET_EXCEEDED | framework | Token or cost budget exceeded |
POLICY_DENIED | framework | Tool call denied by autonomy policy |
STATE_LOAD_ERROR | framework | Failed to load state from store |
Using the Catalog
const entry = ErrorCatalog['TOOL_TIMEOUT'];
// { message: '...', source: 'tool', recoverable: true }Next Steps
- Error Overview — error handling patterns
- Observability — monitoring errors