Jido.AgentServer.Options (Jido v2.0.0-rc.0)
View SourceOptions for starting an AgentServer.
Internal Module
This module is internal to the AgentServer implementation. Its API may change without notice.
Validates and normalizes startup options including agent configuration, hierarchy settings, error policies, and dispatch configuration.
Summary
Functions
Creates validated Options from a keyword list or map.
Creates validated Options from a keyword list or map, raising on error.
Validates an error policy value.
Types
@type on_parent_death() :: :stop | :continue | :emit_orphan
@type t() :: %Jido.AgentServer.Options{ agent: any(), agent_module: atom(), default_dispatch: any(), error_policy: any(), id: binary(), idle_timeout: any(), initial_state: map(), jido: atom(), lifecycle_mod: atom(), max_queue_size: integer(), on_parent_death: atom(), parent: any(), persistence: any(), pool: atom(), pool_key: any(), registry: atom(), skip_schedules: boolean(), spawn_fun: any() }
Functions
Creates validated Options from a keyword list or map.
Normalizes and validates all options, including:
- Generating an ID if not provided
- Validating the agent module/struct
- Validating error policy
- Parsing parent reference
Returns {:ok, options} or {:error, reason}.
Creates validated Options from a keyword list or map, raising on error.
@spec validate_error_policy(term()) :: {:ok, error_policy()} | {:error, term()}
Validates an error policy value.