Modules
Provider-agnostic agent loop for Elixir.
Custom agent definitions loaded from YAML/markdown files.
A single named agent loaded from a markdown+frontmatter file.
Writes a subagent's transcript to disk so it doesn't bloat the parent's context.
Git-worktree isolation for subagents.
One-shot startup task that GCs orphaned ex_athena git worktrees.
Usage + cost accounting and budget checks for agent runs.
Provider-capability map shape.
File-history checkpointing + rewind.
One-shot startup task that GCs file-history directories older than
30 days. Runs alongside the Agents.WorktreeSweeper.
Behaviour for context-window compaction.
Multi-stage context-compaction runner.
Behaviour for a single compaction stage.
First stage of the compaction pipeline. Replaces oversized tool-result contents with a short reference pointer.
Fourth pipeline stage — non-destructive view-time projection.
Third pipeline stage — collapses runs of repetitive tool calls.
Second pipeline stage — drops old tool-result messages whose paired assistant turn already happened.
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.
File-based project memory.
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.
Behaviour for append-only session event storage.
ETS-backed in-memory session store. Default; ephemeral.
ETS-buffered JSONL session store.
Claude Code-style skills with progressive disclosure.
A discovered skill. body is the markdown after the frontmatter,
loaded only when needed; the catalog only ever uses name and
description.
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.
Igniter upgrader task. Invoked automatically by
mix igniter.upgrade ex_athena after the dependency is bumped;
can also be invoked directly via mix ex_athena.upgrade <from> <to>.