agentdatamodels

.com static
static bake — every number ran as a command (last re-run 2026-07-10)

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

59workers with a migrations/ dir

ls -d workers/*/migrations | wc -l

133total .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:

tablecreated inwhat it models
contractsworkers/subagentcontracts/migrations/0001_init.sqlthe Contract primitive (with a contract_ledger sibling table in the same file)
contract_ledgerworkers/subagentcontracts/migrations/0001_init.sqlappend-only ledger rows for every contract state change
agent_definitionsworkers/subagentcode/migrations/0001_init.sqlthe repo's 9 generated agents, mirrored from crates/agent-gen
cache_snapshotsworkers/subagentcache/migrations/0001_init.sqlprovenance-tagged Cloudflare cache analytics (source CHECK'd to manual_dashboard_paste/graphql_api)
memory_storesworkers/subagentmemories/migrations/0001_init.sqlpath-addressed memories with immutable versioning (memories/memory_versions/dreams siblings)
dns_zonesworkers/subagentsubdomains/migrations/0001_init.sqlthe 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.

modulemain types (grep 'pub (struct|enum)')
agent.rsAgentModel, AgentTool, AgentConfig — the typed sub-agent system compiled to .claude/agents/*.yaml by cargo run -p agent-gen
task.rsSemVer, TaskStatus, TaskPriority, TaskKind, Task, QueueStats — the SemVer-versioned TaskSession types
job.rsPlatform, NormalizedJob, Board, LeverJob — the ATS crawl types behind subagentjobs.com
coworker.rsCritterVariant, DirectiveLayers, Critter, CoworkerSkill — the coworkers-platform types
skill.rsSkillCategory, Skill, SkillMatch, GraphNode, GraphEdge
vendor.rsVendorRow, 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.

Rust + serde

crates/schema/src/agent.rs

pub enum AgentModel { #[serde(rename = "claude-opus-4-8")] Opus48, … Fable5 }

Cataloged live at subagentrust.com

TypeScript + Zod

scripts/agents/schema.ts

export const AgentModel = z.enum(['claude-opus-4-8', …, 'claude-fable-5'])

Cataloged live at subagenttypescript.com

Python + Pydantic

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.