gitmyhub

doxa

TypeScript ★ 27 updated 1mo ago

Project Doxa is an advanced, autonomous agent-based simulation engine where AI agents act as citizens of evolving civilizations.

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

PythonFastAPINext.jssetup: hardcomplexity 4/5

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.

Where it fits