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

First Post!

simulacre7

simulacre7

Small follow-up question:

For people who have built actor/process-based systems in Elixir, would you model persistent characters as separate supervised processes, or keep characters as data inside a world/session process?

I’m currently leaning toward keeping the deterministic simulation core process-free, then adding OTP around runtime boundaries such as sessions, schedulers, and external LLM calls.

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).

Last Post!

simulacre7

simulacre7

Thanks, that makes a lot of sense.

I’m leaning in that direction too: keep the simulation core as plain data + deterministic functions, and use OTP to model runtime behavior around it rather than making each character a process by default.

So characters, relationships, memories, and rules stay as data. Processes would be used for sessions, schedulers, external LLM calls, persistence, supervision, etc. I’d only consider per-character processes if there is a concrete runtime reason for that boundary.

I’ll read those references. The message-passing bottleneck warning is especially helpful before overfitting the design toward “one character = one process” just because BEAM makes that easy.

Where Next?

Popular in RFCs Top

benlime
In the last couple of days I was playing around with LiveView, function components and animations. I ended up with a little prototype whi...
New
manuel-rubio
There was some time when I started thinking about giving a boost to Lambdapad, the initiative from @garretsmith in Erlang that I loved wa...
New
sodapopcan
EDIT: I forgot to link the repo, ha: GitHub - sodapopcan/vials: Tweak your mix generators · GitHub This project is not quite ready for p...
New
bluzky
Hi everyone, I would like to introduce my new project OrangeCMS, it’s an application that help you to create/edit content post for your ...
New
pepicrft
Hey folks :wave: I implemented a library that uses macros extensively, and I’d appreciate feedback from people that are more versed at w...
New
tmbb
SciEx - Scientific programming Code here (very early stage): GitHub - tmbb/sci_ex: Scientific programming for Elixir · GitHub I have dec...
New
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

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New

We're in Beta

About us Mission Statement