Skip to main content
Flower Engine Hero Light

What is Flower Engine?

Flower Engine is a modern, AI-powered roleplaying system that combines the depth of tabletop RPGs with cutting-edge technology. Built with a split architecture design, it delivers blazingly fast, real-time narrative experiences through a sophisticated Python backend and a beautiful Rust terminal interface.
Fully Vibecoded Application — Built at the speed of thought with AI-first engineering.

Key Features

Flower Engine is designed for hardcore tabletop-style roleplaying with modern AI capabilities.

Split Architecture

Decoupled Python “Brain” (FastAPI/LLM) and Rust “Face” (Ratatui TUI) communicating via WebSockets for maximum performance and modularity.

Live Token Streaming

Blazingly fast, real-time response rendering with typewriter animations. Watch the story unfold character by character.

Hardcore System Rules

Built-in logic for grounded reality, NPC autonomy, and consequence-driven storytelling. The world reacts to your choices.

Session Management

Full history persistence, session hot-swapping, and strict memory isolation. Never lose your progress.

RAG-Powered Memory

Vector-based retrieval with ChromaDB and local embeddings ensures contextually relevant responses without sending your data to the cloud.

Multi-Provider Support

Works with OpenRouter, Google Gemini, Groq, and DeepSeek. Switch models on the fly without restarting.

Architecture Overview

Flower Engine uses a split-brain architecture that separates concerns for optimal performance:
    [ THE FACE ]             [ THE BRAIN ]
    (Rust / Ratatui)         (Python / FastAPI)
          |                         |
    TUI Interface <--- WebSocket ---> LLM Orchestrator
          |            (JSON V1)            |
    Async Input                     RAG (ChromaDB)
    Event Loop                      SQLite Persistence

The Brain (Backend)

  • Python 3.12+ with FastAPI for asynchronous orchestration
  • ChromaDB for vector storage and RAG (Retrieval-Augmented Generation)
  • SentenceTransformers (all-MiniLM-L6-v2) for local embeddings
  • SQLite for session and character persistence

The Face (Frontend)

  • Rust with Ratatui for a blazingly fast terminal UI
  • Tokio for multi-threaded async event handling
  • WebSocket connection for real-time streaming
The split architecture means you can run the backend on a powerful server while keeping the lightweight TUI on your local machine.

System Rules

The engine enforces a permanent ruleset to ensure immersive, consequence-driven gameplay:
  1. Grounded Reality: No outside intervention or prophecies
  2. Player Is Not Special: You must earn your influence through action
  3. Secrecy Is Absolute: NPCs do not have access to your character sheet
  4. Time Persists: The world moves forward even if you wait

Quick Start

Ready to begin your journey? Get up and running in minutes.

Quickstart

Get Flower Engine running in 5 minutes with our automated setup.

Installation

Detailed installation guide with system requirements and troubleshooting.

Architecture

Deep dive into the split-brain design and WebSocket protocol.

Creating Worlds

Learn how to build rich, immersive worlds with YAML configuration.

Use Cases

Flower Engine is perfect for:
  • Solo Tabletop RPG Sessions: Experience full campaigns with an AI narrator
  • Creative Writing: Generate and explore narrative branches interactively
  • World Building: Test and develop your RPG settings with real-time feedback
  • Game Master Tools: Use as a co-narrator for your tabletop games

Next Steps

1

Install Prerequisites

Set up Python 3.12+, Rust, and get your API keys ready.
2

Run the Setup Script

Our automated script handles virtual environments and dependencies.
3

Configure Your API Keys

Add your OpenRouter, Gemini, or DeepSeek keys to config.yaml.
4

Launch and Play

Run ./start.sh and enter your first narrative adventure.

Ready to start?

Follow our quickstart guide to get Flower Engine running in minutes.

Build docs developers (and LLMs) love