langgraph_agent_toolkit.helper.exceptions module

exception langgraph_agent_toolkit.helper.exceptions.AgentToolkitError(message, error_code=None, details=None)[source][source]

Bases: Exception

Base 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.

__init__(message, error_code=None, details=None)[source][source]

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: AgentToolkitError

Base 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: AgentError

Raised 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: AgentError

Raised 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: AgentError

Raised 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: AgentToolkitError

Base 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: MessageError

Raised 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.

__init__(message_type, supported_types=None)[source][source]

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: MessageError

Raised 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: AgentToolkitError

Base 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: ValidationError

Raised 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: ValidationError

Raised 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: AgentToolkitError

Base 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: ModelError

Raised 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.

__init__(model_name, provider=None)[source][source]

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: ModelError

Raised 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: AgentToolkitError

Base 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: ToolError

Raised 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.

__init__(tool_name, available_tools=None)[source][source]

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: ToolError

Raised 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.

__init__(tool_name, original_error=None)[source][source]

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: AgentToolkitError

Base 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: MemoryError

Raised 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.

__init__(identifier, identifier_type='thread')[source][source]

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: MemoryError

Raised 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: AgentToolkitError

Base 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: ObservabilityError

Raised 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.

__init__(run_id, operation, reason=None)[source][source]

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: AgentToolkitError

Raised 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: AgentToolkitError

Raised 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: AgentToolkitError

Raised 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.

__init__(resource, limit, reset_time=None)[source][source]

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: AgentToolkitError

Base 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.

exception langgraph_agent_toolkit.helper.exceptions.ServiceUnavailableError(service, details=None)[source][source]

Bases: NetworkError

Raised 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.

__init__(service, details=None)[source][source]

Initialize the error with service information.

Parameters:
  • service (str) – Name of the unavailable service.

  • details (str) – Optional unavailability details.