Practical overview
When it fits
Use Sagents when an Elixir application needs an agent orchestration layer with supervision, configurable execution and optional human review. It can also support background agents without a user interface.
Who it is for
- Elixir developers building interactive AI applications with LLM-driven agents.
- Teams that need approval pauses for selected agent operations.
- Developers coordinating concurrent agent processes, delegated tasks or real-time LiveView updates.
Documented uses
- Build agents that pause selected tool calls for human approval.
- Run agents as supervised OTP processes.
- Compose middleware and execution steps for agent behavior.
- Delegate complex work to specialized sub-agents.
- Stream agent state, messages and events to LiveView subscribers.
Requirements & limits
- Sაგენტs builds on LangChain, which is automatically included as a dependency.
- The README documents API-key configuration for Anthropic, OpenAI and Google models.
- Phoenix LiveView is an integration path for real-time interfaces; the framework can also be used for background agents.
- Optional capabilities described include state persistence and Horde-based cluster distribution.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up Sagents in an Elixir application
Add the framework and its supervisor to an existing Elixir application.
Before you start
- An Elixir application with a mix.exs dependency list.
- An application supervision tree.
Steps
Add
{:sagents, "~> 0.20.0"}to the dependencies in mix.exs.Add
Sagents.Supervisorto the application's supervision tree.
Expected outcome
Sagents is included as a dependency, and its supervisor starts the registry, dynamic supervisors and filesystem supervisor.
Guide limitations
- This covers installation and supervision setup, not creating or executing an agent.
Configure an LLM provider
Set a provider API key and select a model for Sagents to use through LangChain.
Before you start
- Sagents installed in an Elixir project.
- An API key for a supported provider: Anthropic, OpenAI or Google.
Steps
Set the provider's environment variable:
ANTHROPIC_API_KEY,OPENAI_API_KEYorGOOGLE_API_KEY.Create the corresponding LangChain chat model and specify its model identifier when creating an agent.
Expected outcome
The application has provider configuration and a model value to use when creating an agent.
Guide limitations
- This guide does not cover agent execution or provider account setup.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 21 November 2026
- Original website title
- sagents-ai/sagents · Official homepage title · retained in its source language

