# agentic v0.2.2 - Table of Contents

A composable AI agent runtime

## Modules

- [Agentic](Agentic.md): Agentic — A composable AI agent runtime for Elixir.
- [Agentic.AgentProtocol](Agentic.AgentProtocol.md): Behaviour for agent communication protocols.
- [Agentic.AgentProtocol.CLI](Agentic.AgentProtocol.CLI.md): Behaviour for CLI-based local agent protocols.
- [Agentic.CircuitBreaker](Agentic.CircuitBreaker.md): Per-tool circuit breaker for agent tool execution.
- [Agentic.Concurrency.Semaphore](Agentic.Concurrency.Semaphore.md): Bounded concurrency semaphore using a GenServer.
- [Agentic.Config](Agentic.Config.md): Runtime config surface for `agentic`, loaded from
`Application.get_all_env(:agentic)`.
- [Agentic.CostCalculator](Agentic.CostCalculator.md): Calculates LLM costs from token counts and model pricing data.
- [Agentic.LLM](Agentic.LLM.md): Top-level entry point for chat and embedding calls.
- [Agentic.LLM.Catalog](Agentic.LLM.Catalog.md): Unified model catalog backed by a GenServer.
- [Agentic.LLM.Credentials](Agentic.LLM.Credentials.md): Resolved credentials for a single provider.
- [Agentic.LLM.Error](Agentic.LLM.Error.md): Normalized error returned from a transport's `parse_chat_response/3`
(or surfaced from a transport network failure).
- [Agentic.LLM.ErrorClassifier](Agentic.LLM.ErrorClassifier.md): Unified error classification combining three sources
- [Agentic.LLM.ErrorPatterns](Agentic.LLM.ErrorPatterns.md): Generic pattern tables for classifying LLM provider errors from
response body text. Ported from openclaw's `failover-matches.ts`.
- [Agentic.LLM.Gateway](Agentic.LLM.Gateway.md): Transparent LLM API proxy that sits between external coding agents
(Claude Code, OpenCode, Codex, Kimi, etc.) and the actual LLM providers.
- [Agentic.LLM.Model](Agentic.LLM.Model.md): Shared struct describing a single LLM model.
- [Agentic.LLM.Provider](Agentic.LLM.Provider.md): Behaviour describing one LLM service provider.
- [Agentic.LLM.Provider.Anthropic](Agentic.LLM.Provider.Anthropic.md): Anthropic Messages API provider.
- [Agentic.LLM.Provider.Groq](Agentic.LLM.Provider.Groq.md): Groq provider — the Phase 2 forcing function.
- [Agentic.LLM.Provider.Ollama](Agentic.LLM.Provider.Ollama.md): Ollama provider — local-first chat and embeddings.
- [Agentic.LLM.Provider.OpenAI](Agentic.LLM.Provider.OpenAI.md): OpenAI Chat Completions provider.
- [Agentic.LLM.Provider.OpenRouter](Agentic.LLM.Provider.OpenRouter.md): OpenRouter provider.
- [Agentic.LLM.ProviderRegistry](Agentic.LLM.ProviderRegistry.md): Hybrid provider registration: compile-time list from
`config :agentic, providers: [...]`, runtime `enable/1` and
`disable/1` calls.
- [Agentic.LLM.RateLimit](Agentic.LLM.RateLimit.md): Snapshot of rate-limit headers returned by a provider on the most
recent response. Transports populate whichever fields they can parse;
missing fields stay `nil`.

- [Agentic.LLM.Response](Agentic.LLM.Response.md): Normalized chat response shape produced by every transport.
- [Agentic.LLM.Transport](Agentic.LLM.Transport.md): Behaviour describing one wire-protocol family used to talk to LLM
providers. A transport is **pure**: it knows how to translate a
canonical request shape into an HTTP request and how to parse the
HTTP response back into the shared `Agentic.LLM.Response` /
`Agentic.LLM.Error` structs. It does not perform any network I/O,
does not look up credentials, and does not implement any
provider-specific business logic.
- [Agentic.LLM.Transport.AnthropicMessages](Agentic.LLM.Transport.AnthropicMessages.md): Transport for the Anthropic Messages API
(`POST {base_url}/messages`).
- [Agentic.LLM.Transport.Ollama](Agentic.LLM.Transport.Ollama.md): Transport for the Ollama wire format
(`POST {base_url}/api/chat`, `POST {base_url}/api/embed`).
- [Agentic.LLM.Transport.OpenAIChatCompletions](Agentic.LLM.Transport.OpenAIChatCompletions.md): Transport for the OpenAI Chat Completions wire format
(`POST {base_url}/chat/completions`).
- [Agentic.LLM.Usage](Agentic.LLM.Usage.md): Provider quota / spend snapshot.
- [Agentic.LLM.UsageManager](Agentic.LLM.UsageManager.md): Periodically polls every enabled provider that implements
`fetch_usage/1` and caches the latest snapshot. Worth's status
sidebar reads from this cache.
- [Agentic.LLM.UsageWindow](Agentic.LLM.UsageWindow.md): A single rate-limit / quota window for one provider. Anthropic has
rolling 5-hour and 7-day windows; OpenRouter has a single credit
pool; Groq has per-minute RPM caps. They all map to this struct.

- [Agentic.Loop.Context](Agentic.Loop.Context.md): Shared state threaded through all loop stages.
- [Agentic.Loop.ContextCompression](Agentic.Loop.ContextCompression.md): Two-tier context compression: truncation for moderate overflow, LLM-based
summarization for severe overflow.
- [Agentic.Loop.ContinuationDetector](Agentic.Loop.ContinuationDetector.md): Detects plan steps and completion signals in LLM text output.
- [Agentic.Loop.Engine](Agentic.Loop.Engine.md): Composable pipeline engine for agent loops.
- [Agentic.Loop.Helpers](Agentic.Loop.Helpers.md): Shared utility functions for pipeline stages.

- [Agentic.Loop.Phase](Agentic.Loop.Phase.md): Phase state machine with per-mode validated transitions.
- [Agentic.Loop.Profile](Agentic.Loop.Profile.md): Defines loop profiles -- named compositions of stages and config.
- [Agentic.Loop.Stage](Agentic.Loop.Stage.md): Behaviour for loop pipeline stages.
- [Agentic.Loop.Stages.ACPExecutor](Agentic.Loop.Stages.ACPExecutor.md): Executes agent prompts via ACP (Agent Client Protocol).
- [Agentic.Loop.Stages.CLIExecutor](Agentic.Loop.Stages.CLIExecutor.md): Executes agent prompts via CLI-based local agent protocol.
- [Agentic.Loop.Stages.CommitmentGate](Agentic.Loop.Stages.CommitmentGate.md): Intercepts unfulfilled commitments in agent responses.
- [Agentic.Loop.Stages.ContextGuard](Agentic.Loop.Stages.ContextGuard.md): Checks context window usage and triggers compaction if needed.
- [Agentic.Loop.Stages.HumanCheckpoint](Agentic.Loop.Stages.HumanCheckpoint.md): Human-in-the-loop yield stage for :turn_by_turn mode.
- [Agentic.Loop.Stages.LLMCall](Agentic.Loop.Stages.LLMCall.md): Makes the LLM API call and stores the response in context.
- [Agentic.Loop.Stages.ModeRouter](Agentic.Loop.Stages.ModeRouter.md): Mode-aware routing stage. Replaces StopReasonRouter.
- [Agentic.Loop.Stages.PlanBuilder](Agentic.Loop.Stages.PlanBuilder.md): Injects a structured plan-request prompt for :agentic_planned mode.
- [Agentic.Loop.Stages.PlanTracker](Agentic.Loop.Stages.PlanTracker.md): Tracks plan step completion for :agentic_planned mode.
- [Agentic.Loop.Stages.ProgressInjector](Agentic.Loop.Stages.ProgressInjector.md): Injects a system reminder after tool calls to prevent context drift.
- [Agentic.Loop.Stages.ToolExecutor](Agentic.Loop.Stages.ToolExecutor.md): Executes pending tool calls and re-enters the loop.
- [Agentic.Loop.Stages.TranscriptRecorder](Agentic.Loop.Stages.TranscriptRecorder.md): Records session events to a transcript backend for session resumption.
- [Agentic.Loop.Stages.VerifyPhase](Agentic.Loop.Stages.VerifyPhase.md): Post-execution verification stage for :agentic_planned mode.
- [Agentic.Loop.Stages.WorkspaceSnapshot](Agentic.Loop.Stages.WorkspaceSnapshot.md): Gathers workspace context and injects it into the conversation.
- [Agentic.Memory.CommitmentDetector](Agentic.Memory.CommitmentDetector.md): Detects unfulfilled action commitments in agent responses.
- [Agentic.Memory.ContextKeeper](Agentic.Memory.ContextKeeper.md): Per-workspace in-process working memory.
- [Agentic.Memory.FactExtractor](Agentic.Memory.FactExtractor.md): Fact extraction from tool results and LLM responses.
- [Agentic.Memory.MemoryManager](Agentic.Memory.MemoryManager.md): Retrieves relevant context from the Knowledge store before LLM calls.
- [Agentic.ModelRouter](Agentic.ModelRouter.md): Smart model routing for Agentic with two selection modes.
- [Agentic.ModelRouter.Analyzer](Agentic.ModelRouter.Analyzer.md): Analyzes a user request using a fast, ideally free model to determine
complexity, required capabilities (vision, audio, reasoning, etc.),
and context requirements.
- [Agentic.ModelRouter.Preference](Agentic.ModelRouter.Preference.md): Defines model selection preferences and the scoring logic for each.
- [Agentic.ModelRouter.Selector](Agentic.ModelRouter.Selector.md): Scores and ranks catalog models based on an `Analyzer.analysis()` result
and a user `Preference`.
- [Agentic.Persistence.Knowledge](Agentic.Persistence.Knowledge.md): Behaviour for knowledge storage — entries, edges, search, and supersession.
- [Agentic.Persistence.Knowledge.Local](Agentic.Persistence.Knowledge.Local.md): File-based knowledge backend.
- [Agentic.Persistence.Knowledge.Recollect](Agentic.Persistence.Knowledge.Recollect.md): Recollect-backed knowledge storage backend.
- [Agentic.Persistence.Plan](Agentic.Persistence.Plan.md): Behaviour for CRUD operations on structured plans with step-level status tracking.
- [Agentic.Persistence.Plan.Local](Agentic.Persistence.Plan.Local.md): JSON file-based plan backend.
- [Agentic.Persistence.Transcript](Agentic.Persistence.Transcript.md): Behaviour for append-only session event logging.
- [Agentic.Persistence.Transcript.Local](Agentic.Persistence.Transcript.Local.md): JSONL file-based transcript backend.
- [Agentic.Protocol](Agentic.Protocol.md): Defines transport types for agent communication.
- [Agentic.Protocol.ACP](Agentic.Protocol.ACP.md): Generic ACP (Agent Client Protocol) implementation.
- [Agentic.Protocol.ACP.Client](Agentic.Protocol.ACP.Client.md): JSON-RPC 2.0 client over stdio for ACP communication.
- [Agentic.Protocol.ACP.Discovery](Agentic.Protocol.ACP.Discovery.md): Auto-discovery of ACP-compatible agents on the system.
- [Agentic.Protocol.ACP.Permission](Agentic.Protocol.ACP.Permission.md): Bridges ACP permission requests to Agentic tool permission system.
- [Agentic.Protocol.ACP.Quirks](Agentic.Protocol.ACP.Quirks.md): Agent-specific quirks and workarounds for ACP implementations.
- [Agentic.Protocol.ACP.Session](Agentic.Protocol.ACP.Session.md): ACP session lifecycle management.
- [Agentic.Protocol.ACP.Types](Agentic.Protocol.ACP.Types.md): ACP (Agent Client Protocol) type definitions and conversions.
- [Agentic.Protocol.ClaudeCode](Agentic.Protocol.ClaudeCode.md): Claude Code CLI protocol implementation.
- [Agentic.Protocol.Codex](Agentic.Protocol.Codex.md): Codex CLI protocol implementation (one-shot mode).
- [Agentic.Protocol.Error](Agentic.Protocol.Error.md): Protocol-specific errors
- [Agentic.Protocol.LLM](Agentic.Protocol.LLM.md): LLM protocol implementation that wraps existing callback-based LLM calls.
- [Agentic.Protocol.OpenCode](Agentic.Protocol.OpenCode.md): OpenCode CLI protocol implementation.
- [Agentic.Protocol.Registry](Agentic.Protocol.Registry.md): Registry for agent protocol implementations.
- [Agentic.Sandbox.PathValidator](Agentic.Sandbox.PathValidator.md): Validates that tool-requested paths stay within an explicit allowlist of roots.
- [Agentic.Sandbox.Platform](Agentic.Sandbox.Platform.md): OS-level sandbox capability detection.
- [Agentic.Sandbox.Runner](Agentic.Sandbox.Runner.md): Cross-platform sandbox wrapper for agent subprocesses.
- [Agentic.Skill.Analyzer](Agentic.Skill.Analyzer.md): Analyzes skill content to determine model tier requirements.
- [Agentic.Skill.CoreSkills](Agentic.Skill.CoreSkills.md): Manages bundled core skills that ship with every agent.
- [Agentic.Skill.Parser](Agentic.Skill.Parser.md): Parses SKILL.md files with YAML frontmatter and markdown body.
- [Agentic.Skill.Service](Agentic.Skill.Service.md): Workspace-scoped skill management.
- [Agentic.Storage.Backend](Agentic.Storage.Backend.md): Behaviour for storage backend implementations.
- [Agentic.Storage.Context](Agentic.Storage.Context.md): Bundles a storage backend module with its config for a specific workspace.
- [Agentic.Storage.Local](Agentic.Storage.Local.md): Local filesystem storage backend.
- [Agentic.Strategy](Agentic.Strategy.md): Behaviour for orchestration strategies.
- [Agentic.Strategy.Default](Agentic.Strategy.Default.md): Identity strategy. Passes opts through unchanged, matching current
`Agentic.run/1` behavior exactly.

- [Agentic.Strategy.Experiment](Agentic.Strategy.Experiment.md): Experiment runner for head-to-head strategy comparison.
- [Agentic.Strategy.Registry](Agentic.Strategy.Registry.md): Process registry for strategy modules.
- [Agentic.Subagent.Coordinator](Agentic.Subagent.Coordinator.md): Per-workspace subagent coordinator.
- [Agentic.Subagent.CoordinatorSupervisor](Agentic.Subagent.CoordinatorSupervisor.md): Dynamic supervisor for per-workspace Coordinators.
- [Agentic.Subagent.DelegateTask](Agentic.Subagent.DelegateTask.md): Tool definition for delegating tasks to subagents.
- [Agentic.Telemetry](Agentic.Telemetry.md): Centralized telemetry helpers for Agentic.
- [Agentic.Telemetry.Aggregator](Agentic.Telemetry.Aggregator.md): GenServer that maintains running aggregates of orchestration telemetry events.
- [Agentic.Tools](Agentic.Tools.md): Tool definitions and execution for the agent loop.
- [Agentic.Tools.Activation](Agentic.Tools.Activation.md): Tracks which external tools are "activated" (promoted to first-class
tool schemas) in the current agent session.
- [Agentic.Tools.Gateway](Agentic.Tools.Gateway.md): Gateway tools for lazy tool discovery and execution.
- [Agentic.Tools.Memory](Agentic.Tools.Memory.md): Memory tools for the agent: query knowledge store, write entries,
and use in-process working memory (ContextKeeper).
- [Agentic.Tools.Skill](Agentic.Tools.Skill.md): Skill management tools for the agent: list, read, search, install, remove, analyze.

- [Agentic.Workspace.Identity](Agentic.Workspace.Identity.md): Workspace identity file detection and status.
- [Agentic.Workspace.PathValidator](Agentic.Workspace.PathValidator.md): Validates workspace paths are within the allowed base directory.
- [Agentic.Workspace.Service](Agentic.Workspace.Service.md): Manages workspace file structure and policy.
- [Agentic.Workspace.Templates](Agentic.Workspace.Templates.md): File templates for workspace initialization.

- Exceptions
  - [Agentic.Protocol.Error.NotFound](Agentic.Protocol.Error.NotFound.md): Raised when a requested protocol is not registered.
  - [Agentic.Protocol.Error.SessionError](Agentic.Protocol.Error.SessionError.md): Raised when a protocol session encounters an error.
  - [Agentic.Protocol.Error.Unavailable](Agentic.Protocol.Error.Unavailable.md): Raised when a CLI-based protocol binary is not found or not executable.

## Mix Tasks

- [mix agentic.test_setup_recollect](Mix.Tasks.Agentic.TestSetupRecollect.md): Sets up the Recollect test database for integration tests.

