explaingit

spacecypher/doxa

Analysis updated 2026-05-18

22PythonAudience · researcherComplexity · 4/5Setup · hard

TLDR

A simulation where AI-controlled agents live as citizens of evolving civilizations, farming, trading, building, and going to war based on language-model decisions.

Mindmap

mindmap
  root((repo))
    What it does
      AI agent civilizations
      Roles and beliefs
      Emergent war and trade
    Tech stack
      Python
      FastAPI
      Next.js
    Use cases
      Watch emergent societies
      Inspect agent reasoning
      Inject world events
    Audience
      Researchers
      Vibe coders
    Setup
      Python 3.10
      Node.js 18
      LLM API key

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

Watch AI agents form civilizations, take on roles like priest or soldier, and interact over time.

USE CASE 2

Use the Demiurgic Layer panel to pause the simulation and inspect an agent's beliefs and reasoning.

USE CASE 3

Inject events like famines or plagues to see how a civilization responds and adapts.

What is it built with?

PythonFastAPINext.js

How does it compare?

spacecypher/doxaagno-agi/agent-platform-railwayalexantaluo0/acot-vla-wm
Stars222222
LanguagePythonPythonPython
Setup difficultyhardmoderatehard
Complexity4/54/55/5
Audienceresearcherdeveloperresearcher

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

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires Python 3.10, Node.js 18, and an API key from a supported language model provider.

No license information is stated in the README.

In plain English

Project Doxa is a simulation where AI-powered agents live as citizens of evolving civilizations. Each agent has physical needs such as hunger, health, and stamina, a collection of memories and beliefs, and a personality profile. At regular intervals this state is sent to a language model, which decides the agent's next action: farm for food, trade with a neighbor, construct a building, or invent a new ideology and try to spread it through the population. Agents form civilizations and take on roles based on what they build. Constructing a temple makes an agent a priest, whose beliefs spread further and decay more slowly. Building barracks creates a soldier with improved combat stats. Farmers grow food more efficiently, and agents who reach old age stop being reassigned to new roles. Trust between civilizations is tracked continuously, and if it falls below a threshold, war is declared automatically, agents traveling through enemy territory during wartime drain health at every step. The world is a grid where terrain affects movement and survival. Resources such as wood, water, stone, and gold appear over time, and crops mature into food that agents can harvest. Scarcity determines whether agents trade cooperatively or fight. A social cohesion index called Asabiyyah (from the medieval historian Ibn Khaldun) tracks how unified a civilization is: high values encourage cooperation, low values can trigger internal conflict. A built-in intervention panel called the Demiurgic Layer lets you pause the simulation, inspect individual agents, view their belief graphs, read the reasoning behind specific decisions, and inject events such as famines, plagues, or miracles to see how the civilization responds. The backend is Python with FastAPI. The frontend is a Next.js interface that shows the world grid and agent states in real time. Running the project requires Python 3.10, Node.js 18, and an API key from any supported language model provider.

Copy-paste prompts

Prompt 1
Help me get this Python and Next.js simulation running with an API key from a supported LLM provider.
Prompt 2
Explain how the Asabiyyah social cohesion index affects cooperation and conflict between civilizations.
Prompt 3
Walk me through how an agent becomes a priest or soldier based on what it builds.
Prompt 4
Show me how to use the Demiurgic Layer to inject a plague event into the simulation.

Frequently asked questions

What is doxa?

A simulation where AI-controlled agents live as citizens of evolving civilizations, farming, trading, building, and going to war based on language-model decisions.

What language is doxa written in?

Mainly Python. The stack also includes Python, FastAPI, Next.js.

What license does doxa use?

No license information is stated in the README.

How hard is doxa to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is doxa for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.