explaingit

wailers9/bragi

32Python

TLDR

Bragi is a Python tool for people who write fantasy stories with the help of AI.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

In plain English

Bragi is a Python tool for people who write fantasy stories with the help of AI. The maintainer points out that many AI writing agents forget what they made up a few chapters ago, so characters and plot details start contradicting each other. Bragi tries to fix that by giving the world a standard structure for time, space, characters, and events, so the agent can keep adding to the same story without losing track. You give it a one sentence setting, for example a sea kingdom torn by moonlight tides, and the project generates a world overview, base rules, a history timeline, and a space layout. Each piece is stored as a numbered path like 1,2,3 so the project can walk through nested time periods and nested places. Only the current location keeps its full detail in memory, while nearby nodes keep summaries, and deeper detail is filled in on demand. On top of that world, Bragi writes story segments and updates the main and side characters as the plot moves. It records public events, private events, the protagonist's choices, prompts sent to the manager, and token usage. You can run the whole flow from the command line, or open a small black and white Web interface at a local address to click through world creation, story generation, and node browsing. The project supports three agent backends. A built in Demo agent runs locally with no API key, which is useful for trying the flow. Real generation can use OpenAI or DeepSeek, set through environment variables. The README suggests DeepSeek for long story continuation and OpenAI for the initial world build. Python 3.10 or newer is required.

Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.