2026-11-27 16:21 UTC

Legion offers Elixir apps an embedded runtime for agents to compose tools with code

state: expiredheat: mediumuncertainty: mediumrelevance: mediumagent-harnesses agentic-securityLegiondimamik

What is this?

Legion is an Elixir runtime for embedding AI agents in an application. Its project site and GitHub description say agents can compose registered tools by writing code; Lua is the default sandbox, with a Lua 5.3 VM that the project says cannot directly access the host BEAM, while registered tools provide the bridge. Search results also describe an Elixir execution option. The creator’s September 2026 Show HN submission presents Legion as released, but the supplied evidence does not independently establish its security properties or adoption.

Why it matters

Legion explores a more flexible agent pattern: rather than making repeated, rigid tool calls, an agent can write a short Lua program to combine registered app tools and run it inside the Elixir application. That could enable richer multi-step actions with less orchestration overhead, while keeping the agent’s code inside a constrained runtime. The project’s security and performance claims remain unverified by the supplied evidence.

Current assessment

Legion’s creator presented the project as released in a Show HN post dated September 16, 2026; the post links to the project site. Search results for the project’s GitHub description and documentation characterize Legion as an Elixir runtime in which agents write code to compose registered tools. They describe Lua 5.3 in a pure-Elixir VM as the default sandbox, with registered tools as the bridge to the host; documentation also mentions process isolation and execution timeouts. These are project-described design properties, not independent verification of security or resource limits. Search results also mention an Elixir execution option, so the initial framing of sandboxed Lua is not the whole picture. No supplied evidence establishes adoption, independent security review, or measured benefits. The significant possibility is letting agents express tool workflows as code inside an application, potentially making complex actions more flexible than a fixed sequence of function calls; whether that is safer, faster, or broadly useful remains open.

Measured heat

no measured readings yet — the hourly heat pass fills this in

How the heat travelled

09-16 14:33 (minted)⭐ origin echo-reconstructedThe creator's Show HN submission links this project site and describes agents that write sandboxed Lua inside an Elixir app.
Legion on blog (echo) · attributed from hn.story.49726662 · published time unknown
—
09-16 13:23first on hacker news · published · lag ?Show HN: Legion – AI agents that write sandboxed Lua inside your Elixir app
dimamik
—
09-16 13:23amplified on hacker news 👑hn.story.49726662
dimamik
peak 9 · 0 comments · 100% of case engagement
09-16 14:21our radar first saw it · lag ?discovery anchor: hn.story.49726662—

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: Legion – AI agents that write sandboxed Lua inside your Elixir appdimamik90
🟧 echo.blog ⭐The creator's Show HN submission links this project site and describes agents that write sandboxed Lua inside an Elixir app.Legion——

Interpretation history

Decision trace