Packages
Elixir framework for building production-ready AI agents and LLM applications: type-safe schemas with JSON Schema generation, tool calling, streaming, multi-agent coordination, guardrails, and distributed fault-tolerant sessions, with first-class Anthropic Claude support.
Current section
Files
Jump to
Current section
Files
lib/normandy/agents/base_agent_config.ex
defmodule Normandy.Agents.BaseAgentConfig do
@moduledoc """
Configuration structure for BaseAgent instances.
Stores all stateful information for an agent including schemas,
memory, model configuration, and prompt specifications.
"""
use Normandy.Schema
alias Normandy.Components.PromptSpecification
alias Normandy.Tools.Registry
@type t :: %__MODULE__{
input_schema: struct(),
output_schema: struct(),
client: struct(),
model: String.t(),
memory: map(),
prompt_specification: PromptSpecification.t(),
initial_memory: map(),
current_user_input: String.t() | nil,
temperature: float(),
max_tokens: pos_integer() | nil,
tool_registry: Registry.t() | nil,
max_tool_iterations: pos_integer(),
retry_options: keyword() | nil,
circuit_breaker: pid() | nil,
enable_json_retry: boolean(),
json_retry_max_attempts: pos_integer(),
name: String.t() | nil,
mcp_servers: list() | nil
}
schema do
field(:name, :string, default: nil)
field(:input_schema, :struct)
field(:output_schema, :struct)
field(:client, :struct)
field(:model, :string)
field(:memory, :map)
field(:prompt_specification, :struct)
field(:initial_memory, :map)
field(:current_user_input, :string, default: nil)
field(:temperature, :float, default: 0.9)
field(:max_tokens, :integer, default: nil)
field(:tool_registry, :struct, default: nil)
field(:max_tool_iterations, :integer, default: 5)
field(:retry_options, :map, default: nil)
field(:circuit_breaker, :any, default: nil)
field(:enable_json_retry, :boolean, default: false)
field(:json_retry_max_attempts, :integer, default: 2)
field(:mcp_servers, :any, default: nil)
end
end