wailers9

wailers9 / bragi

Public

一个面向架空世界故事创作者的 AI 架空世界与长篇故事引擎。它能从一句设定出发,自动生成层 层嵌套的历史、地理、角色关系与事件网络,并持续写出贴合世界观的剧情。支持 CLI 与可视化界面,可按时间和空间路径扩展世界,让故事像真实宇宙一样不断生长。项目用数字路径管理嵌套的时间、空间、 角色和事件节点,按需生成并补全世界资料,支持本地 Demo、OpenAI/DeepSeek JSON Agent、CLI 和黑白 Web 可视化界面,用于创建可持续展开的故事世界与剧情会话。

31
1
89% credibility
Found May 19, 2026 at 31 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

Bragi is an AI-powered creative writing tool that helps fiction writers and storytellers build fictional worlds with consistent history, geography, and characters. Users provide a simple idea for a world, and the tool generates the underlying rules, timeline, locations, and characters. It then writes interactive stories that remember all these details, ensuring consistency across long narratives. The tool includes both a command-line interface and a web-based visual interface for creating worlds, managing characters, and writing stories. It can work with AI services for generation or use a built-in demo mode for testing.

How It Works

1
💡 Imagine a world in your head

You start with a simple idea for a fictional universe, like a kingdom on floating islands or a city built on a giant creature's back.

2
🌍 Your world takes shape

The tool builds out the geography, history, and rules of your world automatically, creating a foundation you can explore.

3
👤 Your main character appears

You introduce your protagonist, and the tool generates supporting characters with relationships and their own stories.

4
📖 The first scene unfolds

The AI writes the opening of your story, weaving in your character's situation, the world's rules, and the central mystery.

5
You guide where the story goes
✍️
Add your own direction

Type your idea for what happens next and the story continues with your input included.

🔄
Let it flow naturally

Press enter to have the story continue without specific direction from you.

6
Time and places shift

As the story progresses, the timeline advances and your character may travel to new locations, all tracked automatically.

📚 A complete story with lasting memory

Your story is written with consistent world rules, characters who grow and change, and events that echo through the narrative.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 31 to 31 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is bragi?

Bragi is a Python-based AI engine for building fictional worlds and writing interactive long-form stories. Give it a one-line premise like "a maritime kingdom torn apart by moon tides," and it generates layered histories, geographies, character networks, and plot threads that stay consistent across sessions. The system uses numbered path notation to track nested time and space nodes, expanding details only when needed to avoid blowing up your context window. You interact through a CLI or a local black-and-white web interface, and it supports OpenAI or DeepSeek APIs for generation.

Why is it gaining traction?

The core innovation is the on-demand expansion model. Unlike AI writing tools that dump everything into context at once, Bragi keeps nearby nodes as summaries and only generates full detail for the current time-space location. This means you can build sprawling worlds without hitting token limits. The numbered path system also makes it easy to navigate and extend specific branches of history or geography. It ships with a local demo agent so you can test the full workflow without configuring API keys, and the web UI gives you a visual way to browse worlds, sessions, and character states.

Who should use this?

Fiction writers building complex fantasy or sci-fi settings with deep lore. TTRPG game masters who want reusable campaign worlds with persistent history. Interactive fiction developers prototyping AI-driven narrative systems. The tool is particularly useful if you need long-running stories where characters, events, and locations must stay coherent across many sessions.

Verdict

Bragi tackles a real problem--maintaining world consistency in AI-generated stories--with a thoughtful architecture. The on-demand node expansion and path-based tracking are genuinely useful ideas. However, with only 31 stars and a credibility score of 0.8999999761581421%, this is early-stage software. Documentation exists but is in Chinese, test coverage is unclear, and the project lacks the community footprint that would give confidence for production use. Worth exploring as a creative sandbox or technical proof-of-concept, but wait for more maturity before betting a serious project on it.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.