langgraph_agent_toolkit.helper.exceptions module
- exception langgraph_agent_toolkit.helper.exceptions.AgentToolkitError(message, error_code=None, details=None)[source][source]
Bases:
ExceptionBase class for LangGraph Agent Toolkit errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.AgentError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorBase class for agent errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.AgentConfigurationError(message, error_code=None, details=None)[source][source]
Bases:
AgentErrorRaised when an agent configuration has an error.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.AgentExecutionError(message, error_code=None, details=None)[source][source]
Bases:
AgentErrorRaised when an agent cannot run.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.AgentTimeoutError(message, error_code=None, details=None)[source][source]
Bases:
AgentErrorRaised when an agent operation times out.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.MessageError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorBase class for message errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.UnsupportedMessageTypeError(message_type, supported_types=None)[source][source]
Bases:
MessageErrorRaised for an unsupported message type.
Initialize the error with message type information.
- Parameters:
message_type (str) – Unsupported message type.
supported_types (list) – Supported message types.
- exception langgraph_agent_toolkit.helper.exceptions.MessageConversionError(message, error_code=None, details=None)[source][source]
Bases:
MessageErrorRaised when message conversion fails.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.ValidationError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorBase class for validation errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.InputValidationError(message, error_code=None, details=None)[source][source]
Bases:
ValidationErrorRaised when input validation fails.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.ConfigurationValidationError(message, error_code=None, details=None)[source][source]
Bases:
ValidationErrorRaised when configuration validation fails.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.ModelError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorBase class for model errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.ModelNotFoundError(model_name, provider=None)[source][source]
Bases:
ModelErrorRaised when a requested model is not found.
Initialize the error with model information.
- Parameters:
model_name (str) – Name of the missing model.
provider (str) – Optional model provider.
- exception langgraph_agent_toolkit.helper.exceptions.ModelConfigurationError(message, error_code=None, details=None)[source][source]
Bases:
ModelErrorRaised when a model configuration has an error.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.ToolError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorBase class for tool errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.ToolNotFoundError(tool_name, available_tools=None)[source][source]
Bases:
ToolErrorRaised when a requested tool is not found.
Initialize the error with tool information.
- Parameters:
tool_name (str) – Name of the missing tool.
available_tools (list) – Available tools.
- exception langgraph_agent_toolkit.helper.exceptions.ToolExecutionError(tool_name, original_error=None)[source][source]
Bases:
ToolErrorRaised when tool execution fails.
Initialize the error with tool execution information.
- Parameters:
tool_name (str) – Name of the failed tool.
original_error (Exception) – Exception that caused the failure.
- exception langgraph_agent_toolkit.helper.exceptions.MemoryError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorBase class for memory errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.MemoryNotFoundError(identifier, identifier_type='thread')[source][source]
Bases:
MemoryErrorRaised when the requested memory or thread is missing.
Initialize the error with memory identifier information.
- Parameters:
identifier (str) – Missing identifier.
identifier_type (str) – Identifier type, such as thread or user.
- exception langgraph_agent_toolkit.helper.exceptions.MemoryOperationError(message, error_code=None, details=None)[source][source]
Bases:
MemoryErrorRaised when memory operations fail.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.ObservabilityError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorBase class for observability errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.FeedbackError(run_id, operation, reason=None)[source][source]
Bases:
ObservabilityErrorRaised when feedback operations fail.
Initialize the error with feedback operation information.
- Parameters:
run_id (str) – Run ID for the feedback.
operation (str) – Failed feedback operation.
reason (str) – Optional failure reason.
- exception langgraph_agent_toolkit.helper.exceptions.AuthenticationError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorRaised when authentication fails.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.AuthorizationError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorRaised when authorization fails.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
- exception langgraph_agent_toolkit.helper.exceptions.RateLimitError(resource, limit, reset_time=None)[source][source]
Bases:
AgentToolkitErrorRaised when rate limits are exceeded.
Initialize the error with rate-limit information.
- Parameters:
resource (str) – Resource that reached the rate limit.
limit (int) – Exceeded rate limit.
reset_time (float) – Optional limit reset time.
- exception langgraph_agent_toolkit.helper.exceptions.NetworkError(message, error_code=None, details=None)[source][source]
Bases:
AgentToolkitErrorBase class for network errors.
Initialize the exception.
- Parameters:
message (str) – Error message for a user.
error_code (str) – Optional error code for a program.
details (dict) – Optional error context.
Bases:
NetworkErrorRaised when an external service is unavailable.
Initialize the error with service information.
- Parameters:
service (str) – Name of the unavailable service.
details (str) – Optional unavailability details.
Initialize the error with service information.
- Parameters:
service (str) – Name of the unavailable service.
details (str) – Optional unavailability details.