whatisgithub

What is sonder_engine?

n0819/sonder_engine — explained in plain English

Analysis updated 2026-05-18

40PythonAudience · developerLicense

In one sentence

A local multi-agent engine for interactive fiction that uses separate AI agents to control what each character knows, keeping the story coherent.

Mindmap

mindmap
  root((Sonder Engine))
    What it does
      Runs interactive fiction
      Separates character knowledge
      Coordinates multiple AI agents
    Tech stack
      Python
      FastAPI
      SQLite
    Use cases
      Build AI driven interactive stories
      Run local text based games
      Keep character knowledge consistent
    Audience
      Developers
      Writers
    Setup
      Install with pip
      Run with uvicorn
      Connect an LLM provider

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a local interactive fiction game where each character only knows what they realistically should.

USE CASE 2

Run AI-driven storytelling entirely on your own machine instead of a hosted service.

USE CASE 3

Connect the engine to different AI providers like OpenAI-compatible APIs, Anthropic, or Ollama.

USE CASE 4

Study a multi-agent architecture that separates story causality, perception, and narration into distinct roles.

What is it built with?

PythonFastAPISQLiteUvicorn

How does it compare?

n0819/sonder_engineasimons81/hermes-dreamingbaskduf/harness-starter-kit
Stars404040
LanguagePythonPythonPython
Setup difficultymoderateeasy
Complexity3/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

So what is it?

Sonder Engine is a system for running interactive fiction, the kind of storytelling where a player makes choices and the story reacts, but built so that different parts of the story only know what they are supposed to know. It runs entirely on your own machine and relies on several AI language models working together, each handling a different job, rather than one single AI trying to track everything at once. One part called the Director decides what actually and objectively happens in the story world. Another part called Perception then works out what each individual character or the player would realistically be able to see or know about those events, since not everyone in a story should know everything. Separate character agents act based only on their own private slice of knowledge, a Narrator turns all of this into the text the player actually reads, and a final piece of code checks and locks in what becomes permanent, saved story state. This separation is meant to stop characters from acting on information they should not have and to keep the story world consistent over time. To run it, you need Python 3.11 or newer. You set up a virtual environment, install the listed dependencies, and start a local web server, after which you open the tool in your browser. The story data is stored in a local SQLite database file, and it does not have to live in one fixed location. The project also ships with commands for running its test suite, checking that its internal structure stays valid, and regenerating a map of its own code for documentation. The AI part of the system can connect to several different providers, including OpenAI compatible services, Anthropic, Ollama, or KoboldCpp, so it is not locked into one company. Because API keys and provider settings are stored in that same local database file, the project specifically warns not to accidentally save and share a database that already has your credentials in it. Sonder Engine is released under the MIT license, so it is free to use, modify, and build on.

Copy-paste prompts

Prompt 1
Help me set up Sonder Engine locally with a Python virtual environment and run the server.
Prompt 2
Explain how the Director, Perception, and Narrator agents work together in Sonder Engine's pipeline.
Prompt 3
Show me how to connect Sonder Engine to a different LLM provider like Ollama or Anthropic.
Prompt 4
Walk me through the project layout so I can find where character memory and scene state are handled.

Frequently asked questions

What is sonder_engine?

A local multi-agent engine for interactive fiction that uses separate AI agents to control what each character knows, keeping the story coherent.

What language is sonder_engine written in?

Mainly Python. The stack also includes Python, FastAPI, SQLite.

Who is sonder_engine for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.