API Reference alloy v#0.12.4

Copy Markdown View Source

Modules

Model-agnostic agent harness for Elixir.

Configuration for an agent run.

Deprecated alias for Alloy.Events.

OTP-backed persistent agent process.

Mutable state for an agent run.

The core agent loop.

Summary-based context compaction.

Event envelope construction and runtime opts normalization.

Behaviour for a memory store compatible with Anthropic's memory_20250818 tool.

Routes memory_20250818 tool calls to a configured Alloy.Memory store.

Normalized message struct used throughout Alloy.

Behaviour for middleware that wraps the agent loop.

Behaviour for pluggable model-metadata catalogs.

Built-in model metadata catalog used for context budgeting.

Behaviour for LLM providers.

Provider for Anthropic's Claude Messages API.

Provider for ChatGPT-plan-backed Codex execution via codex exec.

Provider for Google's Gemini GenerateContent API.

Provider for OpenAI's Responses API.

Generic OpenAI-compatible provider.

Shared OpenAI-format SSE stream parser.

Provider retry, backoff, fallback, and streaming dispatch logic.

Shared SSE (Server-Sent Events) framing utilities.

A scripted test provider that returns pre-configured responses in order.

Provider for xAI's Grok models.

Structured result from an agent run.

Serializable session container.

ExUnit helpers for testing agents built with Alloy.

Behaviour for tools that agents can call.

Built-in tool: execute shell commands via bash -rc (restricted shell).

Built-in tool: search-and-replace edits on files.

Built-in tool: read files with line numbers.

Built-in tool: write files, creating parent directories as needed.

Executes tool calls and returns result messages.

A tool defined as data instead of a module.

Builds tool schemas and function maps from tool definitions.

Token usage tracking across turns.