AgentPlayground
Docs
Key files map

A task-oriented shortcut: know what you want to change, look up which file to open. Pairs with
Architecture overview if you want the bigger picture first.

| Want to change… | Edit… |
|---|---|
| The built-in agent teams/skills seeded on first run | lib/default-skills.ts (definitions) + lib/seed-defaults.ts (the idempotent seeder that writes them to the DB) |
| The database schema (add a field, a model) | prisma/schema.prisma, then npx prisma generate and npx prisma db push |
| What tools the coordinator/agents can call | lib/chat-tools.ts — tool definitions + executeTool() switch |
| The coordinator's system prompt / behavior | COORDINATOR_INTRO in app/api/chat/route.ts |
| One LLM provider's behavior (retries, error mapping, models list) | lib/providers/anthropic.ts / openai.ts / ollama.ts |
| The curated model shortlist shown in pickers | lib/model-catalog.ts |
| Design tokens — colors, spacing, radii, dark/light mode | app/globals.css |
| The main sidebar's structure/behavior | components/Sidebar.tsx + lib/sidebar-registry.ts |
| Dashboard/playground widgets | lib/widget-registry.ts |
| The Store / Playground Library catalog | lib/store-catalog.ts (Store listing) + lib/library-catalog.ts (pack manifests) |
| Pack install/export logic | lib/library-packs.ts, app/api/library/install/route.ts, app/api/playgrounds/[id]/export/route.ts |
| Auth / who can log in, roles | auth.ts + middleware.ts |
| API error responses | lib/api-error.ts's apiError() helper — used by every route |
| The Brain (vault notes, semantic search, ingestion) | lib/brain/index.ts, lib/brain/ingest.ts |
| Meetings (rounds, presets, decisions) | lib/meetings/engine.ts |
| Telegram bot behavior | lib/integrations/telegram/bot.ts |
| The MCP endpoint (external LLMs/tools talking to the app) | app/api/mcp/route.ts |
| This documentation site's content | lib/docs/pages/*.ts (one file per page's markdown) + lib/docs/registry.ts (the nav tree) |
| This documentation site's shell (sidebar/search/ToC) | components/docs/DocsShell.tsx, DocsSidebar.tsx, DocsToc.tsx, DocsSearch.tsx |
| The first-run setup wizard | app/(auth)/setup/page.tsx + app/api/setup/complete/route.ts |
| Billing / wallet addresses shown to users | app/(app)/billing/page.tsx's WALLETS constant |

The pattern behind most of these

Most customizable surfaces in this codebase follow the same shape: a plain TypeScript array or
object (a "registry" or "catalog") that both the UI and the API read from, so adding an item means
adding one entry, not hand-wiring code in three places. lib/sidebar-registry.ts,
lib/widget-registry.ts, lib/store-catalog.ts, lib/library-catalog.ts, and
lib/docs/registry.ts are all the same pattern applied to a different feature. If you're adding
something new and it feels like it should be a list of similar items, this is usually the right
shape to copy.