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

bartblast
:test_tube: Could use a hand testing something. Just landed a protocol pruning enhancement - the compiler now drops protocol implementati...
New
UlrikHD
I’ve been wanting to write a library for the lemmy API so that I can port some of my scripts over to elixir. For those unfamiliar with le...
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
borodark
Hey folks, I’m building Zed (not editor) a declarative BEAM deploy tool for FreeBSD and illumos that uses ZFS user properties as the stat...
New
christhekeele
TL;DR: I’m planning on building a library, inspired by Vapor, to make configuring Elixir applications more straight-forward; in an approa...
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
Billzabob
Hello! I have an idea for an Elixir library I’d like to work on, but wanted to get some thoughts from the community first. It would allo...
New
BartOtten
This lib is now published and has a new topic. Once this topic was about PhxAltRoutes. A lib pioneering localized routes for Phoenix. I...
New
weakwire
Hello people, Big fan of elixir & phoenix LiveView. While designing LiveView applications I use LiveComponent extensively. Issue-I...
New
tiagodavi
I’ve just created and published my first Elixir library! Ex4j combines the power of Ecto schema with the Bolt protocol + an elegant DSL ...
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 29603 241
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
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
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement