Managing Entities
Entities are the core data objects in City of Brains Studio. Each entity represents something in your world — a character, location, faction, item, district, brand, or job role. This guide covers creating, editing, validating, and organizing entities.
Entity Types
City of Brains Studio supports the following built-in entity types:
| Entity Type | Description | Example Fields |
|---|---|---|
| Assembly | Grouped entity collections with slots | name, slots, structure, parent, inheritance |
| Brand | In-world companies, products | name, industry, parent_company, subsidiaries |
| Campaign | Major narrative arcs, story campaigns | name, chapters, status, description |
| Character | People, NPCs, key figures | name, role, faction, relationships, backstory |
| Dialogue | Branching conversation trees | lines, choices, conditions, outcomes |
| District | City zones, neighborhoods | name, character, factions, locations, threat_level |
| Event | Timeline events, plot points | name, date, description, related_entities |
| Faction | Organizations, groups, gangs | name, type, leader, goals, territory, members |
| Item | Objects, weapons, gear, tech | name, type, rarity, description, stats |
| Job | Roles, occupations, professions | name, category, faction_affiliation, requirements |
| Location | Places, venues, landmarks | name, district, type, atmosphere, notable_features |
| Quest | Missions, objectives, side stories | name, objectives, rewards, prerequisites |
| Style Bible | Visual and tone guidelines | mood, palette, references, style_notes |
| Timeline | Chronological event viewer | events, dates, eras, relationships |
| Universe | World settings, cosmology, rules | name, settings, rules, cosmology, factions |
Creating a New Entity
- Navigate to the entity type list page (e.g., Characters in the sidebar)
- Click the New button (typically in the top-right corner)
- Fill in the required fields — at minimum, the entity needs a name
- Click Save to create the entity file
The entity is stored as a YAML file in the project directory, e.g., Characters/rex_marshall.yaml.
Entity Data Structure
Every entity is backed by a YAML file with two parts:
Frontmatter Fields
Structured data stored as YAML key-value pairs. These are the fields you see in the Visual Editor:
name: Rex Marshall
role: Enforcer
faction: The Syndicate
status: active
description: A former corporate security specialist turned underground enforcer.
relationships:
- entity: sara_chen
type: ally
description: Trusted partner from the old days
production_status:
general: wip
game: concept
tv: draftMarkdown Body
Free-form narrative content that follows the frontmatter, separated by ---:
---
name: Rex Marshall
role: Enforcer
...
---
# Background
Rex Marshall grew up in the corporate districts before a
scandal forced him underground. Now he works as muscle
for The Syndicate, though his loyalties are more complex
than they appear.
## Key Events
- **2045**: Recruited by Nexus Corp security division
- **2048**: The Blackout Incident — forced into hiding
- **2050**: Joins The Syndicate as an enforcerEditing Entities
Visual Editor Tab
The Visual Editor presents your entity’s fields in an organized, form-based layout. Sections are defined by layout JSON files and may include:
- Text fields — Simple single-line inputs for names, titles, etc.
- Textarea fields — Multi-line inputs for descriptions and notes
- Select/Dropdown fields — Choosing from predefined options (e.g., faction type, status)
- Array fields — Lists of values (e.g., skills, equipment, allies)
- Complex array fields — Lists of objects (e.g., relationships with entity reference + type + description)
- Entity reference fields — Link to other entities with inline search and selection
- Rating selectors — Numeric scales for attributes like threat level or influence
YAML Editor Tab
For power users, the YAML tab gives you direct access to the raw frontmatter in a full Monaco code editor with syntax highlighting, auto-completion, and error detection.
Markdown Editor Tab
The Markdown tab provides a rich editor for the entity’s body content. You can write and preview Markdown with support for headings, lists, tables, code blocks, and more.
Component Blocks
Layout sections can also contain component blocks — rich interactive widgets that go beyond simple form fields:
- Entity Assets — Upload and manage images, set primary image, assign asset roles
- Entity Timeline — View and manage chronological events for the entity
- Entity Chat — AI-powered conversational editing panel
- Entity Relationships — Auto-discovered relationship links rendered as grouped cards
- Production Status — Pipeline status editor (general/game/TV status)
- Primary Image — Hero image display with placeholder fallback
- Markdown Content — Rendered markdown body preview
Validation
Validation Panel
The Validation Panel appears in the entity editor and checks your entity data against the rules defined in the entity’s template. It shows:
- Errors (red) — Critical issues that should be fixed (e.g., missing required fields)
- Warnings (yellow) — Non-critical issues (e.g., suggested fields that are empty)
When all fields pass validation, the panel shows a green “All fields valid” indicator.
Each validation issue includes:
- The field path that has the problem
- A description of what is wrong
- A clickable link to navigate directly to the offending field
Fix Dialog
Clicking the Fix button (wrench icon) opens the Fix Dialog, which offers three tiers of automated repair:
| Fix Tier | Description | Cost |
|---|---|---|
| Auto-fix (Rule-based) | Instant fixes for missing dates, formatting, and common issues | Free |
| Local AI (Qwen) | Uses your local Qwen model for smarter, context-aware fixes | Free (requires local AI) |
| Premium AI | Uses cloud AI providers (OpenAI, Anthropic, etc.) for the most sophisticated fixes | Uses API credits |
The Fix Dialog presents a diff view (side-by-side comparison) so you can review exactly what changes will be made before applying them.
Organizing Entities
Search and Filtering
Each entity list page includes:
- Text search — Filter entities by name or content
- Category filters — Filter by type-specific categories (e.g., faction type, item rarity)
- Sort options — Sort by name, date created, date modified, or other fields
Cross-Entity Search
The Cross-Entity Search page (accessible from the sidebar) lets you search across all entity types at once. This is useful for finding references to a character across locations, factions, and items.
Relationship Graph
The Relationship Graph provides a visual network view of all entity connections. Nodes represent entities, and edges represent relationships. You can:
- Pan and zoom the graph
- Click nodes to navigate to entities
- Filter by entity type or relationship type
- See relationship strength and direction
Recycle Bin
Deleted entities are moved to the Recycle Bin rather than permanently destroyed. From the Recycle Bin you can restore entities or permanently delete them.
Next Steps
- AI Workshop — Generate and refine content using AI
- Component Blocks Reference — Technical details of all available component blocks
- Layout System Architecture — How layouts and sections are structured