Current section
Files
Jump to
Current section
Files
mix.exs
Code.require_file("docs/markdown_formatter.exs", __DIR__)
defmodule ExAgent.MixProject do
use Mix.Project
@source_url "https://github.com/akorda-software/exagent"
@version "3.0.0"
def project do
[
app: :exagent,
version: @version,
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
# This separate consumer application is exercised by its own runner.
deps: deps(),
dialyzer: [
plt_add_apps: [
:mix,
:eex,
:ex_unit,
:igniter,
:opentelemetry,
:opentelemetry_api_experimental
],
plt_local_path: System.get_env("EXAGENT_DIALYZER_LOCAL_PLT"),
plt_core_path: System.get_env("EXAGENT_DIALYZER_CORE_PLT")
],
aliases: aliases(),
package: package(),
description: description(),
# ex_doc
name: "ExAgent",
source_url: @source_url,
docs: docs()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp description do
"A layered agent framework for Elixir: structured output, tool-calling, " <>
"streaming, stateful supervised agents, multi-agent sessions, durable " <>
"persistence, compaction/cost/permissions and MCP — powered by the BEAM."
end
defp package do
examples = ~w(
examples/approval_demo/README.md
examples/approval_demo/demo.exs
examples/approval_demo/run.sh
examples/approval_demo/selftest.exs
examples/approval_demo/start.exs
examples/cancellable_batch.exs
examples/cancellable_batch.py
examples/continuation_integrations/README.md
examples/continuation_integrations/job_dispatch.ex
examples/continuation_job.exs
examples/conversation_eval.exs
examples/coordination_workflows.exs
examples/demo.exs
examples/dnd_session.exs
examples/durable_approval.livemd
examples/external_retrieval.exs
examples/flow_pipeline.exs
examples/media.exs
examples/model_handoff.exs
examples/multi_agent_session.exs
examples/observability.exs
examples/openrouter.exs
examples/otlp_transport/README.md
examples/otlp_transport/collector.py
examples/otlp_transport/collector.yaml
examples/otlp_transport/isolated_exporter.ex
examples/otlp_transport/vm_http_worker.exs
examples/otlp_transport/vm_launcher.py
examples/otlp_transport/vm_worker.exs
examples/sandbox.exs
examples/stateful_agent.exs
examples/stream_failure.exs
examples/streaming.exs
examples/structured_output.exs
examples/supervised_approval.exs
)
[
licenses: ["MIT"],
links: %{"GitHub" => @source_url},
files:
~w(lib priv mix.exs README.md usage-rules.md usage-rules/skills docs/home.md docs/assets docs/site docs/markdown_formatter.exs docs/README.md docs/status.md docs/changelog.md docs/guides docs/architecture/overview.md LICENSE .formatter.exs) ++
examples
]
end
def application do
[
extra_applications: [:logger],
mod: {ExAgent.Application, []}
]
end
defp deps do
[
{:igniter, "~> 0.8", optional: true, runtime: false},
{:req_llm, "~> 1.31.0"},
# Sign the offline Bedrock qualification requests with ReqLLM's IAM backend.
{:ex_aws_auth, "~> 1.6", only: :test, optional: true},
{:req, "~> 0.7.4"},
{:finch, "~> 0.24"},
# Decoder floors protect library consumers too; dependency lockfiles do
# not constrain the applications that depend on a published Hex package.
{:mint, "~> 1.11"},
{:hpax, "~> 1.1"},
{:jason, "~> 1.4"},
{:jsv, "~> 0.28.0"},
# JSV also accepts older IDNA versions. Constrain consumer resolution
# while IDNA is present in the dependency graph (CVE-2026-117678).
{:idna, "~> 8.0", optional: true},
{:ecto, "~> 3.14 and >= 3.14.3", optional: true},
{:nx, "~> 0.5 or ~> 1.0", optional: true},
{:oban, "~> 2.24", optional: true},
{:telemetry, "~> 1.0"},
# Optional host integrations: the MCP server Plug and Telemetry.Metrics
# definitions compile only when the application brings these packages.
{:plug, "~> 1.18", optional: true},
{:telemetry_metrics, "~> 1.1", optional: true},
# Instrumentation is opt-in; the application owns its SDK and exporter.
{:opentelemetry_api, "~> 1.5", optional: true},
# Keep the optional compile-order edge when a host supplies the SDK.
{:opentelemetry, "~> 1.7", optional: true, runtime: false},
{:opentelemetry_api_experimental, "~> 0.6.0", optional: true, runtime: false},
{:opentelemetry_experimental, "~> 0.6.0", only: :test, runtime: false},
# Exercise native OTLP locally without adding an exporter to consumers.
{:opentelemetry_exporter, "~> 1.11.0", only: :test, runtime: false},
# Oban uses ecto_sql in every environment where the host includes it.
# The host provides its PostgreSQL Repo and driver.
{:ecto_sql, "~> 3.12", optional: true},
{:postgrex, "~> 0.23.0", only: :test},
{:stream_data, "~> 1.4", only: :test, runtime: false},
{:dialyxir, "~> 1.4.8", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.40.4", only: :dev, runtime: false}
]
end
defp aliases do
[
check: ["compile --warnings-as-errors", "format", "test"]
]
end
defp docs do
[
main: "welcome",
formatters: ["html", ExAgent.Docs.Markdown, "epub"],
assets: %{"docs/assets" => "assets", "docs/site" => ""},
before_closing_head_tag: &docs_head/1,
before_closing_footer_tag: &docs_footer/1,
extras: [
{"docs/home.md", filename: "welcome", title: "Welcome"},
"docs/guides/mental-model.md",
"docs/guides/getting-started.md",
{"docs/guides/index.md", filename: "documentation", title: "Documentation index"},
"docs/guides/tools-and-output.md",
"docs/guides/models-and-limits.md",
"docs/guides/skills.md",
"docs/guides/memory.md",
"docs/guides/troubleshooting.md",
"docs/guides/runtime-and-events.md",
"docs/guides/durability-and-approvals.md",
"docs/guides/coordination.md",
"docs/guides/testing.md",
"docs/guides/observability.md",
"docs/guides/mcp.md",
"docs/guides/recipes/continuation-jobs.md",
"docs/guides/recipes/framework-integrations.md",
"docs/guides/recipes/coordination-recipes.md",
"docs/guides/recipes/external-retrieval.md",
"docs/guides/recipes/mcp-continuation-binding.md",
"docs/guides/recipes/otlp-isolated-transport.md",
"docs/guides/recipes/otlp-collector-transport.md",
{"docs/guides/agents.md", title: "Coding-agent manual"},
{"usage-rules.md", filename: "usage-rules", title: "Usage rules (LLM)"},
{"docs/guides/llm/tools-and-models-contracts.md",
title: "Tools and models contracts (LLM)"},
{"docs/guides/llm/runtime-and-ops-contracts.md",
title: "Runtime and operations contracts (LLM)"},
{"docs/guides/support.md", filename: "status", title: "Supported features and limits"},
"docs/guides/known-limits.md",
"docs/guides/migration.md",
"README.md",
{"docs/architecture/overview.md", filename: "architecture"},
"LICENSE"
],
groups_for_extras: [
"Start here": [
"docs/home.md",
"docs/guides/mental-model.md",
"docs/guides/getting-started.md",
"docs/guides/index.md"
],
"Core guides": [
"docs/guides/tools-and-output.md",
"docs/guides/models-and-limits.md",
"docs/guides/skills.md",
"docs/guides/memory.md",
"docs/guides/troubleshooting.md"
],
"Production and operations": [
"docs/guides/runtime-and-events.md",
"docs/guides/durability-and-approvals.md",
"docs/guides/coordination.md",
"docs/guides/testing.md",
"docs/guides/observability.md",
"docs/guides/mcp.md"
],
Integrations: [
"docs/guides/recipes/continuation-jobs.md",
"docs/guides/recipes/framework-integrations.md",
"docs/guides/recipes/coordination-recipes.md",
"docs/guides/recipes/external-retrieval.md",
"docs/guides/recipes/mcp-continuation-binding.md",
"docs/guides/recipes/otlp-isolated-transport.md",
"docs/guides/recipes/otlp-collector-transport.md"
],
"For LLMs and coding agents": [
"docs/guides/agents.md",
"usage-rules.md",
"docs/guides/llm/tools-and-models-contracts.md",
"docs/guides/llm/runtime-and-ops-contracts.md"
],
Reference: [
"docs/guides/support.md",
"docs/guides/known-limits.md",
"docs/guides/migration.md",
"README.md",
"LICENSE"
],
Architecture: ~r"docs/architecture/"
],
source_ref: System.get_env("EXAGENT_DOCS_SOURCE_REF", "main"),
groups_for_docs: [
"Demand event delivery":
&(&1.module == ExAgent.Server and &1.kind == :function and
&1.name in [:attach, :detach, :events_since, :ack_events]),
"Deprecated PostgreSQL migrations":
&(&1.module == ExAgent.Store.Postgres and &1.name in [:migrate, :migration_sql])
],
annotations_for_docs: &api_annotations/1,
groups_for_modules: [
"Stable API": &(&1[:stability] == :stable),
"Candidate API": &(&1[:stability] == :candidate)
]
]
end
defp api_annotations(%{stability: :candidate}), do: ["candidate API"]
defp api_annotations(_metadata), do: []
defp docs_head(:html), do: ~s(<link rel="stylesheet" href="assets/exagent.css" />)
defp docs_head(_format), do: ""
defp docs_footer(:html),
do:
~s(<p class="exagent-release-note">ExAgent v#{@version} · <a href="status.html">Supported features and limits</a> · <a href="llms.txt">View llms.txt</a> · <a href="llms-full.txt">View llms-full.txt</a></p>)
end