The fleet's data models
The subagent*.com fleet is not one database — it is dozens of small, single-purpose D1
schemas plus one shared Rust type crate mirrored into three languages. This page inventories
what actually exists in opencoworkers/subagentjobs, with the command behind every count.
D1 migration estate
migrations/ dir
ls -d workers/*/migrations | wc -l
.sql migration files
find workers/*/migrations -name '*.sql' | wc -l
Each D1-backed primitive owns its schema as numbered migrations
(0001_init.sql, seed files after) applied with
wrangler d1 execute <db> --remote --file <migration>. Six real tables,
each attributed to the migration file that creates it:
| table | created in | what it models |
|---|---|---|
contracts | workers/subagentcontracts/migrations/0001_init.sql | the Contract primitive (with a contract_ledger sibling table in the same file) |
contract_ledger | workers/subagentcontracts/migrations/0001_init.sql | append-only ledger rows for every contract state change |
agent_definitions | workers/subagentcode/migrations/0001_init.sql | the repo's 9 generated agents, mirrored from crates/agent-gen |
cache_snapshots | workers/subagentcache/migrations/0001_init.sql | provenance-tagged Cloudflare cache analytics (source CHECK'd to manual_dashboard_paste/graphql_api) |
memory_stores | workers/subagentmemories/migrations/0001_init.sql | path-addressed memories with immutable versioning (memories/memory_versions/dreams siblings) |
dns_zones | workers/subagentsubdomains/migrations/0001_init.sql | the canonical zone/worker-binding directory the family sitemap is generated from |
crates/schema — the shared serde types
One Rust crate (crates/schema) holds the serde-deriving types the
binaries share (mcp-server, indexer, agent-gen, durable-store consumers). Files listed from
ls crates/schema/src; 6 type modules plus lib.rs.
| module | main types (grep 'pub (struct|enum)') |
|---|---|
agent.rs | AgentModel, AgentTool, AgentConfig — the typed sub-agent system compiled to .claude/agents/*.yaml by cargo run -p agent-gen |
task.rs | SemVer, TaskStatus, TaskPriority, TaskKind, Task, QueueStats — the SemVer-versioned TaskSession types |
job.rs | Platform, NormalizedJob, Board, LeverJob — the ATS crawl types behind subagentjobs.com |
coworker.rs | CritterVariant, DirectiveLayers, Critter, CoworkerSkill — the coworkers-platform types |
skill.rs | SkillCategory, Skill, SkillMatch, GraphNode, GraphEdge |
vendor.rs | VendorRow, FileRecord, AstSymbol, FileAst, VendorsConfig — the .vendors.toml indexer types |
One enum, three languages
AgentModel — the pinned Claude model ids this repo's generated agents
run on (claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5-20251001, claude-fable-5, claude-sonnet-5) — is deliberately
maintained in three languages, and each mirror has its own live catalog site. The TypeScript
mirror really did drift once (missing claude-fable-5, caught and fixed 2026-07-01
while building subagenttypescript.com's drift catalog) — which is the whole argument for
keeping the mirrors visible.
crates/schema/src/agent.rs
pub enum AgentModel { #[serde(rename = "claude-opus-4-8")] Opus48, … Fable5 }
Cataloged live at subagentrust.com
scripts/agents/schema.ts
export const AgentModel = z.enum(['claude-opus-4-8', …, 'claude-fable-5'])
Cataloged live at subagenttypescript.com
scripts/agents/schema.py
class AgentModel(str, Enum): OPUS_4_8 = "claude-opus-4-8" …
Cataloged live at subagentpython.com
Honest scope
This is a static inventory of repo-only facts — dated snapshots (authored 2026-07-09, migration counts and the AgentModel variant list re-verified 2026-07-10), not a live query — if a worker gains a migration tomorrow, the counts here lag until the next bake. The live, queryable versions of these catalogs are the linked sibling sites (subagentrust.com / subagentpython.com / subagenttypescript.com for the mirrors, subagentapi.com/api/catalog for every primitive's API). No number on this page was written from memory.