SQLite to PostgreSQL in 6 Days: A Timeline
The log of 6 days: a swarm writes a PostgreSQL storage engine in one weekend, we copy 24 million rows 3 times, switch production at 01:44, and get the first error at 01:46.
We started Agent Swarm on SQLite on purpose. One file is simple to run and easy to deploy. We knew that we would need PostgreSQL if we scaled. Then the scale came. Our own file grew to 87 GB, one long statement could stall the API, and the next steps on our list need a database that several processes can share. KISS paid. SQLite took us this far, and it stays the default.
This post is the log of those 6 days. Times are Barcelona time. The mark on each entry says who did the step: Dani or Taras, Dani's swarm, our swarm, a coding session, or CI.
Thu 12 NovPostgreSQL goes on the list
- that dayCoding session
No in-process SQLite driver on Bun is non-blocking
We measured the in-process SQLite drivers that run on Bun. Each of them blocks the event loop while a statement runs. The plan from that research was a worker thread for SQLite. We deferred PostgreSQL.
Fri 20 NovA call and 2 prompts
- Dani and Taras
A call sets the rules
Dani runs Agent Swarm at his company and had the same limit. He and Taras agreed on 4 things on a call:
- Both engines stay supported.
DATABASE_URLselects PostgreSQL, and an install that does not set it behaves as before. - Raw SQL stays, behind a thin storage interface. No ORM.
- No phased plan. A swarm gets one goal. Every E2E test must pass on both engines.
- The target date is before Christmas.
From the transcript of the call, with the filler words removed:
A goal, to say: okay, you have all these E2Es. Just switch the connection to Postgres, and ensure that the E2Es pass with both SQLite and Postgres. And that's it. Maybe that's the easiest way to do it.
Tarason the call10:35But I'm pretty sure that every SQLite query has a Postgres equivalent.
Danion the call10:4095%, yes. The other 5% no.
Tarason the call10:40If this is something that we could put under the Christmas tree, I would be super happy.
Danion the call10:58It's doable. It's just a matter of figuring out the good prompt to do that, and then do the last 10%, which is the worst part, which is just ensure that it's okay, okay, okay, and just merge it and that's it.
Tarason the call10:58 - Both engines stay supported.
- Dani
A research prompt
Dani asked for a research phase first, then a decision.
Written with Fable locally ๐
let me know what you'd steer and I'll kick it off afterwards
Daniin Slack13:17 - Taras
A brainstorm and a goal prompt
Taras answered with the same model and another style: a brainstorm and a goal prompt. The goal prompt has an objective, 18 numbered decisions, and conditions that say when to stop.
lets join both? hajaj was on meeting so could not send before
Tarasin Slack16:30it seems you already want to jump into the implementation with a "goal", while mine is trying to be a preliminary research phase before saying "goal: implement direction X, stop when conditions met" ๐
Daniin Slack16:34jaja you can run that and correct wht i did, mine was a brainstorm with some bg research
a bit more yolo jajaj
Tarasin Slack16:53The yolo version won. The brainstorm and the goal prompt became the input of the engine build. The research ran first.
- Dani's swarm
The discovery
Dani gave his research prompt to his swarm. The first researcher agent stopped on a usage limit after 21 minutes, and the lead gave the work to a second one. The report came at 18:07 and cost 71 USD.
The report checked the 1,495 static SQL statements in the code against PostgreSQL. Of those, 1,221 planned with only the placeholders changed. That is 81.7%, and 90.1% after 2 mechanical changes. The 95% of the morning call was a fair guess.
- Dani
The engine prompt goes to the lead
Dani gave the 2 files to the lead of his swarm. 3 minutes later a worker agent, Picateclas, started. Its first commit came at 00:07. From here the swarm wrote the code.
Sat 21 NovA swarm works the weekend
- Dani's swarm
A stronger contract, on SQLite first
The worker did not start with PostgreSQL. It took a baseline and finished a driver spike at 00:27. Then it added 26 parity scenarios to the storage contract suite, on SQLite. With them, the suite would catch a difference between the engines later.
- Dani's swarm
Stopped by a limit, resumed by the lead
A session stopped on a spend limit at 03:30. Another stopped on a usage limit at 10:12, after 5 hours and 6 minutes of work. Both times the lead of the swarm resumed the work 2 minutes later.
- Dani's swarm
The API starts on PostgreSQL
The worker finished the storage packages on SQLite at 11:26. At 12:56 the PostgreSQL engine was ready, and the API started on it for the first time.
/ 118 tasks, 7 agents
A swarm at work over one weekend
The discovery on Friday afternoon, the engine build from Friday 23:56 to Sunday 02:02, then the review rounds until the merge.
Loading interactive chartThe gaps on Saturday evening are waits for a human. - Dani
14 hours in
Our swarm has been at the migration for 14 hours ๐
Daniin Slack14:22LOL
and how is it going?
Tarasin Slack14:34 - Dani's swarm
No SQL left outside the storage layer
At the start the server code held 2,193 SQL call sites in 246 files. Milestone 4 moved every one of them into the storage packages.
/ the storage boundary
2,193 SQL call sites, down to zero
Each bar is one run of the check that lists SQL outside the storage packages.
Loading interactive chart- SQL call sites outside the storage layerin 246 files
- 2,193
- transaction sitesin 127 files
- 291
- tables418 indexes, 65 triggers
- 158
- writes that were not safe to run twicefound and fixed in 20 files
- 44
The swarm made this inventory at the start of the build. - Dani's swarm
The status, in its own words
Dani asked his swarm for its status and pasted the answer:
2 lines of that status mattered later. A transaction on PostgreSQL can run again after a serialization failure, so the hook undoes the state in memory when a transaction rolls back. And the 2.5 seconds of memory search became the slow search of the first night on production.
niceee
what was the input?
Tarasin Slack15:51Your two files in the end ๐
Daniin Slack15:52XD
cost so far?
Tarasin Slack15:52410$
Did you add some sort of native goal support to the swarm harness, or is it coincidental that it's running on its own towards the "goal"?
Daniin Slack15:53not really jaja can you ask it why, it could be bacuse the playbooks of docs.agent-swarm.dev are passed as optional skill to get "patterns" to use in the swqarm, so maybe it figured it out via that
Tarasin Slack15:54 - Dani's swarm
The swarm stops and asks
The worker stopped, and the lead opened an approval request with 2 questions. It did this 4 times that evening. In total it waited 250 minutes for a human.
Approval requests4 answered ยท Sat 21 NovDani's swarm, the leadCreated 15:561 of 4
Postgres engine: decision needed
Answeredby
Dani18:18- JSON storage:
jsonbchanges the key order, and 2 scenarios compare JSON text byte for byte. Which column type?Answer: Keepjsonband compare parsed values. - Write retries are far above the 5% target at the poll claim. What next?Answer:
READ COMMITTEDwithFOR UPDATE SKIP LOCKEDat the poll claim, then measure again.
- JSON storage:
Dani's swarm, the leadCreated 18:422 of 4
Write conflicts at task finish and task creation
Answeredby
Dani20:08- Task finish still has a write conflict in 71.7% of transactions. Apply the poll claim fix there too?Answer: Apply the fix to task finish.
- Task creation with an idempotency key conflicts in 90%. Keep it?Answer: Keep keyed task creation strict, at
SERIALIZABLE.
Dani's swarm, the leadCreated 20:253 of 4
4 races above the 5% target
Answeredby
Dani20:38- Accept 3 single-row races (about 90% each) as exceptions to the 5% target?Answer: Accept them as exceptions.
- Accept agent registration (59.3%) too?Answer: Accept it too. No code change.
Dani's swarm, the leadCreated 23:134 of 4
Task creation retries and one failed webhook scenario
Answeredby
Dani23:21- Task creation without an idempotency key retries in 58.3% of transactions. Fix it or accept it?Answer: Fix it with the task finish method.
- One webhook scenario failed one time in a full PostgreSQL run. Investigate, or record it and continue?Answer: Continue the investigation.
A redraw of the approval screen of the dashboard. We shortened the titles and the text. - Dani and Taras
A second opinion
Dani sent the first request to Taras before he answered it:
Any strong opinions?
Daniin Slack17:44i would go w jsonb always
Tarasin Slackthat evening - Dani
jsonbstays, and the poll claim gets a lockThe first answer went to the worker at 18:18. 22 minutes later it had the result.
/ write retries
3 hot paths that kept retrying
At SERIALIZABLE, most transactions on these paths lost a race and ran again. With READ COMMITTED and explicit row locks, all 3 measured 0%.
Loading interactive chartMeasured in the seeded bench of the branch. No transaction ran out of retries. 3 hot write paths left
SERIALIZABLEthis way. 4 single-row races stayed near 90% on purpose, as accepted exceptions. Everything else runs atSERIALIZABLE, with a retry on each serialization failure. - Dani's swarm
A copy command
Milestone 6 was a command that copies a SQLite database into PostgreSQL. Its test copied 140 tables and 15,310 rows, with every checksum equal. 3 days later the same command copied 24 million rows.
- Dani's swarm
The contract suite passes on PostgreSQL
The last fix of the evening brought the retries of task creation from 68.6% to zero. With it, the contract suite passed on PostgreSQL.
Sun 22 NovThe PR
- Dani's swarm
Both engines pass the full suite
The E2E suite boots the real API and checks its answers. In strict mode it passed on both engines, with 242 scenarios on each.
- Dani's swarm
A PR in the fork
The worker opened the PR in Dani's fork first. A reviewer agent on another model, gpt-6.1-sol, reviewed it 3 times before 04:06: 4 findings, then 1 blocker, then none. The first green run of the merge gate came at 02:27.
- Dani
PR #3562 opens
/ PR #3562
Postgres as a second storage engine
Opened by Dani on Sunday 22 November at 13:27, 37 hours after the engine prompt. Merged on Monday at 17:07. desplega-ai/agent-swarm#3562
- commits
- 417
- files changed
- 781
- lines added
- +94,917
- lines removed
- โ24,626
/ 94,917 lines added
Where the lines went
The 3 storage packages hold 57,214 of the added lines.
Loading interactive chartMost of the removed lines are code that moved from `src` into the storage packages. - that dayCoding session
Verification starts
We did not review 94,917 lines one by one. A coding session checked the PR on 10 temporary servers, in 5 rounds before the merge. It ran what the repository already had: the unit suite, the contract suite and the E2E suite. Each ran on both engines. The E2E suite made the merge possible. It gave the swarm a definition of "done" that we could run again.
By the switch we had 7 layers of checks:
LayerWhat it runsWhat it found- 01Storage contract testsOne suite, 2 engines. This was the spec that the swarm built against.Found: The base for everything else
- 02E2E suite in the merge gateBoots the real API on SQLite and on PostgreSQL, 6 shards each.Found: A bulk write with one commit for each row
- 03Deterministic simulationWorkloads with injected faults, the same seed gives the same run.Found: A 15 minute hang on dead connections
- 04Trial swarm with a stress packA full swarm on PostgreSQL for days, with forced rollbacks.Found: Seeded schedules that kept their SQLite text
- 05Rehearsals on production dataFirst an isolated restore, then the real target.Found: 9,423 rows that PostgreSQL refuses, a 64 MB shared memory limit
- 06Statement replay1,450 ported statements, run against the trial swarm.Found: 11 failures: JSON parameters, one unquoted column
- 07Nightly commit budgetFails when one request makes more commits than its budget.Found: Nothing yet. It guards the fix above
Mon 23 NovMerge, then production data
- that dayCoding session
First rehearsal on a restore of production
We restored a backup of production on an isolated server and booted the API twice, on
mainand on the branch. A sweep of 157 read endpoints gave the same status on both. - Taras
PR #3562 merges
The merge of PR #3562 came under 4 days after Dani's first prompt. It took 30 review rounds: 3 by the swarm's own reviewer in the fork, 12 from Taras's account and 15 by our review bot. The merge gate ran 123 times, and 48 of those runs failed.
- Dani and Taras
The first plan for the data
On a second call we described the data move in one line: stop the swarm on a Saturday, dump SQLite, restore into PostgreSQL, change the environment, start. From the transcript, with the filler words removed:
It's 10 minutes after deploy, all green. Now the interesting part really is the migration to Postgres.
Tarason the call17:33The data migration itself, I would say it's deterministic almost. I would assume the SQL statements don't even require a rewrite, because it's just a bunch of inserts.
This is a very simple playbook: dump and restore.
Danion the call17:36I will do the copy anyways, just to have it.
Tarason the call17:38The next 2 days showed that the copy was most of the work.
- that dayCoding session
A trial swarm starts on PostgreSQL
A full stack started on its own server. It has a lead, a pool of workers, and a stress pack of scripts, workflows and schedules. The pack forces about 9% of the transactions to roll back. The trial swarm still runs.
Tue 24 NovThe copy tool runs on production rows
- Coding session
A 15 minute hang, found by simulation
The deterministic simulation runs the API against a database with injected faults, and the same seed gives the same run. It found a hang. When every connection died without a close, the health check still passed and every request hung for about 15 minutes. Since #3587 the API exits after 10 seconds, and its supervisor starts it again.
- Coding session
db-copynames every refused rowagent-swarm db-copycopies a SQLite file into an empty PostgreSQL database in one transaction. Then it compares a row count and a checksum for every table. If anything differs, the target stays empty.Production data did not pass. Since #3602 one run lists every value that PostgreSQL refuses, with its table, column and row.
- Coding session
db-copy --repairSQLite had accepted 9,423 values that PostgreSQL refuses: a NUL byte in a text, an emoji cut in half, a row whose parent row is gone. Since #3619,
--repairfixes those kinds during the copy and lists each fix. It does not change the SQLite file.With it, the first full copy passed. It moved 23.2 million rows in 75 minutes, and every count and checksum was equal. The 87 GB file became 38 GB in PostgreSQL.
- that dayOur swarm
The swarm ports its own SQL
The copy moves rows. It does not move SQL that is stored as text. Our swarm held 92 scripts that query the database and 58 dashboard widgets. It also held schedule prompts with example queries, and extensions that read a task before they judge a message. All of it was SQLite SQL.
We sent the lead a task with the dialect rules. It split the scripts into batches for its workers, and ported 78 of the 92 that day. One line of a worker's report named the risk that the replay removed a day later:
Batch C: 18 ported (staged, not live), 2 not necessary, 6 skipped. [...] PG texts are syntax-parsed only, not run, so types are unproven.
Tester Lead11:48
Wed 25 NovRehearsal, then go
- CI
The merge gate gets faster
The E2E suite ran on both engines for every merge, and that had made the gate slow. Its slowest job took 867 seconds. One message changed the design:
in postgres could we start maybe a single instance and just do a seeded database (after migrations) and do a copy of the database? common pattern
TarasTue evening, to the coding agentSince #3648 each test boot clones a migrated template database, and the suite runs in 6 shards. The slowest job takes 333 seconds.
- Coding session
One request, one transaction
- Coding session
Rehearsal into the real target
The second full copy went into the production database server, while the swarm ran on the same machine. It took 98 minutes, and we dropped the result. The work to prepare that server had already shown a limit that the isolated server did not have. The database container had 64 MB of shared memory.
/ 3 full copies
The same copy, 3 times
Each run copied the whole production database and compared a row count and a checksum for every table.
Loading interactive chartThe second run shared its server with the live swarm. - Taras
One rule for the session
do not do any migrations without checking w me
Taras14:25, to the coding agent - Our swarm
1,450 statements replayed
We exported every statement that the swarm had ported and ran each one against the trial swarm. 1,439 passed. 10 of the 11 failures had one cause. The statement sent a JSON list as a text parameter into a
jsonbcast. The swarm fixed all 11 that afternoon, and #3683 removed the cause in the engine. - Taras
Go
Taras approved the plan for the night. Wait for the running tasks. Stop the swarm. Copy. Switch only if the copy exits with 0, every count and checksum is equal, and there are no warnings. On any other result, the swarm stays down until he starts it on SQLite.
- Coding session
The swarm stops
Swarm is stopped and the checks say ready. Starting the copy now (approved).
Claude Code, Claude Fable 5.223:58
Thu 26 NovThe switch, and the first morning
/ 23:55 to 02:00, Barcelona time
- 23:55The swarm stops
- 23:58The copy starts
- 01:3124,051,347 rows, every count and checksum equal
- 01:44Production runs on PostgreSQL
- 01:465 statements fail with
out of shared memory - 01:57Lock table raised, database restarted in 4 seconds
- Taras
2 questions from a phone
% progress?
Taras00:48, from his phoneAbout 58% done by time, at 00:49 BCN (50 minutes in). The copy runs ahead of the night test.
Claude Code, Claude Fable 5.200:48 ane now?
Taras01:27About 93% done at 01:28 BCN (89 minutes in). The copy is in its last phases.
Claude Code, Claude Fable 5.201:27 i was watching breaking bad in the couch XD
Tarasa day later, about that hour - Coding session
The copy passes
Copy verification passed: exit 0, 140 tables, 24,051,347 rows, every count and checksum equal, 0 warnings. Taking the first dump now.
Claude Code, Claude Fable 5.201:33 - Coding session
Production runs on PostgreSQL
The API is up on PostgreSQL since 01:44 BCN (
Postgres engine ready, reader role ready, health 200). Running the after-switch checks.Claude Code, Claude Fable 5.201:44 The first task for the lead on the new engine was a smoke test. This was its whole answer:
dialect=postgres, n=25, memory-search results=10 (equals the default limit of 10)
Lead01:49 - Taras
go pred
The swarm runs on PostgreSQL since 01:44 BCN, and the copy passed every condition you set. One decision is open for you: the predicate lock setting.
Claude Code, Claude Fable 5.201:52 go pred
Taras01:57The change is live: PostgreSQL restarted in 4 seconds with
max_pred_locks_per_transaction=2048, and the API came back by itself.Claude Code, Claude Fable 5.201:58 The API found that its database lock was gone and exited. Its supervisor started it 6 seconds later. That path ran in production for the first time here.
- Taras
Taras goes to sleep
ok ill go to sleep so monitor during the night until i come back
Taras02:02He did not. 8 minutes later he asked a second coding session for this post.
- Coding session
A script that the port missed
The PostgreSQL error log showed the same statements every 15 minutes:
ERROR: column m.chunkindex does not exist at character 81 STATEMENT: ... SELECT count(*) AS rows_total, sum((m.chunkIndex IS NULL OR m.chunkIndex = 0)) AS logical, ...A metrics script still sent SQLite SQL. Its workflow had failed on every run since the switch, and the page that it feeds showed old numbers with no error. We ported the script, and the 02:30 run passed.
- Coding session
2 gates that fail open
The same log showed 2 extensions with SQLite queries. Each one reads the task from the database before it judges a message. On an error it returns, and the message passes. Neither gate had judged a message since 01:44, and no alert said so. The lead got a task with the port rules. The worker that took it found more:
6 scheduled global scripts break on PG. The port list missed them because workflows run them, so they leave no run rows.
Jackknife02:55both gates on pg now, comms-adherence-gate v10 and taras-voice-gate v10, v9 kept for rollback. diff is just sql + version and all 6 queries return rows. voice gate judged this reply live and blocked it twice lol [...]
Lead03:00 - Coding session
The night report
A watch ran all night and sampled the database every 5 seconds. This is its report at 06:15:
- No more lock errors. The predicate lock table peaked at 28,077 targets, and the default holds about 5,000. The new setting was necessary.
- The swarm worked. It completed 129 tasks and 2,457 script runs before 06:00.
- The nightly release deployed at 04:00, and the API started on PostgreSQL with no problem. The first scheduled backup ran at 05:30 and wrote 16 GB in 18 minutes.
- 2 statements were slow. Memory text search took up to 81 seconds. Task search took up to 57 seconds, and 20 to 25 seconds for a term with no match.
Dani's swarm had flagged memory search as a risk on Saturday. Both searches passed every test, because the tests use small data.
- Taras
Taras wakes up
His first act of the day was to put a PR into the merge queue. 5 minutes later:
ok added some to mq
could you merge via mq the perf ones please? as there are migrations so order is important
Taras09:32, to the coding agent - Coding session
The search fixes go live
4 PRs came out of the night. They merged in the morning and deployed at 10:16.
/ the first morning
Search, before and after the fix
PostgreSQL parsed the text of every row for each search. The fix stores a search document for each row.
Loading interactive chartSeconds for one request on production. The value before the deploy is the worst that we measured. - Our swarm
The rest of the stored SQL
The error log of the night named what the port had missed: 5 workflows, 4 pages and 1 script. One of the pages had an open browser tab that polled it, with 69 failed queries in 15 minutes. The lead got the list as one task.
What changed, in numbers
The median request got slower, because the database is now a network hop away. The tail got faster, and at 5 times our request rate the 99th percentile fell from 363 ms to 51 ms.
/ one load test, 8 agents
Request latency, by engine
Milliseconds for one request in one load test on a copy of production, at our request rate and at 5 times that rate. Lower is better.
Search was worse on the first night and is now faster than it was on SQLite.
/ memory search
Search got worse, then better than before
Seconds for one request on production. Each bar is the slowest value we measured.
The data got smaller in the move.
/ on disk
The same rows, less than half the size
Size on disk before the copy, after it, and after the search fix added its documents.
| Measure | SQLite | PostgreSQL, first measure | PostgreSQL, after the fix |
|---|---|---|---|
| Database sizesearch documents added | 87 GB | 38 GB | 41 GB |
| Request latency, medianat our request rate | 4.7 ms | 17.4 ms | 14.7 ms |
| Request latency, 95th percentileat our request rate | 207 ms | 143 ms | 197 ms |
| Request latency, 99th percentileat our request rate | 356 ms | 282 ms | 279 ms |
| 95th percentile at 5 times the ratefix: #3596 | 175 ms | 53 ms | 32 ms |
| 99th percentile at 5 times the ratefix: #3596 | 363 ms | 249 ms | 51 ms |
| Write transactions rolled backfix: #3596, all retried | none | 4.1% | 0.35% |
| Memory list with a queryfix: #3692 | 1 to 3.5 s | 9 to 15 s | 0.7 s |
| Memory searchfix: #3692 | about 1 s | 3 to 4 s | 0.6 s |
| Task search, term with no matchfix: #3697 | not measured | 20 to 25 s | 0.1 s |
Latency and rollback rows come from one load test on a copy of production, with 8 agents. The search rows are single requests on production.
What we would repeat, and what we would change
- Write the E2E suite before the engine. A swarm wrote the engine against that suite in a weekend, and the same suite let us merge it.
- Make the list of SQL that is stored as text on day 1: scripts, widgets, prompts, extensions. We made it on day 5 and still missed more than 10 items.
- Give the copy tool a repair mode from the start. A database with a long history holds rows that a strict engine refuses.
- Rehearse into the real target, not only into a clean server. The shared memory limit showed only there.
- Raise
max_pred_locks_per_transactionbefore the switch if you run atSERIALIZABLE. - Read the database error log in the first hour. None of our leftovers raised an alert.
- Test search on data of production size. Both slow searches passed every test on small data.
- from the first prompt to productionthe target was before Christmas
- 6 days
- PRs1 for the engine, 22 around it
- 23
- of downtime2 hours planned
- 1 h 49 min
- Dani's swarmWrote the PostgreSQL engine against the test suites1 PR ยท 417 commits ยท 118 tasks
- Coding sessionsClaude Code in T3 Code: verification, the copy tool, CI, rehearsals, the switch, the search fixes22 PRs ยท 3 full copies
- Our swarmPorted its own scripts, workflows and prompts78 scripts on day 1 ยท 11 fixes
- CIThe E2E suite on both engines, and a nightly commit budget6 shards for each engine
- Humans2 calls, the JSON type, the isolation level, the go for the switchDani, Taras
The 22 are the PRs merged from 24 to 26 November that touch the engine, the copy or their tests.
What it cost
- tokens in total1,647M Dani's swarm, 1,459M sessions, 318M ours
- 3.42B
- for the modelslist prices and recorded cost, not an invoice
- 1,640 USD
- for 16 test serversthe list is below
- 29 EUR
- Dani's swarm, the workerPicateclas on Claude Opus 5.5: the engine, the fixes after each review41 tasks ยท 1,502M ยท 512 USD
- Dani's swarm, 6 more agentsThe lead, 2 researchers, a reviewer on gpt-6.1-sol, 2 more workers77 tasks ยท 146M ยท 110 USD
- Sessions, Claude Fable 5.2Most sessions: verification, the copy, rehearsals, the switch2,546 turns ยท 1,015M ยท 721 USD
- Sessions, Claude Opus 5.5Implementation in worktrees, in the background2,158 turns ยท 438M ยท 170 USD
- Sessions, Claude Sonnet 5.5Small subagent tasks73 turns ยท 5M ยท 3 USD
- Our swarm5 task trees: scripts, prompts, extensions, workflows and pages51 tasks ยท 318M ยท 123 USD
Session tokens come from the session logs, at API list prices from models.dev. Claude Fable 5.2 uses the Fable 5.1 rates. We ran the sessions on a Claude subscription. Each swarm row is the cost that the swarm recorded. No row is an invoice.
/ tokens for each hour
Token usage over the 6 days
One point for each hour, Barcelona time.
/ running total
Cost over the 6 days
Dani's swarm spent 622 USD until the merge. Our sessions had spent 90 USD by then. The rest paid for the verification and the move of production.
We also started 16 servers on Hetzner Cloud. 11 of them ran before the merge, to check the PR on clean machines. 13 lived for less than 3 hours, and one for 2 minutes. All 16 together cost about 29 EUR.
| # | Server | Size | Started | Life | Cost |
|---|---|---|---|---|---|
| 01 | First check of the PR: SQLite suite | cpx42: 8 vCPU, 16 GB | Sun 22, 21:18 | 18 min | 0.11 EUR |
| 02 | First check: PostgreSQL suite | cpx42: 8 vCPU, 16 GB | Sun 22, 21:18 | 18 min | 0.11 EUR |
| 03 | First check: release build | cpx52: 12 vCPU, 24 GB | Sun 22, 21:19 | 17 min | 0.16 EUR |
| 04 | Second check: SQLite suite | cpx42: 8 vCPU, 16 GB | Mon 23, 01:02 | 22 min | 0.11 EUR |
| 05 | Second check: PostgreSQL suite | cpx42: 8 vCPU, 16 GB | Mon 23, 01:02 | 22 min | 0.11 EUR |
| 06 | Second check: release build | cpx52: 12 vCPU, 24 GB | Mon 23, 01:03 | 10 min | 0.16 EUR |
| 07 | Night workload on the release build | cpx52: 12 vCPU, 24 GB | Mon 23, 01:53 | 9 h 41 min | 1.61 EUR |
| 08 | Third check: test suites | cpx42: 8 vCPU, 16 GB | Mon 23, 01:53 | 40 min | 0.11 EUR |
| 09 | Fourth check | not recorded | Mon 23, 11:44 | 33 min | not known |
| 10 | Final check of the PR | ccx43: 16 dedicated vCPU, 64 GB | Mon 23, 12:40 | 35 min | 0.44 EUR |
| 11 | Boot test on a restore of production | ccx43: 16 dedicated vCPU, 64 GB | Mon 23, 14:52 | 1 h 9 min | 0.88 EUR |
| 12 | The trial swarm on PostgreSQL | cpx42: 8 vCPU, 16 GB | Mon 23, 18:08 | days | 7.35 EUR |
| 13 | Copy rehearsals on production data | ccx53: 32 dedicated vCPU, 128 GB | Mon 23, 19:20 | 20 h 16 min | 17.95 EUR |
| 14 | Test of the memory search fix | cpx41: 8 vCPU, 16 GB | Mon 23, 22:23 | 1 h 40 min | 0.10 EUR |
| 15 | Test of the token write fix | cpx41: 8 vCPU, 16 GB | Mon 23, 22:32 | 2 h 38 min | 0.16 EUR |
| 16 | Build check of the simulation pack | not recorded | Tue 24, 09:55 | 2 min | not known |
| 16 servers | 29.36 EUR | ||||
Cost is the hourly list price for each started hour. The trial swarm still runs, so its cost counts to Thursday 12:00.
Move your own swarm
The guide has the inventory queries, the SQL translation table, the rehearsal, the window and the rollback.
In your swarm
Send this to your lead. It makes the list of SQL that the copy does not move, before you plan a date.
Plan our move from SQLite to PostgreSQL. Do not change anything yet.
1. Read https://docs.agent-swarm.dev/docs/migrations/sqlite-to-postgres.
2. Run the inventory queries of Step 1. List every script, dashboard widget, schedule prompt, workflow and extension that holds SQL.
3. For each item, say if it is seeded or ours. Do not edit a seeded item. For each of our items, write the PostgreSQL text.
4. Tell me which server settings of Step 3 our database does not have yet.
5. Reply with the list, the count for each kind, and what you could not check./ references
Sources and further reading
Related field notes
How to Iterate on Videos With AI: 36 Comments, 8 Cuts, One Night
An agent can render a video but cannot see what you see in it. This is the review loop we used to cut our LEGO-style short again in one night, and the free tool the agent built for it in seven minutes.
$40m is the total Spanish OSS Exit Market.
tl;dr: That's 0.05% vs US, and 0.13% vs EU. Is it because of investment?
Two small models triage every PR
Clairic and Jev triage every pull request, and a coding agent reviews only what they flag. About $0.02 and 30 seconds per PR, across 14 real PRs.