Current section
Files
Jump to
Current section
Files
docs/guides/support.md
# Supported features and limits
This guide describes ExAgent 3.0.0.
Its runtime targets are Elixir 1.18 / OTP 28 and Elixir 1.20 / OTP 29.
The general model backend uses official ReqLLM 1.31. Applications can implement
`ExAgent.Model` for a different adapter.
## API stability
ExDoc groups modules under **Stable API** and **Candidate API**. Each public
module has a stability label. A **candidate API** label beside a function or
callback overrides its stable module's tier and applies to its default arities.
The versioned inventory in `priv/api-stability.exs` is available in the source
and package.
| Tier | Compatibility |
|---|---|
| Stable | Strict SemVer. A breaking change requires a major release. This tier includes `ExAgent`, `ExAgent.Server`, `ExAgent.Store` and `ExAgent.MCP.Client`. |
| Candidate (experimental) | Public APIs can break in a minor release with a documented migration. This tier includes `ExAgent.Coordination.Composition`, `ExAgent.Coordination.Flow`, `ExAgent.Sandbox` and `ExAgent.Eval.Online.Durable`. |
| Internal | Implementation modules and hidden functions carry no compatibility guarantee. ExDoc omits them. |
A candidate graduates after an application adoption trial and qualification of
the same contract on its real backend. A candidate integration retains its
tier when called through a stable module. The native OpenTelemetry adapter,
versioned catalogue, chat view and reader, input-form helpers, guardrails,
C7 deferred calls and recovery, shared budget adapters and subject erasure
are stable. The stable `Jobs.Durable.recovery/2`
callback was exercised during a rolling deploy and with Oban Lifeline on a
live provider request. Provider coverage follows the named profiles and the
capability limits below. [Upgrade guide](migration.md#check-the-api-stability-tier)
The stable installation path includes `--chat`, `--model`, `--auth`,
`--no-auth` and `--scope` on `mix exagent.install`, all three generators and
`mix exagent.catalog.lock`. The ExAgent calls emitted by the 3.0 generators
remain compatible throughout 3.x. A breaking change to generated code requires
a deprecation cycle or a rewrite provided by `mix exagent.upgrade`. The
goldens check the generated application, host tests and Eval suite against
the stable manifest, including `Server.regenerate/2`,
`Server.regeneration_target/1`, `Eval.Case.new/3` and `Eval.equals/0`.
The offline testing path covers `ExAgent.Case`, `ExAgent.Testing`,
`ExAgent.Fixture`, core Eval cases, evaluators, results, reports and suites,
and `mix exagent.eval`. The case, cassette and report formats are versioned.
`Tools.deftool/3` supports `effect:` with a default of `:write`.
Use `Tool.new/1` to declare a write tool's read-only `reconcile:` callback.
An uncertain tool return can preserve reported usage. The callable receives
`RunContext.call_ref` and the idempotency key from its first dispatch.
`:catalog` is stable for starting a Server, deciding an approval and defining
a `Jobs.Durable` worker. An `ExAgent.Catalog` can be the first argument to
`ExAgent.resume/3` or `resume_stream/3`. The catalogue must supply the saved agent
definition and bindings for the pending revision.
`Catalog.cast/1` recognizes a catalogue from a callback. `Store.namespace/1`
returns the effective namespace of a scoped Store.
`ExAgent.Migration.up/1`, `down/1`, `current_version/0` and
`migrated_version/1` are stable. The unified PostgreSQL version sequence is
append-only. Once a version is published, its DDL stays fixed in both
directions. Put explicit versions in host migrations. The deprecated
per-adapter helpers stay callable through 3.x and are scheduled for removal
in 4.0. [PostgreSQL upgrade](migration.md#upgrade-postgresql-and-roll-out-a-store-format-level)
| Stable surface | Candidate functions, options, fields and variants |
|---|---|
| Tools and context | `Tool.new/1` with `:reservation_cents` or `:max_heap_bytes` and `Continuation.ApprovalRequest.call_ref`. Classifier guard variants in `Capability` and CodeMode's `RunError.confirmed_program_steps`. |
| Testing and Eval | `Eval.judge/1`, `Eval.calibration/3`, `Eval.Case.from_run/2`, `Eval.Suite.capture/1`, `Eval.Suite.labels/0`, scenarios, simulator output, workflow-specific evaluator options and the durable-child `:delegate` stub. |
| Models, messages and usage | `ModelProfile.reasoning_binding` and `file_references`, `Message.Part.User.file_reference/4`, `Message.Response.citations` and the `citations/1` accessors on `Message.Response` and `Result`. `Message.Usage.units` and `with_estimated_cost/2`. |
| Limits and spending | Per-call `:usage_limits`, the agent's `:spend_budget` integration and its run errors, including `{:usage_limit_exceeded, :budget_cents, {:retry_after_ms, wait}}`. The shared account's threshold options, attribution labels and Telemetry events are candidate. |
| Permissions and steering | Argument predicates under `:rules`, `Permissions.decide/3` and `match_rule/3`, and `permission_rule` on approvals and events. `Server.steer_run/3` and `:on_steering`. |
| Catalogue and reconciliation | Catalogue entries for candidate workflows and handoff policy bindings. `:catalog` for Judge, model reconciliation and effect retries. Read and model-preflight variants of `retry_effect/4`. `Jobs.Durable.definition/1` and `delivery_queue/2`. |
| Continuation reads | The `:timeline` option on `Continuation.get/3`. |
| Chat and recovery | Child and Job `:activities`, the scheduled follow-up row, and the input and timer variants of a deferred call and its Chat summary. `:call_ref` and `:wake_at` on deferred calls and summaries. Frame3 `:delegation_path` on inbox items, Chat deferrals and events, and in the authorization target. Recovery's `:follow_ups` startup option and sweep field, and the `:wake_timer` and `:deliver_follow_up` authorizer actions. `:cancel_follow_ups` in `Server.abort/2`. |
| Erasure, Store, memory and diagnostics | Erasure's `:eval` option and `:follow_ups` receipt field. Inventory entries for fork families, scheduled follow-ups, input and timer deferrals. `Store.agent_key_in_namespace?/2`, `Store.retention_subject/3`, `Memory.erase_scope/2` and `Store.Postgres.check_recovery_schema/1`. Doctor's catalogue, model lifecycle and recovery checks. |
| MCP and telemetry | `MCP.Client` with `:tasks`, `:pinned`, `:on_drift` or `:connect_on_start`, HTTP `:authorization_required`, `MCP.Server.Plug` with `:protected_resource`, and the `:mrtr_approval` server option. MCP form supply and `:mcp_input_required` are candidate variants of `Continuation.supply_result/4`. The `:observability` options on `ExAgent` and `Server`, native OTel `:metrics` and the provisional `:service_tier` attribute. The reasoning-prefix reset and embeddings events, catalogue diagnostic tags and GenAI attempt metadata are candidate. |
## Select the capability you need
| Capability | Configuration | Boundary |
|---|---|---|
| Tool permission by argument | `Permissions.new!/1` with `args:` rules | Text globs and candidate `:command`, `:url` and `:path` comparators apply to validated arguments in run, stream, MCP Server and C7. A persisted rule can resume on a compatible worker. [Argument rules](tools-and-output.md#match-permissions-against-tool-arguments) |
| Durable agent definition lock | Stable `Catalog.fingerprint/1`, `mix exagent.catalog.lock` and Doctor `--check-catalog-lock` | The generated chat parks delivery when a protected definition stays unavailable. [Migration](migration.md#lock-durable-agent-definitions-before-deployment) |
| Retry a conversation turn | `idempotency_key:` on `Server.send_message/3` or `Server.steer/3` and `Server.receipt/3` | Chat and Jobs notices share the receipt window. Admission and lookup have a configurable caller timeout. Recovery after a Server restart requires C7 and a retained atomic Store. Unified migration 1 includes Store SQL 5. [Receipt example](runtime-and-events.md#recover-a-turn-admission-after-losing-the-reply) · [Migration](migration.md#postgresql-turn-admission-receipts) |
| Cancel a specific turn | `Server.turns/2` and `Server.abort_run/3` with the reserved `run_id` | Lists queued, active, paused and blocked turns without content. C7 keeps a queued cancellation in the keyed receipt through its expiry. A confirmed finish retains its terminal. Cancellation with only model requests unconfirmed preserves accepted history. Reconciliation of a blocked cancellation emits the settled event. [Cancellation](runtime-and-events.md#cancel-and-checkpoint) |
| Stop a conversation owner | `Conversations.stop/3` | The acknowledgement covers the owner exit and cancellation of queued work with live keys. An unconfirmed stop can leave an admitted receipt. Check the key after reopening. [Lifecycle](runtime-and-events.md#start-a-conversation) |
| Drain a conversation manager | `Conversations.drain/2` | Closes local admission, finishes the active turn and confirms queued cancellations before the owner exit. [Drain setup](runtime-and-events.md#drain-a-conversation-manager) |
| Offline capacity measurements | Run `test/support/load_probe.exs` in the source checkout | Server, stream, long runs, Frame3, ETS, MCP and event sinks. [Load measurements](observability.md#offline-load-measurements) |
| Portable public values | Model settings, messages, snapshots, event export and Eval reports | Run admission and the history reader validate message fields and unique JSON keys. Text and map reports omit evaluator reasons by default. [Migration](migration.md#evaluation-reviewers) |
| Image results from function tools | `result_mode: :multimodal`, return `{:content, parts}` | OpenAI Responses, Anthropic Messages and Gemini 3+ with image input. [Tool example](tools-and-output.md#return-an-image-to-the-model) |
| Isolated code execution | `Sandbox.tools/2` with a host-selected backend and scope | Approval, bounded text and optional image results. Docker provides local isolation. Queries can use the Job ID and report unavailable or timed-out lookups as tool errors. [Sandbox guide](tools-and-output.md#run-code-in-an-isolated-sandbox) |
| Runtime reads and chat history | Server and Session queries with `timeout:`, `Server.history_page/2` and generated LiveView | Bounded pages restore retained accepted finals from guarded Server snapshots. Plain conversations and conversations with a stream guard can show provisional drafts. The chat recovers pending admission keys stored in the current tab. [Phoenix integration](recipes/framework-integrations.md#liveview-events-and-reconnect) |
| Build a chat UI | Stable `ExAgent.Chat`, `Chat.Reader` and `Chat.InputForm`; candidate `Chat.SSE` and `Chat.AISDK` | Shared view state includes a failed turn diagnostic. SSE replays conversation state, C7 controls and activity. The AI SDK 7 encoder streams a root turn with text, reviewed summaries, tools and approvals across retained C7 attempts. [HTTP and SSE](recipes/framework-integrations.md#serve-a-conversation-over-http-and-sse) |
| Stream AG-UI 1.0 events | Candidate `Chat.AGUI` | Encodes one root Server attempt with answer deltas, admitted tools, step state, C7 interrupts, observed activity and opt-in reviewed summaries. The Phoenix application handles admission, decisions and transport. [AG-UI recipe](recipes/framework-integrations.md#serve-ag-ui-from-phoenix) |
| Livebook and Ash | Candidate path packages `kino_exagent` and `exagent_ash` | Notebook rendering and chat for a trusted scope. Authorized Ash tools for selected public actions. [Package setup](recipes/framework-integrations.md#livebook-and-ash) |
| Process broker messages as durable agent jobs | Broadway producer demand, `Jobs.Durable` and `RateLimiter` | The broker acknowledges confirmed durable admission. Provider admission happens in the worker. [Broadway recipe](recipes/framework-integrations.md#ingest-durable-jobs-with-broadway) |
| Bounded OTP controls | `Conversations.stop/3`, Server attach/detach and demand ACK, `Jobs.cancel/3`, `MCP.Server.close/4` | `timeout:` covers owner lookup and the caller's wait. Lost replies after dispatch leave the result unconfirmed. [Runtime guide](runtime-and-events.md#start-a-conversation) |
| Lazy conversation owners | `Conversations` with `max_activations:`, `max_activation_waiters:` and `factory_timeout:` | One cold activation per key, manager and node. The manager bounds retained waiters and factory work. A caller's deadline covers lookup, activation and owner retry. Initialized owners bypass the cold activation limits. [Runtime guide](runtime-and-events.md#start-a-conversation) |
| Generated chat on connected replicas | `registry: :global` on each Conversations manager and a shared PostgreSQL Store with durable C7 | LiveView attaches to the registered owner and restores confirmed turns from PostgreSQL after an owner stops. [Replica rehearsal](recipes/framework-integrations.md#deploy-three-replicas) |
| Demand delivery | `Server.attach/3`, `Server.events_since/3` and `Server.ack_events/4` | One pending notice per attached reader, with event and byte limits per batch. Acknowledgement follows application of the batch or the recovery page. [Demand reads](runtime-and-events.md#read-conversation-events-on-demand) |
| Correct a live run | `Server.steer_run/3` or `:on_steering` and `Steering.correct/2` | FIFO at a fresh model step. Volatile roots and explicitly addressed children. [Runtime guide](runtime-and-events.md#correct-a-live-run) |
| Installation diagnostics | `mix exagent.doctor --model provider:model --json` | The local catalogue supplies model retirement warnings. The running host can check PostgreSQL Store schema with `--check-store`, C7 headers with `--check-run-headers`, durable Jobs with `--check-jobs` and shared quota with `--check-quota`. [Troubleshooting](troubleshooting.md#inspect-an-installation) |
| Executable approval tutorials | Run `examples/supervised_approval.exs` or open `examples/durable_approval.livemd` | The offline script restores a supervised conversation and resumes its reserved run. The notebook shows an edited approval, an owner crash, one publication and the Budget balance. [Durability](durability-and-approvals.md#use-persisted-approval) |
| Tools and streaming in one line | `ExAgent.new(model: "anthropic:claude-sonnet-5-5", tools: tools)` | The provider route selects the profile. Invalid argument envelopes block the batch before execution. Buffered Responses preserves the original JSON for duplicate-key checks. [Argument envelope](models-and-limits.md#tool-argument-envelope) |
| Additional Chat Completions profiles | `:chat_tools_v1` on Ollama, LM Studio, vLLM, Groq, DeepSeek, Mistral and xAI | HTTP and SSE loopback qualified with stock ReqLLM 1.31.0, including plain thinking. Ollama approval and resume passed on ETS and PostgreSQL. Live P1 on Inkling-2-Mini via the `:vllm` route on a llama.cpp server recorded 200/200 valid envelopes and matching tool receipts, 0/200 exact final answers and 3/7 `qualify` cases. Cerebras stays on `:text_v1` because stock rewrites the wrapped argument schema. [Local setup](models-and-limits.md#local-models) · [Profile details](models-and-limits.md#profiles) |
| Azure OpenAI tools | Chat Completions with `:chat_tools_v1` and Responses with `:openai_responses_v1` | Loopback qualified, pending G3. Chat approval and resume were exercised on ETS and PostgreSQL. [Azure setup](models-and-limits.md#azure-vertex-bedrock) |
| Vertex AI tools | Gemini with `:gemini_v1` and Claude with `:anthropic_messages_v1` | Loopback qualified, pending G3. Stock OAuth and the project and region routes were exercised over HTTP and SSE. [Vertex setup](models-and-limits.md#azure-vertex-bedrock) |
| Explicit credentials or endpoint | `Models.ReqLLM.new/1` or `Model.resolve/2` with `api_key:` | The instance supplies the key required by its provider. Ollama's stock route uses no key. |
| OpenRouter tool routing | `provider: :openrouter`, bounded `openrouter_provider:` | Provider routing, reasoning mode and effort are bound to the conversation. |
| Amazon Bedrock Claude tools | Catalogue tool-enabled Claude models select `:anthropic_messages_v1` on InvokeModel. | Loopback qualified, pending G3. The fixture verifies two parallel IDs, AWS EventStream, and approval and resume on ETS and PostgreSQL. Stock keeps the first occurrence of duplicate argument keys. [InvokeModel evidence](models-and-limits.md#amazon-bedrock-invokemodel) |
| Amazon Bedrock Converse text | `:text_v1` with buffered text. | Stock Converse merges some parallel calls and loses execution ownership. Tool requests fail before transport. [Converse evidence](models-and-limits.md#amazon-bedrock-converse) |
| Reasoning with tools | `reasoning_mode: :enabled` on Anthropic, OpenAI Responses, OpenRouter or Gemini | Compatible signed or encrypted reasoning is replayed unchanged. Prefix-bound models report resets on incompatible input. With Anthropic or OpenRouter thinking, tool choice is `auto`. `:disabled` does not promise zero thinking. [Prefix contract](models-and-limits.md#preserve-prefix-bound-reasoning) |
| Assistant narration | OpenAI Responses, `Part.Text.phase` and `:commentary_delta` | Native history retains the phase. G3 qualified commentary with tool calls and replay in buffered and streamed runs. A commentary-only terminal is covered by loopback and still needs live evidence. [Narration](models-and-limits.md#read-assistant-narration) |
| Tool timeouts, heap and exclusive tools | `ExAgent.Tool` fields `timeout`, `max_heap_bytes` and `concurrency` | Owned tasks apply tool-specific thresholds. Exclusive calls run alone and results keep call order. [Execution controls](tools-and-output.md#control-how-tool-calls-run) |
| Chain tools in one turn | Candidate `ExAgent.Tool.CodeMode` capability | Live sync and streaming runs chain directly offered JSON tools with per-step policies, limits and traces. Use ordinary tool rounds for a persisted chain. [Program guide](tools-and-output.md#chain-tools-in-a-program) |
| Tool scheduling | `max_concurrent_tools:` on the agent, run or workflow step | The option caps active calls per parallel group. Exclusive calls run alone. Results keep call order. A durable workflow also budgets the entire batch before dispatch. [Workflow tool batches](coordination.md#budget-durable-tool-batches) |
| Tool result schemas | `Tool.new(result_schema: ...)` | JSV checks the effective JSON value before previews or offload, including recovery of a raw confirmation. Mismatches become confirmed tool errors. [Result contract](tools-and-output.md#validate-a-tool-s-result) |
| Tools that require external completion | `Tool.new(requires_deferral: true, ...)` | Frame3 routes deferred results from the root and its delegates through the root inbox. Volatile runs and Composition/Flow leaves reject required deferrals before dispatch. [Deferred results](durability-and-approvals.md#defer-a-tool-call) |
| Tool output limits and repeated calls | `Tool.OutputLimit`, `Tool.RepeatGuard` capabilities | Results over `:max_payload_bytes` (1 MiB by default) still fail; repeated-call notes never block. |
| Large tool results by reference | `Tool.OutputLimit.new(offload: {module, handle})` with `Tool.ResultStore.ETS` or `Tool.ResultStore.Postgres` | The originating run can page or search live references. ETS shares quotas per instance. PostgreSQL shares quotas per host scope and keeps results across application restarts. [Setup and cleanup](tools-and-output.md#keep-references-readable-after-an-application-restart) |
| Context editing | `Compaction.ClearToolResults`, optionally followed by `Compaction.Summary` | Request-only markers preserve references. Set `preserve_signed_prefix: true` on Summary for the same provider boundary. |
| Provider context overflow | `ExAgent.new/1` option `:context_overflow` | One separately admitted retry per live run, preserving signed history and steering. Durable workflow admission checks all declared steps. [Configuration and stream/durable limits](models-and-limits.md#recovering-from-a-provider-context-overflow) |
| Background tools and sub-agents | `ExAgent.Jobs` with `background/2`, `agent_tool/1`, `tools/2` | Volatile jobs run outside the starting run's deadline, limits and cancellation. Both backends return `Jobs.Job` snapshots and can deliver metadata-only notices while readers wait for results. [Scoped Jobs](runtime-and-events.md#run-work-in-the-background) |
| Per-execution budget | `usage_limits:` on a direct run, stream, resume or Server turn | The lowest threshold applies alongside the agent and saved C7 limits. Strict accounting takes precedence. [Usage and spend](models-and-limits.md#bound-requests-and-tool-calls) |
| Shared tenant spend | Stable `UsageLimits.Budget` with its ETS or PostgreSQL adapter | The candidate agent option `:spend_budget` reserves funds for each model attempt, Media request and separately priced tool. PostgreSQL keeps unconfirmed holds across windows and supports reconciliation. [Setup](models-and-limits.md#reserve-a-shared-spend-budget) |
| Durable background agents and tools | Optional Oban and PostgreSQL, `Jobs.Durable.status/2` and `wait/3` (positive milliseconds) | Atomic admission and wake, per-job budget, qualified terminal usage and cost, C7 in `exagent_snapshots` and deduplicated Server notices. A certified quota wait has `Job.retry_at`. Held claims have a quota diagnostic for recovery. [Setup and recovery](recipes/continuation-jobs.md#durable-background-agents-and-tools-with-oban) |
| Large tool catalogues on demand | `Tool.Search` capability with `deferred:` tools | Keyword search, not semantic; hiding a tool is not a permission. |
| Final answer checks and reviewers | `output_validators:`, `ExAgent.Judge` | Retries share `:output_retries`. A pure, versioned validator chain can certify a durable Flow branch's veto. [Output validators](tools-and-output.md#check-the-final-answer) |
| Blocking guardrails | `ExAgent.Guardrail` via `:capabilities` | Live runs and root agent continuations support input, stream windows, validated output and both function-tool stages. Withheld tool returns keep effect receipts. Root C7 certifies stream vetoes, tool checks and final delivery. Composition and Flow support both tool stages. [Guardrails](tools-and-output.md#stop-a-run-with-a-guardrail) |
| Consulting a stronger model | `ExAgent.Tool.Advisor` | Text transcript only; the advisor has no tools. |
| Measuring agent quality | `ExAgent.Eval` with `Eval.Report.compare/2` and candidate `Eval.calibration/3` | Baseline gates require comparable case pairs with evidence and exclude attempts with grading errors. `grading_coverage` counts attempts with emitted grades. [Testing guide](testing.md#compare-runs-when-the-suite-changes) |
| Sampled production evaluation | `Eval.Online.offer/3` with an optional `Jobs.Durable` grading backend | Offers confirmed run, Server, Session and C7 terminals to a bounded queue. Content is off by default. C7 uses an authorized source Store. Durable grading binds the evaluator version and reuses its export reservation across deadline changes. Versioned results and OTLP dispatch share the evaluation ID. The callback acknowledges dispatch with `:ok`. [Online evaluation](testing.md#sample-confirmed-terminals) |
| Testing application tools | `ExAgent.Fixture` with `:tool_stubs`, `ExAgent.Testing.with_tool_stubs/2` | Strict per-run substitutes for tools and named output functions, including delegated children, streams and durable workflows. [Testing guide](testing.md#replay-with-tool-substitutes) |
| Production regression cases | Candidate `Eval.Case.from_run/2` and stable `ExAgent.Case` | Project a settled agent terminal with an explicit redactor. Use TestModel scripts, strict tool substitutes and cassettes in CI. Assertions cover tools, output, qualified usage and cost, and events. [Testing guide](testing.md#turn-a-production-failure-into-a-ci-case) |
| Exact stream replay | `ExAgent.Fixture` or Eval `:fixtures` with `:stream_events` | Cassette v1 matches by path, fingerprint and local ordinal. Opt in to bounded normalized events before the validated terminal. [Testing guide](testing.md#record-and-replay-a-stream) |
| Multi-turn conversation evals | `Eval.Scenario` with scripted C7 review or `Eval.Simulator` for model-driven users | Repeats score the whole trajectory. JSON v4 keeps turn metadata and separate simulator usage. [Script a conversation](testing.md#script-a-conversation) · [Simulate the user](testing.md#simulate-the-user) |
| Repeat and tool argument scoring | `Eval.Report`, `mix exagent.eval --min-pass-all` and `Eval.tool_arguments/1` | Case and suite pass@k and pass^k, replay gating and per-field credit. [Eval testing](testing.md#measure-quality-with-evals) |
| Long-term memory | `ExAgent.Memory.tool/2`, `capability/2` and `preload/3` with ETS or Postgres | Tool reads by default. The preload byte limit covers the whole block. Use a read-only tool for operator guidance. Durable Composition and Flow support tool reads. [Memory](memory.md) |
| Run checklist and mounted files | `ExAgent.Plan.capability/1`, `ExAgent.Workspace.capability/1` | Run-local plan and scratch, including checklists restored per Composition or Flow node. Scoped Memory, optional POSIX directory and read-only result references. [Plan and workspace](memory.md#give-a-run-a-plan-and-a-workspace) |
| Reusable compaction summaries | `Compaction.Summary` with `memo: Compaction.Memo` | In-memory and bounded; a lost memo costs one extra summary. |
| Native JSON Schema output | `output_mode: :native` on an OpenAI Chat or Responses model, or an Anthropic model whose catalogue declares `json.schema` | OpenAI receives a non-strict schema. Anthropic constrains decoding with a reduced copy. JSV checks the full schema locally. OpenRouter and Gemini support tool and prompted output. |
| Structured output schemas | Pass an object schema map for a string-keyed map result. Declare `{:ecto, "~> 3.14 and >= 3.14.3"}` for Ecto struct results | Map output requires object data and at most 64 KiB of schema per branch. Both support tool unions, output functions, partial previews and durable schema identity. [JSON map output](tools-and-output.md#return-a-json-object-without-ecto) |
| Prompted JSON output | `output_mode: :prompted` on any model, including `:text_v1` | The schema travels in a request instruction. JSV validates the answer and Ecto modules additionally apply their changeset. Durable composition steps refuse the instruction projection. |
| Images and documents | `ExAgent.run(agent, [%{type: "text", ...}, %{type: "image", ...}])` | PDFs need a document-capable transport. Input attachments count toward history. The host checks files before building the prompt. [Attachment boundaries](models-and-limits.md#send-images-and-documents) |
| Audio attachments | `Model.profile(model).supports_audio_input` and a Base64 `file` part | ReqLLM enables it on `:gemini_v1` with catalogue audio input. Each clip uses a supported MIME, is limited to 1 MiB decoded and spends the history budget. Buffered, streamed and C7 replay are verified offline. [Audio input](models-and-limits.md#attach-audio-to-a-gemini-turn) |
| Provider file references | `Message.Part.User.file_reference/4` and `Model.profile(model).file_references` | Gemini accepts hosted PDFs. G3 qualified hosted PDF, plain text and PNG in buffered and streamed Anthropic Messages with C7 replay on 2026-11-26. Every Fallback leaf must support the reference. [Gemini](models-and-limits.md#attach-a-provider-hosted-pdf-to-a-gemini-turn) · [Anthropic](models-and-limits.md#attach-an-anthropic-hosted-file) |
| Buffered media operations | `Media.transcribe/3`, `speak/3`, `generate_image/3`, `ocr/3` and `tools/1` | Candidate API. G3 qualified Whisper transcription and preprocessing, TTS-1 as a run-scoped tool and GPT-Image-2 on 2026-11-26. Strict WAV decoders need finalized lengths on some TTS-1 files. Vertex OCR has loopback evidence and needs regional credentials for a live run. [Media qualification](models-and-limits.md#qualify-media-providers) |
| Embeddings and rerank | `Embeddings.embed/3`, `rerank/4` and `tools/1` | Candidate API. Quota and spend admission, qualified usage and run-scoped artifacts. One stock request per call. [Embeddings and rerank](models-and-limits.md#embed-text-and-rerank-documents) |
| Decision classifiers | `ExAgent.Classifier`, `Classifier.ReqLLM`, `Classifier.NxServing` | Candidate API. Direct decisions, live guardrails, Eval grading and Flow routing from a confirmed label. The classifier tool uses C7 effect receipts. OpenAI and Gemini loopback coverage. [Decision classifiers](models-and-limits.md#classify-with-a-decision-model) |
| Response citations | `Message.Response.citations/1`, `Result.citations/1` | Bounded source references, excerpts and verifiable ranges. [Citation profiles](#citation-profiles) |
| Prompt caching | `Models.ReqLLM.new(prompt_cache: ...)` | OpenRouter `cache_control` breakpoints, ReqLLM's Anthropic breakpoints or an OpenAI cache key; other providers reject it. |
| Retries and fallback models | `Models.Fallback.new(models: [...])` | The first model stream event commits the route unless it is a retryable error. Cross-model history needs `foreign_history: :portable`. The group can opt in to [route around quota refusals](models-and-limits.md#fall-back-after-a-confirmed-quota-refusal). |
| Local provider quotas | Host-supervised `ExAgent.RateLimiter` and agent `:rate_limiter` | Per-node FIFO for RPM, estimated TPM, concurrency and cooldowns. Registry names allow dynamic per-tenant quotas. [Configuration](models-and-limits.md#share-a-provider-quota-across-runs) |
| Provider quotas across replicas | `RateLimiter.Adapter` with optional `RateLimiter.Postgres` | One scope and policy per account across replicas. Expiring per-attempt permits, idempotent settlement, and bounded background retries after an unacknowledged report. Admission refuses immediately when quota is full. [Configuration](models-and-limits.md#share-a-provider-quota-across-replicas) |
| Final answer at the step limit | `ExAgent.new(on_max_steps: :final)` | The last step cannot call function tools; a call there is not executed. |
| Closing request near a usage limit | `ExAgent.UsageLimits.WrapUp` | Candidate capability for buffered, streamed and standalone C7 runs. It offers a final answer without function tools. [Closing request](models-and-limits.md#close-before-a-run-limit) |
| Automatic review of a persisted approval | `ExAgent.Judge.Approval` | Candidate API. Records an authorized classifier or text judge decision through the C7 approval CAS. [Automatic review](durability-and-approvals.md#automate-a-persisted-approval) |
| Deterministic local runs | `model: "test"` or `%Models.Test{script: ..., profile: ...}` | Usage defaults to unknown. Supply a usage fixture or script exact chunks, cumulative usage, tools and typed failures. [Testing guide](testing.md) |
| Model terminals | `Message.Response.finish_reason` | New replies require an explicit success finish. Incomplete finishes are failed runs with qualified usage. [Model terminals](models-and-limits.md#model-terminals) |
| Skills | `ExAgent.new(skills: ExAgent.Skills.from_dir!(dir))` | Agent Skills `SKILL.md` subset; trusted host content; scripts are never executed. |
| Stateful conversations | `AgentSupervisor` and `Server` | Queue admission is volatile; the application handles backpressure. |
| Shared-state coordination | `Session`, `Composition`, `Flow` | Trusted host definitions, explicit ownership and bounded branches. A workflow can reconcile a lost model response with the saved leaf binding. `Continuation.get/2` supplies a terminal read reference. [Workflow recovery](coordination.md#recover-a-workflow-after-an-owner-crash) |
| Run a template over a list | `Flow.new(kind: :map, template: step, ...)` | A durable manifest with unique item IDs and a configurable item cap of up to 32. [Manifest example](coordination.md#run-a-flow-over-a-manifest) |
| Retry a lost Flow model request | `Continuation.retry_effect/4` with a recovered branch binding | The operator accepts possible duplicate cost. The trusted leaf and codec validate the saved request. A retry needs another request slot. Confirmed branch outcomes stay in the journal. [Workflow recovery](coordination.md#recover-a-workflow-after-an-owner-crash) |
| Recover a tool effect | `Tool.effect`, `Continuation.retry_effect/4` and `reconcile_tool/4` | Agent, Composition and Flow retain the effect class. An authorized host can retry a read or look up a write's receipt by the original key. [Effect recovery](durability-and-approvals.md#recover-a-declared-tool-effect) |
| Model-directed handoff | `ExAgent.Handoff`, `Session.chat/4` | A specialist answers within the same run in sync, stream, Server and volatile Session. Root C7 and durable Jobs resume a committed handoff under its bound destination policy. A per-destination grant allows bounded audio on a capable model. [Handoff guide](coordination.md#let-a-model-hand-off-the-turn) |
| Conversation checkpoints | `Store.ETS` or `Store.Postgres` | Tagged snapshot inventories report backend and decoding errors. ETS is ephemeral. PostgreSQL requires the application's Repo and database lifecycle. |
| Upgrade a PostgreSQL installation | Stable `ExAgent.Migration`. Candidate `mix exagent.upgrade` and `Store.finalize_format/2` | Apply the versioned schema. When a future release adds a format level, deploy compatible readers before finalizing it. [Upgrade guide](migration.md#upgrade-postgresql-and-roll-out-a-store-format-level) |
| Erase a scoped subject | Stable `ExAgent.Retention.erase/3` and `Retention.inventory/2` | ETS and PostgreSQL fence Server, Session and durable workflow writes. The ordered receipt reports local deletion, retention and provider references. The host maps retained IDs to associated stores. [Erasure guide](migration.md#erase-a-conversation-by-subject) |
| Custom Store contract tests | `use ExAgent.Store.ContractCase` in ExUnit | Checks snapshots, namespace isolation, advertised CAS and optional Session and header callbacks. Use `Store.agent_key_in_namespace?/2` in a header callback. [Store guide](durability-and-approvals.md#test-a-custom-store) |
| Segmented PostgreSQL checkpoints | `segments: true` on the Store descriptor | Opt-in incremental writes can reuse unchanged history fragments on a guarded finish. Reads assemble and validate the full record. [Migration](migration.md#optional-postgresql-segments) · [Load measurements](observability.md#optional-segmented-store) |
| Browse saved conversation snapshots | `Store.list_agent_headers/2` | Supervised ETS and PostgreSQL schema v2 page standalone snapshots. The host inventories chats with continuations. [Store guide](durability-and-approvals.md#browse-conversation-headers) |
| Browse persisted agent runs | `Continuation.list_runs/2` and `Continuation.get/2` | PostgreSQL pages require unified migration 1, which includes Store SQL 4. Scoped pages read revision headers. Details include `:continuation` for a ready or approved run and `:lease_until` for a claimed run. Add `diagnostics: true` for the journal body. [Store guide](durability-and-approvals.md#find-work-across-runs) |
| Deploy versioned definitions and keep chat history | Stable `ExAgent.Catalog`, `Continuation.census/2` and `Continuation.adopt/4` | Exact saved bindings and a header-only census scoped to ETS or PostgreSQL. Authorized adoption binds the next turn of a settled conversation. Doctor checks the configured catalogue. [Versioned deployments](durability-and-approvals.md#deploy-with-open-continuations) |
| Supervise recovery | Stable `Continuation.Recovery`, `Recovery.Policy` and `Continuation.reconcile_tool/4` with a scoped ETS or PostgreSQL Store | One page per interval. Built-in or custom decisions require the regular authorizer. The host resumes conversations. [Recovery setup](durability-and-approvals.md#supervise-recovery-for-a-namespace) |
| Recover an Oban job | `Jobs.Durable.recovery/2` and Oban Lifeline | An opted-in, version-matched static Frame3 job continues via its persisted delivery. Unconfirmed writes require evidence from their declared lookup. [Jobs runbook](recipes/continuation-jobs.md#recover-a-job-after-node-loss) |
| Inspect ExAgent in LiveDashboard | Companion package `exagent_dashboard` 0.1.0 in the checkout | Bounded refreshes, content-free events, usage provenance and optional Store inventories with per-read namespace authorization. [Runtime guide](runtime-and-events.md#inspect-running-processes) |
| Persisted approval | `Continuation`, a scoped Store, bindings and an authorizer | PostgreSQL writes require unified migration 1, which includes Store SQL 4. Live writers renew claims. `Server.resume/3` checks the exact approved reference. Uncertain external effects need explicit reconciliation. [Continuations](durability-and-approvals.md#configure-an-agent-continuation) |
| MCP tools | `ExAgent.MCP.Client` with stdio or Streamable HTTP | Catalogue reuse and concurrent lookups follow the current identity and peer TTL. Continuation-bound clients discover live schemas. Calls yield text, opt-in images or validated maps. A lost acknowledgement gives `:result_unconfirmed`. HTTP supports a Finch HTTP/1 pool or direct HTTP/1.1 with a credential callback. W3C tracing is opt-in. [Catalogue caching](mcp.md#cache-tool-catalogues) · [MCP credentials and tracing](mcp.md#rotate-http-credentials) · [MCP receipts](mcp.md#own-failures-and-cleanup) |
| MCP HTTP authorization | `MCP.Client`, `:headers_provider`, candidate `MCP.OAuth` and optional `MCP.Server.Plug` `:protected_resource` | The client returns Bearer challenges. The Plug serves protected resource metadata and sends challenges based on the host verifier. The OAuth metadata helper requires advertised PKCE S256 support. [Client](mcp.md#handle-an-http-authorization-challenge) · [Server](mcp.md#publish-oauth-protected-resource-metadata) |
| MCP Tasks (candidate) | `MCP.Client.Tasks` on a client with `tasks: true` and HTTP `2026-07-28` | Server-directed dispatch, status and result by ID, and cooperative cancellation. Frame3 reconciles the stored deferral through its root with the same endpoint and principal. [MCP Tasks](mcp.md#call-long-running-mcp-tools) |
| Publish tools and agents | `ExAgent.MCP.Server`, optional `ExAgent.MCP.Server.Plug` | Default revision `2025-06-18` with sessions, progress and opt-in client approvals. Optional stateless `2026-07-28` with routing header checks and synchronous tools. Both serve static resources and prompts, and support a deadline-bound catalogue policy per principal. [MCP](mcp.md#publish-tools-and-agents) · [Catalogue policy](mcp.md#authorize-the-catalogue-per-principal) |
| Traces | Native OpenTelemetry GenAI v0.1.0 and the optional ReqLLM bridge | The host owns SDK and exporter. Content is off by default. Count Fallback attempts by the [dispatch attribute](observability.md#fallback-requests-and-provider-attempts). |
| C7 attempt links | `OpenTelemetry.new(link_continuations: true)` on both attempts | A confirmed pause can keep the recording span's IDs until the next claim. [Traced attempts](observability.md#link-paused-and-resumed-attempts) |
| Export UI events | `ExAgent.Event.strip_content/2` | Clears classified content and host metadata. Keeps the selected `:run_finished` output branch and opaque tool invocation references. Select top-level metadata with `:metadata_keys`. [Runtime guide](runtime-and-events.md) |
| Framework metrics | `ExAgent.Telemetry.metrics/0` with the optional `:telemetry_metrics` dependency | Bounded counts and latency summaries for LiveDashboard and reporters, including each dispatched model leaf. [Reporters](observability.md#livedashboard-and-telemetry-metrics-reporters) |
| GenAI metrics | `OpenTelemetry.new(metrics: [...])` with the optional experimental meter SDK | Agent, workflow, tool and inference durations, plus separate histograms for available input and output totals. The optional ReqLLM bridge adds stream timing. [Metrics setup](observability.md#optional-metrics) |
| Terminal observers | Capability `after_run/2` | Receives a result or run error per closed attempt, including durable pauses. Each observer has a separate process and a 250 ms budget. |
| Structured stream previews | `{:output_partial, %{step: step, output: draft}}` | Ecto casts partial structs. JSV checks partial maps with `required` disabled. Terminal validation checks the complete answer. |
| Metrics | Opt-in ReqLLM bridge with experimental API/SDK 0.6 and a reader | Fixed instruments and bounded model labels; metric destination is separate from trace ingestion. |
Capability declarations configure admission; they cannot prove a particular
provider follows the contract. Verify your exact model, endpoint, routing and
options before relying on tools, streaming or native output in production.
Unrepresented reasoning, modality or provider-block combinations reject
explicitly instead of silently falling back.
## Persistent execution by frame
The table covers C7 admission. Each supported cell still depends on the
applicable model profile, Store, host policy and journal evidence.
| Capability | Agent and Server (Frame 3) | Agent delegate (Frame 3) | Composition (Frame 10) | Flow (Frame 11) |
|---|---|---|---|---|
| Static model-directed handoff | Yes | No | No | No |
| Deferred tool result | Yes | Yes | No | No |
| Pure input guardrail | Yes | No | No | No |
| Pure stream guardrail | Yes | No | No | No |
| Pure final output guardrail | Yes | No | No | No |
| Pure tool-input and tool-output guardrails | Yes | No | Yes | Yes |
| Tool guardrails alongside durable delegation | No | No | Yes | Yes |
| Tool guardrails with custom tool rehydration | No | No | No | No |
| Inline classifier guardrail | No | No | No | No |
| Classifier as a journaled tool | Yes | Yes | Yes | Yes |
| Tool program (code mode) | No | No | No | No |
| Shared spend budget on an agent definition | Yes | Yes | Yes | Yes |
| Provider context-overflow recovery | No | No | No | No |
| Plan with its journal-backed projection | Yes | Yes | Yes | Yes |
| Other rewrites of model request history | Yes | Yes | No | No |
| Changes to bound tools or model settings between requests | Yes | Yes | No | No |
| Prompted JSON map output | Yes | Yes | No | No |
| Native JSON map or map output with free text | Yes | Yes | No | No |
| Live steering | No | No | No | No |
| Capability-supplied model answer before dispatch | No | No | No | No |
| Capability-supplied answer after model failure | No | No | No | No |
| Operator-supplied tool outcome via reconcile/5 | Yes | Yes | No | No |
| Declared tool lookup via reconcile_tool/4 | Yes | Yes | Yes | Yes |
| Retry of a pending read tool | Yes | Yes | Yes | Yes |
| Manual retry of a write with accepted duplicate risk | Yes | Yes | No | No |
| Retry of a lost model request | Yes | Yes | No | Yes |
The host supplies the bound handoff catalog and authorizes administrative
commands. A declared write lookup uses reconciliation. Retry requires an
eligible uncertain effect and a new claim before dispatch. A structural
workflow's read retry requires a pending dispatch in an active leaf batch.
Workflow leaves inherit a declared spend budget through the execution scope.
The [durability guide](durability-and-approvals.md) explains these conditions.
## Citation profiles
| Profile | Offline citation evidence | Qualification |
|---|---|---|
| `:openai_responses_v1` | Buffered and streamed `url_citation` and `file_citation` retain the URL or attachment ID when the response has no identified commentary. Stock annotation flattening leaves answer ranges unset. | Offline, pending live qualification |
| `:gemini_v1` | Buffered and streamed grounding web sources. Stock's retained grounding segment can supply a checked range in the leading part. | Offline, pending live qualification |
| `:anthropic_messages_v1` | The normalized-source fixture retains document index, page, character or block coordinates, and excerpt. The native Messages fixtures demonstrate stock 1.31's loss of document citations in both modes. | Offline, pending live qualification and upstream citation retention |
These fixtures cover response shapes and the local codec. Read the typed
citations in [Read citations from a response](models-and-limits.md#read-citations-from-a-response).
The source checkout has opt-in cases for all three profiles in the
`--suite citations` runner. Live citation evidence is pending.
## Accounting and effects
Host request/tool counters count admissions. Token values have declared
normalized or reported quality; cost is an estimate in cents. Missing usage or
price is unknown rather than zero. A limit checked after a response is not an
invoice ceiling for work already in flight. Parent totals include their children.
If a child owner dies during a request, the ledger keeps the observations
received so far and reports partial coverage for that request.
A timeout, cancellation, lost storage acknowledgement or process death cannot
prove an external effect did not happen. Checkpoint retry saves the same state;
it does not rerun a model or tool. For an uncertain write, reconcile the actual
result before granting another execution attempt. A declared read can receive
a separate recovery attempt.
## Resource boundaries
Run deadlines and request/tool limits control owned admission. Host response and
history retention limits apply after stock decoding; there is no upstream hard
RAM bound before materialization. Compaction reduces the next request context,
not the canonical persisted history. Arbitrary application callbacks and
external systems have their own resource and cancellation contracts.
Flow permits at most 32 branches/concurrent workers, separate 64 KiB branch/merge
JSON bounds and an 8 MiB journal. Fail-fast cannot undo a sibling's completed effect.
Collect continues eligible siblings after a confirmed pre-dispatch refusal
for usage, step deadline, provider quota or maximum steps.
See [Coordination](coordination.md) for construction and failure policy.
## Observability transport
Langfuse and Opik receive native spans through the application's OTLP exporter.
Default empty input/output previews indicate disabled content capture; inspect
attributes for IDs, status and accounting. Exporter callback success and an HTTP
2xx do not prove every span was retained by the destination.
Direct native OTLP HTTP can retain exporter-owned profiles, atoms and active
sockets after timeout/shutdown. For bounded transport ownership, use the
[disposable VM](recipes/otlp-isolated-transport.md) or
[Collector](recipes/otlp-collector-transport.md) recipe.
A finite processor restart budget limits recreation but does not repair cleanup.
Size the queue for sampled physical attempts, including Fallback retries.
See [Observability](observability.md) for authentication, privacy and lifecycle.
## Dependency diagnostics
Some stock TOML, WebSockex and gproc dependencies emit compiler diagnostics.
Functional operation and a warning-free dependency graph are different properties.
ExAgent uses official dependency releases; applications should review their
chosen graph and avoid treating suppression as a repair.