Raxol Agent

AI agent framework for Elixir built on OTP. TEA-based agents with crash isolation, inter-agent messaging, team supervision, and real SSE streaming.

Install

{:raxol_agent, "~> 2.3"}

Quick Start

defmodule MyAgent do
  use Raxol.Agent

  def init(_ctx), do: %{findings: []}

  def update({:agent_message, _from, {:analyze, file}}, model) do
    {model, [shell("wc -l #{file}")]}
  end

  def update({:command_result, {:shell_result, %{output: out}}}, model) do
    {%{model | findings: [out | model.findings]}, []}
  end
end

{:ok, _} = Raxol.Agent.Session.start_link(app_module: MyAgent, id: :my_agent)
Raxol.Agent.Session.send_message(:my_agent, {:analyze, "lib/raxol.ex"})

Features

Agent Teams

Raxol.Agent.Team.start_link(
  name: :review_team,
  agents: [
    {CodeReviewAgent, id: :reviewer, role: :coordinator},
    {TestRunnerAgent, id: :tester, role: :worker}
  ]
)

See main docs for full examples and the agent framework guide.