Agent Harness Tutorial · Cost
The monthly bill
What the demo costs to keep running for a month, whether or not anyone talks to it. Almost everything sits inside a free tier; one database is the real bill.
About $0.73 a day running, $0.14 a day with PostgreSQL stopped. PostgreSQL left running for a whole month is about $22: more than twice the $10 budget (finding F-47). So it is stopped when idle, and Azure restarts a stopped server after 7 days.
Why not one server always on? One always-on replica would leave the free grant (about $1.20 a day). The price of scaling to zero: a cold start of up to 55 seconds after idle (flow 10), and DBOS timers that only fire when a replica wakes.
The $10 budget emails the owner at 50% and 80% of actual spend and at a 100% forecast. It never switches anything off, and cost data arrives hours late.
How it is done: the real code
Cut from the live repositories each time the site is built, so it always matches what runs.
infra/modules/postgres.bicep:84The one real bill: PostgreSQL B1ms sku: {
name: 'Standard_B1ms'
tier: 'Burstable'
}
properties: {
version: '16'
administratorLogin: administratorLogin
administratorLoginPassword: administratorPassword
storage: {
storageSizeGB: 32
autoGrow: 'Disabled'
}
backup: {
backupRetentionDays: 7
geoRedundantBackup: 'Disabled'
}
highAvailability: {
mode: 'Disabled'
}
authConfig: {
activeDirectoryAuth: 'Enabled'
passwordAuth: 'Enabled'infra/modules/containerapp.bicep:127Scale to zero scale: {
minReplicas: 0
maxReplicas: 1
rules: [