Skip to content

Code map ​

Where code lives and what each directory is for. A row links to the page that explains it, where there is one.

Repository ​

PathWhat it is
apps/orchestrator/The Node control plane (Orchestrator)
apps/web/The React operator app, served at the site root (Web app)
packages/ui/@guildsrun/ui, the design system (Design system)
runtime/The agent-runtime:0.4 image every machine runs, and the helpers baked into it
fixtures/compat/The frozen contracts compat-verify checks the code against, one folder per area (HTTP, SSE, WebSocket, codecs, crypto, adapters, and more), indexed in manifest.json
docs/This documentation
docker-compose.yml, docker-compose.watch.yml, docker-compose.dev.ymlThe shipped stack, the development overlay, and the two merged (Deployment)
setup.shWrites .env (state path and generated secrets) and builds the OpenSandbox and runtime images
.env.exampleCore's settings, by integration (Configure)
scripts/check.sh (the whole check; with CHECK_ROOT it checks an extending repository), check-suppressions.sh (refuses a commit that grows a package's lint suppressions outside a rule commit), lint.mjs (runs Oxlint on a package and subtracts its lint-suppressions.json), images.sh (the OpenSandbox and runtime images), update-harnesses.mjs (moves the runtime image's coding harnesses to their latest releases), and smoke-core-stack.sh (the shipped stack, end to end) (Development)
Makefilestate, opensandbox-image, runtime-image, core-image, build, up, up-dev, dev, down, reset, migrate, verify, check, contract (contract-opensandbox and contract-model), compat-verify, soak; an extending repository's Makefile includes it, with CORE naming core's path (Make targets)
lint/The Oxlint plugins every package loads: boundary.js holds core code inside core (Extension points) and refuses a module that re-exports another module's exports; limits.js carries the function and file limits and the syntax the code guidelines refuse (Lint)
.github/workflows/verify (every push: scripts/check.sh), images (a version tag publishes the orchestrator, runtime, and OpenSandbox server images on ghcr.io)
.state/The local STATE_ROOT, not in git (Deployment)

A repository that extends core holds this one as a submodule (Extension points).

apps/orchestrator/ ​

PathWhat it is
src/server.tsCore's process entry: loads config and runs the server with no extension
src/instrument.tsLoaded with --import before the server: starts Sentry and its event-loop, profiling, and Fastify integrations
src/error-reporting.tsstartErrorReporting: starts Sentry from the error-reporting integration; the server and each command-line tool call it first
src/run.tsrunServer: builds the server, listens, shuts down on a signal or a fatal error
src/compose.tscreateServer, the composition root (Startup)
src/extension.tsServerExtension, what an extension adds (Extension points)
src/app.tsThe Fastify app: the web build, /storybook, /health, /avatars/:style.svg, client-error intake, domain routes; and the MCP listener for subscription agents' harnesses (buildHarnessMcpApp)
drizzle/0001_baseline (with 0001.notes.md), then numbered migrations (PostgreSQL)
test/unit/, integration/, contract/, helpers/ (Tests)
scripts/compat-verify, compat-digest, dump-baseline-schema, patch-http-mcp-catalog, build-connector, models-dev-snapshot, sweep-workspaces, typesafe-replay, browse-spike (one fastbrowse task on an agent's sandbox Chrome through the CDP bridge), and import-cycles (the import-cycle check of a package's src/, which the web app runs too)
DockerfileThe core image: a web stage builds apps/web and Storybook; the final stage copies src, scripts, drizzle, and the web build
package.jsonexports: the modules another package may import
.oxlintrc.jsonThe package's lint configuration (Lint)
lint-suppressions.json, import-cycles.jsonThe lint errors and the import cycles that predate their rules; both lists only shrink (Lint)

src/ directories ​

DirectoryWhat it holds
http/One *-routes.ts file per domain, registered in routes.ts, and what the routes share: who a request is from under each AUTH_MODE (identity.ts), the host and origin check (origin.ts), domain errors as HTTP answers (errors.ts, error-handler.ts), SSE (sse.ts), the sandbox proxies (sandbox-proxy.ts), the web build (web-app.ts), and the MCP listener's routes (harness-mcp-routes.ts)
generation/GenerationLoop (index.ts) and everything a run goes through: its config snapshot, the preparation of its prompts and State, the model calls, its tool calls, a subscription agent's harness turns and their rows (harness-loop.ts, harness-prompt.ts, harness-ending.ts, parse-claude-code.ts, parse-codex.ts, parse-cursor.ts, parse-antigravity.ts, harness-rows.ts), the MCP server their harnesses call their Guilds tools on (harness-mcp.ts), its event stream, the machines' containers, a generation's repositories, a subscription turn's checkpoints in them, and their review (coding.ts, run-review.ts), idle stops, and the runs an operator opens (operator.ts) (Generation)
toolbox/The native tools, one module per family, the tools a run offers (offered.ts), the sandbox command runner (shell.ts), the output pipeline (output.ts), the sandbox helper transport (code.ts), and the guilds-harness ops a subscription agent's turns run (harness-ops.ts, harness-setup.ts, harness-result.ts) (Native tools)
connectors/One folder per connector core ships, the manifest schema (manifest.ts), the adapter contract (types.ts), the installed connectors (registry.ts), the servers configured from them (servers.ts), and the platform integrations they bring (instance.ts, instance-keys.ts) (Connectors)
registry/Installing connectors from a registry, the code tier, and the instance admin's registry view and changes (admin.ts), each applied without a restart (Connector registry)
mcp/McpPool (pool.ts), the catalog and its policy, MCP sessions, logins and the tools they list, an operator's direct tool call, who sees a connector and a login, and the connect flows (connect-*.ts, github-install.ts, github-app-manifest.ts)
oauth/The OAuth mechanics of a manifest's auth.oauth (index.ts), and the callback and installation-picker pages (html.ts)
github/The GitHub App, its manifest flow, and the installation tokens minted for a login's repositories (GitHub)
coding/Guild repositories and the GitHub logins they use (guild-repositories.ts), the repositories an agent can use (agent-repositories.ts), an agent's git side and its git providers (git.ts, github-provider.ts, access-token-provider.ts), the harnesses (harnesses.ts), and each harness's models and efforts (harness-models.ts) (Code work)
machines/Tiers, sizes, slots, placement and who may place on a machine, an organisation's machines as its members manage them (service.ts), and the boot layout of agent homes (Machines)
access/Binding resolution and its change log, a run's tools, MCP, and secrets (runtime.ts), the access view a scope's page shows (view.ts), an agent's page (agent-page.ts), and the bindings an operator sets (operator.ts) (Access)
credentials/AES-GCM and environment fingerprints (crypto.ts), owner and secret validation, and the scopes a credential is visible at
secrets/Who reaches and manages a secret, secret_store, redaction, and an organisation's secrets as its members manage them (service.ts) (Secrets)
db/Pool and migrations (client.ts, migrations.ts), codecs, the Drizzle schema (schema/), one query module per table family (users.ts, agents.ts, runs.ts, …), and the note and file listings (artifact-lists.ts): an organisation's, a guild's and an agent's page lists with each item's home and the viewer's mode, searches, and what an agent or a guild's state reads (PostgreSQL)
seed/The database at boot (connect.ts): core's and an extension's migrations and seeds, the installed connectors' rows (system.ts), the native tool catalog (catalog.ts), and a fresh box's first user and organisation (operator.ts)
attachments/Chat images: sniffing, upload, and hydration
artifacts/The artifact store (store.ts) with one module per sub-domain (notes, Memory, collections, records, access lists), shared files (files.ts, operator-files.ts), the files an operator's pages read and write (host-files.ts), and the collection views (Artifacts, Access)
notes/NotesStore (store.ts): the system.md template and each agent's folder on disk, with its Task, Memory, notes, and routine files; the checks a relative path passes (paths.ts); and the organisation's notes as an operator reads and writes them, listed for the organisation, and in two sections for a guild's or an agent's page (operator.ts)
directories/The listing of an agent's private and shared notes, scripts, and environment that its State shows
memory/Hydration, the cap, the archive, and the version history (Memory)
prompts/Prompt composition and the system.md, task.md, and memory.md templates (System prompt)
state/The State JSON a run sees
groupchat/GroupChat (index.ts): posts, clears, the event stream, and the dispatcher; group history, tags, the recipient rules and router, deliveries, the message a woken group run reads, and what an operator reads and posts (operator.ts) (Group chat)
typesafe/The System One client, which group routing asks, and the replay that typesafe-replay runs
schedules/Routine timing, the Schedules service, and the routine writes an operator makes, each announced to the agent's guild (operator.ts) (Routines)
scripts/The agent script catalog, its materialisation, and the listing and script writes an operator makes, each write announced to the agent's guild (operator.ts) (Scripts)
sandbox/RunSandboxes, core's sandbox provider (index.ts), the OpenSandbox SDK adapter (sdk.ts), and the orphan sweep (sweep.ts)
browse/The agent-optimized browser behind browse: the call's service (service.ts), the fastbrowse run and its environment, the result text, browser usage from fastbrowse's cost lines, and the loopback CDP bridge to an agent's DevTools relay (bridge.ts)
llm/Providers, the models.dev catalog, credentials, the model client, tokens, and cost (Model client)
policy/OrgPolicy and the checks core runs against it
avatars/SVG avatars in seven styles: six from DiceBear and the clay default (clay.ts); looks.ts assigns a guild a mascot set and each builder role a look
issues/Guild issues from report_issue, their severities, and the statuses an operator sets, each announced to the guild (operator.ts). An open blocking issue disables its agent (db/blocking-issues.ts)
notifications/The inbox view and its per-user stream
usage/Usage counter keys, deltas, and tree (index.ts), and the organisation, guild, and agent listings (view.ts)
studio/Prompt Studio: sessions, the coach's tools, drafts and edits, focus pins, the activity ledger, and the runs and routines the inspector reads (inspector.ts) (Prompt Studio)
builder/The guild builder: sessions, tools, widgets, and workspace search (Guild builder)
recipes/The guilds.recipe schema, capture, rewrite, validation, and apply (Recipes)
conversation/The coach runner Studio and Builder share (runner.ts), the parse of the arguments a model writes for a tool call (tool-args.ts), tool-result projection, and the prompt sections both coaches read (*.md, templates.ts)
admission/AdmissionCoordinator (coordinator.ts): the generation slots that agent runs, Studio, and Builder take under the box's cap and each organisation's plan
capabilities/The catalog facts the builder may name
guilds/, agents/, organisations/, users/One directory per entity: its validation, who sees it (access.ts), how the API shows it, and the service it is created, changed, and deleted through (service.ts; directory.ts for users, with identity.ts naming the user a request is from)
config/Environment → AppConfig (Configuration)
instance/Instance keys: the integration registry (integrations.ts), the encrypted store (keys.ts), and the confirmation a GitHub App change needs (changes.ts) (Instance keys)
cli/seed:system, seed:operator, migrate, and pnpm connector
observability/Logs, request ids, client-error intake, Sentry, and runtime metrics (Observability)
net/Outbound HTTP and endpoint validation
lib/Shared helpers with no domain of their own: ids, paths, locks, the clock, JSON and schema decoding, names, emails, numbers, the event queue and the stream event, change actors, an agent's home files, the blob store under attachments and shared files (blob-store.ts), and what a forwarding proxy sends upstream (forwarding.ts)

apps/web/ ​

PathWhat it is
src/main.tsx, index.htmlEntry: mounts the app with no slot filled
src/mount.tsxmount(slots) (Boot)
src/app/The app frame: providers (App.tsx), identity, routes (router.tsx), slots, theme, browser storage, formatting (format.ts), the rules a guild, agent, or repository name follows (names.ts), the list beside its selected item (MasterDetail.tsx), and the back button (returnTrail.ts, ReturnButton.tsx)
src/api/The typed API client, identity and session, the JSON value type and the guards that narrow a server's reply (wire.ts), the API types and the queries (types/ and queries/, one module per domain, Code paths), streams, and the client error log (State and events)
public/Files served as-is
vite.app.tsappConfig(): build and dev-server configuration, shared with an extension
package.jsonexports: what an extension's package may import (Extension slots)
.oxlintrc.jsonThe package's lint configuration
lint-suppressions.json, import-cycles.jsonThe lint errors and the import cycles that predate their rules; both lists only shrink
claude-design-export/The first Claude Design export; not the live library

src/features/ ​

One directory per area. The screens are in the Screen map.

DirectoryWhat it holds
shell/Sidebar and rail, guild tag and issue counts, the band over disabled agents, account menu, and the chime and desktop notifications for new messages and reported issues
home//, the empty state, and the not-found page
guild/Guild workspace and its menu, group chat with its message queue and budget, the State tab, and the guild pages (pages/)
agent/The create-agent dialog, the agent inspector with a folder for most of its tabs (chat/, prompt/, memory/, routine/, scripts/, browser/, cli/, history/, settings/), and the repositories a guild's agents clone, each writable or read-only (GuildRepositories.tsx, CodingRepositories.tsx)
agent/runs/How a run's rows read: grouped into generations, steps, and tool calls (runFlowModel.ts), each call's kind (toolKinds.ts), and its arguments and result as text (toolFormat.ts)
notes/The notes browser, the provenance strip (LatestChange.tsx, changeActor.ts), and the notes and tables a Task or a note embeds (embeds.ts, InsertPicker.tsx, EmbedPreview.tsx)
files/The files browser: its two sections, upload, download, access, and delete of shared files
access/One scope's tools, logins, and secrets, access lists and reach, the access dialog a note or a file opens (AccessListDialog.tsx), the sections, greyed rows and home labels the notes and files browsers share (listedItems.ts), their words (sectionCopy.ts), the item they open (useOpenItem.ts), the grouping of notes and tables by who their access lists reach (accessGroups.ts, useAccessReads.ts) and the pane for a path they do not list (UnlistedItem.tsx), the home a new item gets (HomeGuildField.tsx), and the repositories a GitHub login serves (GithubRepositories.tsx)
tables/The Tables page and the State › Tables sub-tabs
studio/Prompt Studio: the workspace and its sections, with activity/, state/, tabs/, and tools/
builder/The guild builder
coach/What Studio and Builder share: the coach log and the split
recipes/Recipe library, recipe page, apply preview, checklist, and the plan a recipe is reviewed as (plan/)
admin/Connector catalog and registry, platform keys, and users
settings/Organisation settings and its members
machines/Machines tab, dialog, meters, and picker
models/Model setup, the model pickers, and the link to Settings, Model keys (ModelKeysLink.tsx)
instance/What a missing platform key means for a screen
inbox/The Inbox

packages/ui/ ​

PathWhat it is
src/index.tsPublic barrel, a client module
src/theme.css, src/tokens.css, src/motion.cssTailwind entry, tokens, and motion
src/primitives/, src/components/Library modules, with their stories beside them
src/foundations/Token and icon Storybook boards
src/writeDesignSystemDoc.tspnpm design-system-doc
.storybook/Storybook config
.oxlintrc.jsonThe package's lint configuration
lint-suppressions.jsonThe lint errors that predate their rules; the list only shrinks

Design system explains each one.

runtime/ ​

Runs inside a machine's Docker sandbox, not in Node. Every helper that acts for one agent takes its id, or reads its home from GUILDS_AGENT_HOME.

PathWhat it is
Dockerfilepython:3.12-slim plus Chromium or Chrome, TigerVNC, noVNC, ttyd, gost, Playwright 1.52.0, Node.js 24, build tools, GitHub CLI, mise, the coding harnesses, and the helpers below. Codex (CODEX_VERSION) is always installed. Claude Code, the Cursor CLI, and the Antigravity CLI (CLAUDE_CODE_VERSION, CURSOR_VERSION, ANTIGRAVITY_VERSION) are installed when the HARNESSES build argument names them, which its default does. The harness CLIs it carries are listed at /usr/local/share/guilds/harnesses
guilds-codeHome and machine sizes, and git setup, clones, fetches, the push URL of a read-only clone, checkpoints, and diffs; reads the agent's tokens from /run/guilds/<agent id>/git-tokens.json
guilds-harnessThe coding harnesses behind a subscription agent's turns: check, start, poll, result, and stop; one driver per harness (Claude Code, Codex, Cursor, Antigravity); call state under /run/guilds/<agent id>/harness/ (Harnesses)
agyThe Antigravity CLI at the pinned version, installed as /usr/local/bin/agy
claude-code-managed-settings.jsonClaude Code's managed settings at /etc/claude-code/managed-settings.json: hooks off, no project MCP servers, no self-update
guilds-git-credentialThe git credential helper for every HTTPS host: the token and username of the guild repository git talks to, for its host and path only
git-hooks/The platform's git hooks, at /usr/local/share/guilds/git-hooks: every hook name a link to guilds-hook, which runs the repository's own hook of that name, and for prepare-commit-msg then adds the Guild-Run and Guild-Agent trailers (Commit trailers)
guilds-script-runRuns a named Python script with GUILDS_SCRIPT_ARGS on stdin
agent-browser-start <agent id> <display> <vnc port> <devtools port> <cdp relay port> <novnc port> <language>One agent's Xtigervnc display, Chrome, noVNC, and gost DevTools relay, which sets each request's Host to Chrome's, on the display and ports its slot sets
agent-cli-start <agent id> <terminal port> <first port> <last port>One agent's ttyd with bash in its home and its port block; prints the secret path segment it serves under
agent-stop <agent id> browser|all|purgeStops one agent's browser, or with all its terminal and background commands too; purge also removes its /run/guilds/<agent id>/ files
agent-lib.shShell helpers the agent-* scripts share
guilds-browserPlaywright over the agent's CDP port for the browser tools (Browser)
guilds-localeTimezone from the egress IP; Chrome language from GUILDS_BROWSER_LANGUAGE (default en-US)
install-chrome.pyGoogle Chrome Stable on amd64, Debian Chromium on arm64

Free software under the GNU Affero General Public License, version 3 only.