raxol
One app. Terminal, browser, SSH, or agent.
Write a TEA module in Elixir. It renders everywhere: crash isolation, hot reload, AI agents, and distributed swarm from OTP.
Zero install. Click to copy.
{:raxol, "~> 2.6"}
Hello World
Every Raxol app follows The Elm Architecture: init, update, view.
defmodule Counter do
use Raxol.Core.Runtime.Application
@impl true
def init(_ctx), do: %{count: 0}
@impl true
def update(:increment, model), do: {%{model | count: model.count + 1}, []}
def update(:decrement, model), do: {%{model | count: model.count - 1}, []}
def update(_, model), do: {model, []}
@impl true
def view(model) do
column style: %{padding: 1, gap: 1} do
[
text("Count: #{model.count}", style: [:bold]),
row style: %{gap: 1} do
[button("+", on_click: :increment), button("-", on_click: :decrement)]
end
]
end
end
end
That counter works in a terminal, Phoenix LiveView, and over SSH. One codebase.
One module, 7 surfaces.
Write the TEA module once. Render to a terminal, embed in Phoenix LiveView, serve over SSH, expose to agents over MCP, or reach a phone via Telegram, watch push, and voice. Same model. Same view.
Try it without installing anything.
Every Raxol app is one SSH connection away. Each session is a supervised BEAM process: crash-isolated, hot-reloadable, observable.
- Auto-generated host keys, no setup
- Supervised channel per connection
- Survives client disconnects
- One line to enable in your app
Click to copy
Agents are TEA apps.
Same init / update / view shape as a UI. The view is optional; headless agents skip rendering. Supervision, messaging, hot reload, and swarm discovery come free from OTP.
defmodule Researcher do
use Raxol.Agent
@impl true
def init(_ctx), do: %{notes: []}
@impl true
def update({:agent_message, _from, query}, model) do
{model, [{:async, &llm(query, &1)}]}
end
def update({:llm_chunk, text}, model),
do: {%{model | notes: [text | model.notes]}, []}
end
Streaming LLM output via :async commands.
Inter-agent messages routed through a unique Registry.
Bring your own key for Anthropic, OpenAI, OpenRouter, Ollama, Lumo, or Kimi, or run mock.
What OTP gives you.
Crash Isolation
Components crash and restart independently. Your UI keeps running.
Hot Code Reload
Change view/1, save. The running app updates without restart.
MCP Tools
Widgets auto-derive MCP tools. Agents interact with real UI programmatically.
Time-Travel Debug
Snapshot every update/2 cycle. Step back, forward, jump, restore.
Distributed Swarm
CRDTs, elections, discovery via gossip, DNS, or Tailscale.
Agent Payments
x402 micropayments, Xochi cross-chain, stealth addresses. Autonomous commerce.
Adaptive UI
Behavior tracking, layout recommendations, feedback loop. Self-evolving interfaces.
Session Replay
Asciinema v2 recording. Replay any session, scrub the timeline, ship as evidence.
Pick what you need
Full framework or just the parts that matter.
raxol
{:raxol, "~> 2.5"}
Full framework: TEA runtime, rendering, widgets, effects
raxol_agent
{:raxol_agent, "~> 2.5"}
AI agents, teams, strategies, LLM streaming
raxol_mcp
{:raxol_mcp, "~> 2.5"}
MCP server, tool derivation from widgets
raxol_payments
{:raxol_payments, "~> 0.1"}
x402, MPP, Xochi cross-chain, spending controls
raxol_liveview
{:raxol_liveview, "~> 2.5"}
Render TEA apps in Phoenix LiveView
raxol_sensor
{:raxol_sensor, "~> 2.5"}
Sensor fusion. Zero dependencies.