Database tables
Agents keeps one shared record in Postgres. The API writes it, and server/admin.ts writes teams, people, machines, agents and policies directly. Each table page lists the columns of its tables, read from the schema that server/migrations/*.sql builds.
Migrations
Section titled “Migrations”server/migrations/*.sql holds the schema. server/migrate.ts applies the files in name order, each once and in its own transaction, and records each applied file’s name in schema_migrations, which has the columns version (text, key) and applied_at (timestamptz, default now()). The API runs the migrations before it listens. node --env-file=.env server/migrate.ts runs them on their own and prints applied <files> or up to date.
How to read a table
Section titled “How to read a table”| Note | Meaning |
|---|---|
key |
The column is the table’s primary key. A table with a key of several columns says so under its columns. |
optional |
The column can be null. A column without this note is not null. |
references |
The column holds the id of a row in the named table. |
default |
The value the database uses when an insert gives none. A uuid key has a random default and is not listed. |
one of |
A check constraint limits the column to these values. |
unique |
No two rows share the column’s value. |
Other constraints are listed under the table’s columns as Unique and Check.
Tables by page
Section titled “Tables by page”| Page | Tables |
|---|---|
| Teams and repos | teams, people, invites, join_requests, projects, repo_requests, repos |
| Machines and computers | instances, seats, coding_computers, claude_logins, screen_takeovers, secret_sets, connected_folders |
| Agents | agents, agent_managers, agent_hooks, skills, plugins, routines, memories |
| Secrets, commands and asks | secrets, templates, webmcp_origins, commands, approval_rules, asks |
| Conversations | conversations, conversation_members, messages, message_versions, pins, reactions, attachments |
| Tasks | tasks, task_members, task_repos, task_blocks, task_holds, task_attempts |
| Sessions and turns | sessions, events, raw_events, turns, session_reads |
| Workspaces and changes | workspaces, worktrees, file_changes, unlisted_changes, pushes |
| Documents | artifacts, artifact_versions, blobs, comments |
| Connectors | connectors, connector_accounts, connector_grants, connector_tools, connector_ask_uses, connector_conversation_grants, view_results, view_notes |
| Pipelines and runs | pipelines, pipeline_versions, runs, run_stages |
| Proposals and findings | proposals, proposal_hunks, session_replays, session_findings, candidates |
| Policies and evidence | policies, evidence, findings, verdicts |
| Decisions, lessons and deploys | decisions, lessons, obligations, refused_pushes, deploys |