Hi all,
I’ve built a small demo app to understand what an “AI agent” actually is under the hood, and to show it with Elixir’s own tools rather than a framework.
What it does
- The agent works in a loop: it plans, runs tools, looks at the results and plans again (at most 5 rounds).
- If a tool it needs doesn’t exist, it has a model write it at runtime. The code is checked by an AST sanitizer, waits for your approval, then gets compiled, loaded under a versioned name and reused later.
- Every conversation is a GenServer of its own. A worker under a Task.Supervisor runs the loop, and progress reaches the LiveView over PubSub. The Registry and DynamicSupervisor handle the rest.
- It remembers facts across conversations, shows a trace with durations and tokens for every answer, and has an eval harness (mix agent.eval).
- The planner and the code generator can be switched between a mock, Claude and a local Ollama model (Ollama only for the generator). The mocks need no API key.
It’s a demo, not a library. Feedback is very welcome, especially on the OTP design and on where you’d draw the line between “plain processes” and reaching for a framework.


















