simulacre7

simulacre7

Aethrion - early alpha Elixir runtime for deterministic social agents

Hi everyone,

I’m building Aethrion, an early alpha Elixir runtime for persistent AI characters.

Repo: GitHub - simulacre7/aethrion: A shared social layer for persistent AI characters. · GitHub

Aethrion is an experiment in modeling AI characters as deterministic social simulation entities rather than prompt-only chatbots. The target use case is a social simulation layer for narrative agents, such as games, TRPG assistants, visual-novel-like character systems, or long-running AI companion apps.

The core design principle is:

LLMs can describe what happens, but deterministic rules decide what actually changes.

For example, a character should not gain trust, store a memory, send a proactive message, or die because an LLM improvised it. Those changes should come from explicit rules over inspectable state.

A simple example:

  • If the user gives Mina a flower, Mina’s affinity toward the user increases.
  • Mina stores a memory about the gift.
  • If Yuna observes the gift, Yuna’s jealousy and tension increase.
  • If time passes and the threshold is crossed, Yuna can proactively message the user.
  • If the user apologizes, Yuna can store a reconciliation memory and regain trust.

The same idea could apply to other narrative rules too, such as “if health reaches zero, the character dies” or “if trust drops below a threshold, the character refuses a request.”

The current core loop is:

event -> deterministic rules -> updated state -> structured outputs

Most runtime events do not call an LLM. Aethrion can update state, evaluate rules, create memories, emit structured outputs, and schedule future events without model inference.

LLMs are deliberately kept outside the authoritative state path. They are used only as an optional expression layer, for example when a host application wants to render a structured output into natural language.

In a real deployment, that optional expression step could communicate with an external LLM provider or model server over HTTP JSON, an OpenAI-compatible API, gRPC, or another network boundary.

That means Aethrion is not trying to make LLM inference faster. The LLM provider or model server will often be the slowest part of the system. The role of BEAM/OTP here is to coordinate long-running agents, state transitions, scheduled behavior, failures, and external LLM calls reliably.

The fake LLM adapter in the current alpha exists to prove that the runtime works without a real model.

Current features:

  • Aethrion.Runtime.dispatch/2
  • structured runtime errors
  • scripted CLI demo: mix demo.drama
  • interactive CLI demo: mix demo.interactive
  • branched scenario demo: mix demo.branches
  • JSON persistence
  • supervised GenServer runtime and scheduler
  • fake LLM adapter
  • ExUnit tests
  • GitHub Actions CI
  • English/Korean README

Try it:

git clone https://github.com/simulacre7/aethrion.git
cd aethrion

mix deps.get
mix test
mix demo.drama
mix demo.interactive
mix demo.branches

Demo assets are included in the README:

https://github.com/simulacre7/aethrion

This is not production-ready yet. I’m sharing it as an early alpha and would appreciate feedback on:

  • the runtime API shape
  • the event/rule/output model
  • the external LLM boundary
  • how far this should lean into OTP processes
  • whether this framing makes sense for Elixir developers
  • what would make the demo more convincing

Most Liked

thiagomajesk

thiagomajesk

Always data! Using processes for simulation will make it harder to scale, depending on how much message passing you do between processes, and you’ll have bottlenecks for sure (To spawn, or not to spawn? remains a solid reference for this; the TLRD is: use processes to model runtime behavior). Here’s a great resource on the simulation part specifically: https://www.youtube.com/watch?v=RNCaINCFqhw (I also learned it kinda the hard way, check this out: Processing millions of events with elixir).

Where Next?

Popular in RFCs Top

type1fool
After discussing some of my ideas around Event Sourcing at last night’s Elixir Happy Hour in Austin (highly recommend), I spent some time...
New
wolf4earth
Every protocol you’ve shipped assumes the spec doesn’t change during the connection. This one doesn’t. Code is typed, composable, content...
New
simulacre7
Hi everyone, I’m building Aethrion, an early alpha Elixir runtime for persistent AI characters. Repo: GitHub - simulacre7/aethrion: A s...
New
WyvernoDragon
I’ve been working on pgRx: a query engine that uses BEAM lightweight processes instead of PostgreSQL’s fork-per-connection model. The nu...
New
zachallaun
Note: There are a few folks I’d really love to hear from, time permitting. Pinging in case the title isn’t catchy enough :slight_smile: @...
New
puemos
Hey everyone :waving_hand: Code: GitHub - puemos/overbooked: Overbooked is a self-hosted flexible workplace platform for indie co-wor...
New
tmbb
I’ve started working on a toy project to compile extended POSIX-compatible regular expressions into NimbleParsec combinators. These combn...
New
wingyplus
I just publish a library called redoc_ui_plug | Hex. The library renders Redoc UI from the openapi specification url. I used this library...
New
Overbryd
Polyglot-Ex Rust and wasmex bindings for polyglot. State: Pre-release Hi there, I am starting a thread for my humble bindings library ...
New
marick
TL;DR I’ve forked the Lens package, changed the API some, added new lens makers and – most importantly – added a ton of documentation. In...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41539 114
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement