v1.1.0 release - Contributors, Sponsors and Enquiries are most welcome 😌
Now on Hex

AgentSea for Elixir

A native Elixir/OTP edition of AgentSea — agents are supervised processes, not objects.

This is the Elixir SDK. The rest of these docs cover the TypeScript/Node packages (@lov3kaizen/agentsea-*). The Elixir edition is a ground-up rewrite that keeps AgentSea's concepts (Agent, Provider, Tool, Memory, Crew, Gateway, …) and discards the TypeScript shapes.

Why Elixir?

Where OTP already solves it, AgentSea deletes the abstraction and uses the primitive. An agent is a GenServer that owns its conversation state; a crew is a DynamicSupervisor with a gen_statem coordinator; delegation is message passing; the auction is a timed fan-out; gateway failover is a restart strategy and a :fuse circuit breaker; and you watch the whole fleet execute live over :telemetry + Phoenix LiveView.

A tool that raises is isolated by a supervised Task and folded into an {:error, _} result fed back to the model — the agent process never dies for a tool fault.

Installation

AgentSea is published to Hex as an umbrella of independent agentsea_* packages — add only the ones you need to your mix.exs:

elixir
def deps do
  [
    {:agentsea_core, "~> 0.1"},
    {:agentsea_providers, "~> 0.1"}
  ]
end

Then fetch:

bash
mix deps.get

Requires Elixir ~> 1.14 on Erlang/OTP 25+. Every package ships its own docs on HexDocs.

Your first agent

An agent is a supervised process. Configure it with a model and a provider, start it, and run it:

elixir
config = %AgentSea.Agent.Config{
  name: :assistant,
  model: "claude-opus-4-8",
  # {provider_module, opts}; the key also reads ANTHROPIC_API_KEY
  provider: {AgentSea.Providers.Anthropic, api_key: System.fetch_env!("ANTHROPIC_API_KEY")}
}

{:ok, agent} = AgentSea.Agent.start_link(config)

{:ok, response} = AgentSea.Agent.run(agent, "Explain OTP supervision in one sentence.")
IO.puts(response.content)

In a real app you'd start agents under your supervision tree rather than with start_link/1 directly.

The packages

Fourteen focused libraries, each behind a behaviour so adapters are swappable. Click through to the API reference on HexDocs.

PackageWhat it does
agentsea_coreAgent GenServer + run loop; Provider/Tool/Memory behaviours; buffer & summary memory.
agentsea_providersAnthropic provider over Req — complete/2 and real SSE stream/2.
agentsea_crewsMulti-agent coordination; delegation strategies; a gen_statem task-DAG coordinator.
agentsea_gatewayStrategy routing, :fuse circuit breaking, failover, health tracking, streaming.
agentsea_webPhoenix LiveView dashboard + an OpenAI-compatible chat completions endpoint.
agentsea_structuredExtract a validated Ecto struct from an LLM, with validation-retry.
agentsea_embeddingsEmbedder/VectorStore behaviours; in-memory, pgvector, Qdrant & Pinecone stores; RAG.
agentsea_bumblebeeIn-process Hugging Face embeddings and Whisper STT via Bumblebee + Nx.
agentsea_ingestA Broadway document ingestion pipeline: chunk → embed → store.
agentsea_evaluateConcurrent eval metrics, including an LLM-as-judge.
agentsea_mcpModel Context Protocol client with stdio and streamable-HTTP transports.
agentsea_surfA Node/Playwright browser-automation sidecar exposed as agent tools.
agentsea_voiceTTS/STT behaviours with OpenAI and ElevenLabs adapters.
agentsea_guardrailsInput/output validation: max-length, blocklist, PII redaction, LLM moderation.

Where to next