DEV Community

Cover image for I built Sonder — describe any scene, AI agents spawn and live it out autonomously
Redson Ngwira
Redson Ngwira

Posted on

I built Sonder — describe any scene, AI agents spawn and live it out autonomously

I wanted to watch AI agents interact without directing them. Not chatbots answering
questions — actual people, with histories and tensions, living inside a scene I described.

So I built Sonder.

What it does

You type a scene. Something like:

"Five coworkers watching football at someone's flat. The team is losing.

One of them hasn't been paid in three weeks."

Sonder generates five agents. Each gets a name, a personality, a backstory,

a reason to be in that room, and something eating at them. Then it starts the room.

You don't say anything. They just... go.


Derek: slams cup down

Lena, if you'd pulled your reports an hour earlier like I asked, 'barely'

wouldn't be the best win we had all week.

Marcus: leans back, voice low and sharp

Wow. The 'team player' act's really holding strong, isn't it, Derek? Must be

exhausting — lying to clients, lying to us, lying to yourself.

Tariq: stands up abruptly, chair screeching

You wanna talk lies, Marcus? At least Derek shows up stressed — unlike you,

smirking like you're not one bonus away from selling us all out!


You can:

  • Watch silently — just observe
  • Whisper to one agent — only they hear you
  • Join as a named character — agents address you by name
  • Ask the narrator — an omniscient LLM that knows what everyone is really thinking

The narrator

Ask it anything mid-scene:

"what is happening"

The room is unraveling. What began as a routine post-work gathering has cracked

open into a raw exposure of dread, resentment, and unspoken betrayals. Derek's

forced cheer has shattered. His outburst at Lena wasn't about reports — it was

panic, a man lashing out because he feels the ground giving way beneath him.

Marcus sees it all. He's bitter, yes, but he's not wrong. The team is burning —

not from incompetence, but from the weight of withheld truths.

How it works

  • Parallel asyncio.gather loop — all agents fire simultaneously
  • Agent personalities are hot-reloadable .md files — edit them mid-simulation
  • World creation fetches real behavioral research via DuckDuckGo
  • Plugin hooks for voice, avatar, memory, and export
  • SQLite persistence — worlds survive restarts

Completely free to run

Provider Free allowance
Cerebras 1M tokens/day
Groq Rate-limited free tier
Gemini Free tier
Ollama Fully local, unlimited

Works on Linux, macOS, Windows, and Android (Termux, Android 7+).

Demo

Try it

bash

git clone https://github.com/RedsonNgwira/sonder
cd sonder
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python onboard.py
python main.py

GitHub: github.com/RedsonNgwira/sonder


Built this from Malawi 🇲🇼. GPL-3.0. Feedback welcome.

Top comments (0)