platform where domain operators, from the best in the world to you, can distill their expertise & skills into agents, tools & automations that autonomously do the work, at their level, and share for anyone; across every domain of knowledge work.
the problemGeneric agents flatten the thing a firm sells
A professional services firm sells judgment: how this recruiter screens, how this contractor prices a bid. If every firm in a category buys the same AI tool, they all produce the same output and the edge is gone.
The obvious build is a system prompt and a handful of API keys. It falls over in three places, and all three are engineering problems rather than prompting ones. So almost none of this repo is the model call.
what the operator is actually buyingthree things a system prompt does not solve
the ideaAn agent is a row, a volume, and a mind
The decision everything else follows from: the agent is not the conversation. It is a durable object, and a turn is one wake against it.
Skills are the operator's method as files on the volume, discovered from disk by the Claude Agent SDK rather than stuffed into a prompt. That mattered more than any prompt engineering I did, because a diff of their method is now a diff of a file.
mind
json blob rendered into the prompt at the top of a wake, mutated by a tool at the bottom
skill
a SKILL.md on the volume, resolved from the database first and the filesystem second
what an agent is made offive ways an agent gets wokenone turn, wake to resulta github webhook wakes an agent
how it runsThe backend is a broker, not a compute host
FastAPI on eight workers, one box, blue-green behind Caddy. It never runs an agent: it authenticates, authorises, writes a JSON line to a sandbox's stdin, and forwards what comes back.
That forces every piece of cross-worker state into Redis, which is the right constraint, because with no sticky sessions a deploy can swap the slot under a live turn. A cold Modal sandbox takes five to eight seconds to boot, so new sessions claim a pre-booted one in about 200ms instead.
what sits on whata dropped client catches back uptwo halves of the integration layera token gets from the sandbox to the tab
credentialsNothing secret enters the sandbox
The sandbox runs code an operator wrote and a model extended, so it is the least trusted process in the system. It gets one HMAC session token naming a session, a user and a scope, plus three proxy URLs.
The narrow part I like: a 429 carrying none of Anthropic's rate limit reset headers is probably load balancer throttling, so that case retries the same credential once instead of locking a healthy key out of the pool.
in postgres
a connection id and a status, no token, so a dump of it leaks nothing
known weak spot
fernet columns have no key version, so rotation means a backfill
the obvious way vs the way it worksa credentialed call, end to end
the hard partsTwo things that were genuinely difficult
Tenancy was not eight bugs. It was one habit with eight faces, and in four of the five worst cases the correct check already existed elsewhere in the repo for the same value. Human review kept passing because each diff looked exactly like the file around it.
The second was money. The Claude Agent SDK reports cost as a running total for the life of a client, not the cost of the turn that ended, and every persist path added that total to the session. Charged cost grew with the square of the turn count.
the fix
one function reads the cumulative figure, swapping old baseline for new in a single statement
cost of the suite
about nine seconds, and it cannot tell you whether a gate is the right gate
the hour-long one
an old second VM kept winning the redis leader election, so a correct sweep ran zero times
the ownership contract testtwo ids on one socket framewhat one turn costs, and who paysone 33-turn session, before the fix
where it standsWhat works and what is still wrong
It runs. Operators build agents, attach skills and connections, publish them, and other people clone them; a clone copies the volume then prunes every reference folder not marked as a template, so personal material does not ship with the copy.
Production has been on emergency infrastructure since a billing lockout, and the runbook I wrote has gone stale in an expensive direction: two VMs are billing, DNS points at the clone, and the disks have diverged for three months. The way back is a migration, not a DNS flip.
spawnlabs-core
backend, web app, sandbox agent, nango action scripts
spawnlabs-auth
separate Next app, issues the cookie on the parent domain
spawn-admin
cloud run console: credential pool health, oauth credentials, cache invalidation
the surface an agent can reachopen, in order of how much it bothers mepublish, then somebody takes a copy