Practical overview
When it fits
Choose Alloy when your application is written in Elixir and needs a tool-calling loop whose provider and application workflows you control.
Who it is for
- Elixir developers adding tool-using language-model agents to an application.
- Teams seeking a provider-switchable agent loop built on OTP primitives.
- Developers who want to supply their own session, persistence, memory-store or scheduling policies.
Documented uses
- Run a language-model completion and execute requested tools in a repeating agent loop.
- Build an Elixir assistant that can use built-in or application-defined tools.
- Switch a configured agent between supported providers while retaining its tools and conversation.
- Build application-specific state, persistence or services around an agent loop.
Requirements & limits
The repository is public and identifies its license as MIT. The README documents adding the package as an Elixir dependency. Provider examples require an API key; no service-wide account or pricing terms are stated.
- The core scope is protocol translation and the completion/tool-call loop, not a complete application framework.
- The README lists Anthropic, Gemini, OpenAI, Codex, xAI and OpenAI-compatible APIs; provider-specific behavior and configuration differ.
- The built-in tools include file reading, writing, editing and bash; bash restrictions are not a sandbox.
- Memory storage is supplied by the application, and the documented memory integration is Anthropic-only in version 0.12.0.
- The repository notes that the optional alloy_agent runtime wrapper is not yet published to Hex and says to keep using Alloy.Agent.Server and Alloy.Session from this package until it is available.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add Alloy to an Elixir project
Declare Alloy as a project dependency and prepare to call its agent loop.
Before you start
- An Elixir project with a mix.exs file.
- A provider and model configuration, including an API key for the provider.
Steps
Add {:alloy, "~> 0.12"} to the dependencies returned by deps/0 in mix.exs.
Configure Alloy.run with a provider module, API key and model.
For a tool-using run, pass the tools to expose and optionally set max_turns.
Expected outcome
The project is configured to make Alloy completion or tool-using agent calls through the selected provider.
Guide limitations
- The README does not specify all provider configuration syntax or every provider's requirements.
- Sessions, persistence and other application workflows remain application responsibilities.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 3 October 2026
- Original website title
- alloy-ex/alloy · Official homepage title · retained in its source language

