Brain Open-Sourced: Wasm Agent Loops, Stateful Sessions and Typed Tools

Redcxx · reddit · 2026-09-02

The author (a project member) open-sourced Brain, an MIT-licensed agent runtime in early preview.

Core design: strict separation between the agent loop (deciding what happens next) and the runtime (all model/tool I/O), with loops compiling to Wasm. Brain handles session state, streaming, cancellation, restart recovery, and journaling. Typed tools run in your app process, a browser, a microVM, or a remote backend without changing the session API. Ships a TypeScript SDK and supports 70+ model providers.

Repo: github.com/aexhq/brain. The author also asks whether the loop/runtime split matches how others structure agents or is an unnecessary abstraction.

Original post →

More from coding & agent

coding & agent channel →