Modules
Provider-agnostic agent loop for Elixir.
Usage + cost accounting and budget checks for agent runs.
Provider-capability map shape.
Behaviour for context-window compaction.
Default ExAthena.Compactor — replaces the middle of message history
with a short LLM-generated summary.
Resolves the provider and per-call options for an ExAthena request.
Canonical error surface across providers.
Lifecycle hooks the loop fires at key transitions.
Agent-loop kernel. Dispatches to a ExAthena.Loop.Mode implementation
and handles everything around it: caps, budget, hooks, counters, events,
and termination accounting.
Flat, pattern-matchable event tuples the loop emits to :on_event.
Pluggable control-flow strategy for the agent loop.
Parallel tool-call dispatcher.
Internal state of a running agent loop.
Typed termination subtypes for agent-loop runs.
Canonical in-memory representation of a conversation.
A single turn in the conversation.
A tool call the model wants the runtime to execute.
The outcome of a tool execution, replayed back to the model.
Plan-and-Solve mode.
Default mode: Reason-Act cycle.
Reflexion mode: after each ReAct iteration, insert a short self-critique pass before the next turn.
Decides whether a tool call is allowed.
Behaviour every provider must implement.
In-memory provider for tests.
Delegating provider that runs requests through the req_llm library.
A normalised inference request.
A normalised inference response.
Canonical run outcome returned by ExAthena.run/2 and
ExAthena.Loop.run/2.
GenServer that owns a multi-turn conversation.
Canonical streaming event types and the broadcaster helper.
A single streaming event.
One-shot structured extraction backed by a JSON schema.
Telemetry emission for ExAthena, shaped to the OpenTelemetry GenAI semantic conventions so consumers can plug directly into OTel without a translation layer.
Behaviour every tool must implement.
Extracts tool calls from a provider response.
Parses native tool-call structures from provider responses.
Parses ~~~tool_call fenced blocks out of assistant text.
Context handed to every tool execution.
Resolves tool modules into the shape the provider + loop expect.
Executes a shell command via /bin/sh -c with a configurable timeout.
Exact-string replacement in a file.
Finds files matching a glob pattern, relative to ctx.cwd.
Search file contents with a regex under ctx.cwd.
Toggle the loop's permission phase.
Reads a file from the filesystem.
Synchronously run a sub-agent-loop with its own prompt, tools, and budget.
Writes the agent's todo list.
HTTP GET via Req, returning the body as text.
Creates or overwrites a file with the given content.
Mix Tasks
Installs ExAthena into your project.