StoryboundAI

An AI-powered interactive RPG that runs entirely in your browser.
Build characters, shape narratives, and watch your world evolve.
Driven by a pipeline of specialized AI agents.

Play StoryboundAI
Contents

What is StoryboundAI?

StoryboundAI is a browser-based interactive fiction game powered by AI. You create a character, drop into a living world, and take actions that drive a branching story. Storybound is much more than just a single AI chatbot. In the background, there are various AI Agents actively tracking the state of your world, your character, the people around you, and your ongoing objectives, updating each one after every turn.

There's no backend server. Every AI request goes directly from your browser to whichever API provider you configure. Your API key and story data never leave your device. There are no StoryboundAI servers; Your data is not retained by us (your API provider likely does retain your data though).

🧬
Step 1
Create
AI generates your character's traits, abilities, and inventory
🌍
Step 2
Enter
AI builds your starting environment and populates it with NPCs
⚔️
Step 3
Act
Choose or write your action; the AI narrates what happens
🔄
Step 4
Evolve
World state, character traits, inventory, and objectives update

The AI agent pipeline

Every meaningful game event is handled by a dedicated AI call with strict structured responses. Rather than one monolithic prompt, the game is split into a pipeline of specialized agents, each responsible for one piece of the world. This keeps outputs structured, predictable, and independently updatable. This design also allows the primary story driver agent to track only the relevant story context, leaving the secondary analysis agents to handle the rest.

Agent
What it does
Phase
minichar_gen
Character Generation
Generates 10 mini-characters — name, gender, age, and role/job title. Used for mix-and-match character building before committing to a full character.
Character
basic_info_gen
Character Generation
Fleshes out core identity: full name, nickname, age, height, gender, and a short description. First of three sequential character generation calls. This will probably be consolidated with the minichar_gen function soon.
Character
traits_gen
Character Generation
Generates abilities, limitations, flaws, agility, and starting location. Abilities can include magical or unusual skills; limitations provide narrative balance.
Character
inventory_gen
Content Generation
Creates a context-appropriate starting inventory of 0–5 items, each with name, description, quantity, and weight. Items fit the character's background and location.
Character
environment_gen
Content Generation
Builds the full starting environment: location, time of day, temperature, vibe, sounds, an arrival backstory, and up to 5 NPCs.
Environment
action_suggester
Content Generation
Generates 4 contextual actions for the player each turn, scaled from low-risk to risky. This function is fed character abilities, flaws, inventory, environment, and active objectives (user-facing objective data only). These actions make it easy to use Storybound without typing very much.
Action
story_narrator
Content Generation
The main narrative engine. Writes what happens when you take an action. Aware of full world state: character stats, environment, NPCs, history, objectives (including secret objective info), and maturity settings.
Action
state_change_detector
Internal Brain
After each narration, identifies what changed: did the environment shift? Did the character evolve? Does inventory need updating? Is a trade occuring? Triggers the appropriate downstream agents. This is primarily a change detection agent. It does NOT generate new story content; It flags story information as needing to be updated.
Action
world_state_patcher
Internal Brain
Receives a list of required environment updates from state_change_detector (above). Applies targeted updates to environment fields and character traits. NPC opinion profiles are updated here too.
Environment
inventory_updater
Content Generation
Recomputes the player's full inventory after items are gained, used, or lost during an action. Runs conditionally, only when state_change_detector flags an inventory change.
Action
story_log_consolidator
Helper - Story Log
Summarizes the story so far into a rolling log, preventing context loss over long sessions. Helps anchor the AI to important past events even as history is pruned.
Action
npc_memory_recorder
World Memory
Runs silently in the background after each turn. Decides if any nearby NPC witnessed something worth remembering (a betrayal of trust, a threat, violence, a broken promise, or a notable act). Only memorable events are recorded; routine interactions produce nothing. Memories persist in world storage and are injected as private GM notes the next time that NPC appears in any character's session, capped at 8 memory entries per NPC.
World
objective_planner
Content Generation
When a new objective is accepted, writes a step-by-step plan: user-visible steps with hidden AI context to guide NPC behavior toward objective completion.
Objectives
objective_progress
Internal Brain
Tracks which objective steps were completed or passed after each action, and marks objectives as finished when all required steps are done.
Objectives
npc_inventory_gen
Content Generation
Lazily generates an NPC's inventory on demand, when the player chooses to inspect it. Context-aware based on who the NPC is and what's happening.
Environment
scene_focus_gen
Helper - Image Gen
Proposes 5 visual focus options for scene illustration. Currently disabled for all sessions.
Scene
scene_visual_gen
Content Generation
Builds a detailed image generation prompt from the chosen focus and full scene context, then calls the image model to produce a visual. Currently disabled for all sessions.
Scene

NPC opinion profiles & memory

Every character in your world has a five-dimensional opinion profile, maintained and updated by the AI after every interaction. These aren't cosmetic — they influence how NPCs behave, what actions they offer, and how the narrator portrays their reactions.

On top of opinions, NPCs now have persistent memory. A background agent quietly decides after each turn whether any nearby NPC witnessed something worth remembering — a betrayal, a threat, an act of violence, or a broken promise. Those memories are stored at the world level and injected back as private GM notes the next time that NPC appears, even in a completely different character's session. If you wronged someone, they'll remember it when your other character asks about you.

Opinion profile schema — per NPC, range −0.99 to +0.99
overall
General disposition toward the player. Negative = hostile, positive = friendly.
familiarity
How well they know the player. Starts low for strangers, grows through interaction.
trust
Confidence in the player's intentions. Can drop sharply from betrayal or deception.
loyalty
Commitment to the player's cause. High loyalty means the NPC will act on your behalf.
touch_comfort
Physical boundary comfort. Negative = discomfort with contact, positive = comfortable with closeness.

One world, many characters

Every story lives inside a World. Each world is a shared container that persists independently of any single player character. Worlds are automatically named during environment generation, and you can rename them at any time. Characters within the same world can never meet each other (the AI enforces this narratively), but they share the physical reality of that world: locations, NPCs, and history all carry over.

Switching characters works like GTA. You pick a world from the start screen, then choose which character to play. When a new character enters the same world, they receive context from the history left behind: prior characters' story logs shape the environment generation, and known NPCs appear with consistent descriptions and last-known locations.

🌐
Shared world state
NPCs, locations, and world history persist across every character in the same world. What one character does shapes what the next one finds.
🧠
NPC memory
NPCs remember notable events involving other characters. A betrayal by one character will color how that NPC reacts to the next one who asks about them.
🗺️
World Knowledge panel
Browse all known NPCs (with memories), visited locations, and other characters in your world. Available any time from the in-game sidebar.
🔀
Character switching
Return to the start screen to switch characters mid-story. Each character has their own history, inventory, and objectives within the shared world.
World storage schema
name
AI-generated world name (2–5 words), produced during the first character's environment generation. Editable inline from the start screen.
characters[]
Array of player characters, each with their own environment snapshot, action history, inventory, objectives, and story log.
npcs[]
World-level NPC roster with name, description, gender, last known location, which characters have met them, and a memories[] array of notable event notes (capped at 8 per NPC).
locations[]
All distinct locations encountered across any character in this world, with last-visited-by tracking.

Characters that change

Your character isn't static. The AI can propose changes to your abilities, limitations, and flaws as the story develops, gaining a skill through training, losing a limitation after growth, or picking up a flaw from a traumatic event.

Every AI-proposed change can be undone with a single button press. Nothing is permanent unless you allow it to be, since the AI is annoying sometimes and proposes illogical changes.

Ability evolution
Abilities can be added, modified, or removed based on story events. Each change is tracked and reversible.
🎯
Active objectives
Objectives have hidden AI context — guiding NPC behavior toward helping or hindering you without breaking immersion.
🗂️
Persistent inventory
Every item gained or consumed is tracked. The AI updates your inventory after every relevant action.
📜
Story log
A rolling summary prevents memory loss over long sessions, keeping the AI anchored to what matters.

Import / Export

Your characters, story history, and settings can be exported as a single JSON file and re-imported at any time. The API key is intentionally excluded from exports.

Export format
_integrity
A SHA-256 hash of the entire payload, computed at export time. On import, the hash is recomputed and compared. This can detect manual data modifications, but mismatches only surface a warning and does not block the import. I added this so anyone who "cheats" is acknowledged, but allowed.
storybound_settings
API provider URL, model names, mature content setting. API key is stripped before export.
storybound_worlds
Full array of saved worlds, each containing characters, world-level NPCs (with memories), visited locations, and timestamps. Replaces the legacy storybound_characters key. Old saves are automatically migrated on first load.
🔐
Hash verification

The SHA-256 integrity check detects whether a backup file was manually edited after export. It's a tamper warning, not a restriction. Modified files still import successfully with a notice. To the cheaters: I see you...

Your API key, your data

StoryboundAI has no backend. Every API request goes directly from your browser to your chosen AI provider. Your API key is stored only in your browser's local storage and is never included in data exports.

🔒
Client-side only

No account, no server, no tracking beyond Cloudflare Analytics. Game state, characters, and story history live entirely in your browser's localStorage. Use the built-in export tool to back them up.

xAI (Grok) OpenAI Anthropic Groq OpenRouter Custom endpoint