API Reference alloy v#0.10.1

Copy Markdown View Source

Modules

Model-agnostic agent harness for Elixir.

Configuration for an agent run.

Event envelope construction and runtime opts normalization.

OTP-backed persistent agent process.

Mutable state for an agent run.

The core agent loop.

Summary-based context compaction.

Normalized message struct used throughout Alloy.

Behaviour for middleware that wraps the agent loop.

Provider model metadata 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.

Builds tool schemas and function maps from tool modules.

Token usage tracking across turns.