Provider-aligned configuration for the coding-agent loop.
A profile packages a model, toolset, provider options, and an optional system-prompt
builder so agent sessions can stay portable across providers. Profiles can also be
extended with register_tool/2 and register_tools/2, allowing custom tools to be
layered on top of provider presets while overriding name collisions deterministically.
The module also exposes a maintained cross-provider integration matrix for the
built-in OpenAI, Anthropic, and Gemini presets. Gemini can optionally include
web-search tools via gemini(web_tools: true).
Summary
Functions
Builds the system prompt for a session request.
Returns the project-instruction files relevant to the active provider profile.
Returns the maintained cross-provider integration matrix for built-in presets.
Builds a provider profile from keyword options.
Returns the provider-native request path associated with reasoning/thinking controls.
Returns the upstream native tool names the preset is intended to align with.
Registers or replaces a tool on top of an existing profile.
Registers or replaces tools on top of an existing profile, preserving order.
Returns the reference-agent prompt family used as the preset target.
Returns the serialized tool definitions exposed to the model.
Types
@type integration_entry() :: %{ id: String.t(), provider_family: atom(), preset: atom(), supports_reasoning: boolean(), supports_streaming: boolean(), implemented_tool_names: [String.t()], reference_tool_names: [String.t()], instruction_files: [String.t()], reasoning_option_path: [String.t()], system_prompt_style: String.t(), event_kinds: [AttractorEx.Agent.Event.kind()] }
@type t() :: %AttractorEx.Agent.ProviderProfile{ context_window_size: pos_integer() | nil, id: String.t(), model: String.t(), preset: atom() | nil, provider_family: atom(), provider_options: map(), supports_parallel_tool_calls: boolean(), supports_reasoning: boolean(), supports_streaming: boolean(), system_prompt_builder: (keyword() -> String.t()) | nil, tool_registry: AttractorEx.Agent.ToolRegistry.t(), tools: [AttractorEx.Agent.Tool.t()] }
Functions
Builds the system prompt for a session request.
Returns the project-instruction files relevant to the active provider profile.
@spec integration_matrix() :: [integration_entry()]
Returns the maintained cross-provider integration matrix for built-in presets.
Builds a provider profile from keyword options.
Returns the provider-native request path associated with reasoning/thinking controls.
Returns the upstream native tool names the preset is intended to align with.
@spec register_tool(t(), AttractorEx.Agent.Tool.t()) :: t()
Registers or replaces a tool on top of an existing profile.
@spec register_tools(t(), [AttractorEx.Agent.Tool.t()]) :: t()
Registers or replaces tools on top of an existing profile, preserving order.
Returns the reference-agent prompt family used as the preset target.
Returns the serialized tool definitions exposed to the model.