flagon-io/g1t

public

Git for AI scale: a forge for thousands of agents working on the same code at once.

g1t/services/billing/wrangler.jsonc

93 lines4,419 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Agents as a team: lifecycle, merge queue, billing and a new shell1{
2 "$schema": "../../node_modules/wrangler/config-schema.json",
3 "name": "g1t-billing",
4 "account_id": "1e6f2cffa3f445920836e8ebe446bb58",
5 "compatibility_date": "2026-09-26",
6 // Runs next to its database: a request makes several queries in turn,
7 // and each would otherwise cross the distance to it.
8 "placement": { "mode": "smart" },
9 "main": "build/index.js",
10 "build": { "command": "cargo install -q worker-build@0.8.7 && worker-build --release" },
11 // Reached only through service bindings.
12 "workers_dev": false,
13 "d1_databases": [
14 {
15 "binding": "DB",
16 "database_name": "g1t-billing",
17 "database_id": "695a6979-fd07-4850-bc97-904a6b4b7a04",
18 "migrations_dir": "migrations"
19 }
20 ],
Billing on Stripe's pages, month-end charges, warnings; sudo by workspace21 // Identity emails owners as their workspace nears its usage limit.
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put22 // Repos says which repositories are public (the open-source pool pays
23 // for work on those) and what private ones hold (the storage meter).
24 "services": [
25 { "binding": "IDENTITY", "service": "g1t-identity" },
26 { "binding": "REPOS", "service": "g1t-repos" }
27 ],
Agents and memory, checks and conflicts, profiles, slug renames, custom domains28 // Events from the bus: a workspace renamed moves its billing to the
29 // new slug (src/rename.rs).
30 "queues": {
31 "consumers": [{ "queue": "g1t-events-billing", "max_batch_size": 20, "max_batch_timeout": 1 }]
32 },
Agents as a team: lifecycle, merge queue, billing and a new shell33 "vars": {
Prices are what g1t pays plus 20%, from the first second34 // What is added to a model run's cost, in percent: g1t's overhead for
35 // running and building it. The price book's markups are the same.
Integrations: your own model provider, alerts that open issues, tickets agents read36 "MARGIN_PERCENT": "20",
Free while g1t is being built out; agents can check out their own forks37 // While g1t is being built out, workspaces pay nothing: runs are
38 // recorded with what they cost, and nothing is charged. Set to
39 // "false" when pricing starts.
Billing accounts, terms and enterprises; g1t is no longer free40 // Off: workspaces are charged as their account's terms say. g1t's own
41 // (syntaqx) is comped in sudo.g1t.sh, not by this switch.
42 "FREE_WHILE_BUILDING": "false",
Usage limits: unpaid usage can only go so far43 // How far a workspace's unpaid usage may go before its work stops
44 // (see src/limits.rs): $3 before any live payment, then twice what
Billing accounts, terms and enterprises; g1t is no longer free45 // it has paid, between $25 and $1,000. Comped and custom terms are set
46 // per account in sudo.g1t.sh.
Usage limits: unpaid usage can only go so far47 "LIMIT_NEW_MICROS": "3000000",
48 "LIMIT_PAID_MIN_MICROS": "25000000",
49 "LIMIT_PAID_MAX_MICROS": "1000000000",
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put50 // Trial credit, so people can try g1t without a key or a card: each
51 // new workspace gets this much usage credit ($1), once, granted the
52 // first time it uses something, out of a pool for everyone ($40)
53 // that resets each calendar month (UTC). When a month's pool is
54 // given out, new trials wait for the next month. Either at 0 turns
55 // new trials off. See src/credits.rs.
A free allowance on g1t's models, so anyone can try its agents56 "TRIAL_WORKSPACE_MICROS": "1000000",
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put57 "TRIAL_MONTHLY_POOL_MICROS": "40000000",
58 // g1t's open-source pool: sandbox time and model cost for work on
59 // public repositories, up to $10 a month in all and $1 a month for
60 // any one repository. Past either, the workspace pays as usual.
61 "OSS_POOL_MICROS": "10000000",
62 "OSS_REPO_MICROS": "1000000",
63 // The Team plan: $20 a month per workspace, never per person, with
64 // $5 of usage credit a month (drawn first; it does not roll over),
65 // 50 GB of private storage and a year of audit log.
66 "TEAM_MONTHLY_CENTS": "2000",
67 "TEAM_INCLUDED_MICROS": "5000000",
68 "TEAM_PRIVATE_STORAGE_BYTES": "50000000000",
69 "TEAM_AUDIT_RETENTION_DAYS": "365",
70 // Without Team: 1 GB of private storage free (charged past it at
71 // cost plus the margin), and 30 days of audit log.
72 "FREE_PRIVATE_STORAGE_BYTES": "1000000000",
73 "AUDIT_RETENTION_DAYS": "30",
74 // No card is charged less than $5, so a payment's fee is never most
75 // of it: smaller amounts carry over to the next invoice.
76 "MIN_CHARGE_MICROS": "5000000",
Paid features: a workspace turns on Deployments with a monthly plan77 // The Deployments plan's monthly price, in cents. Turning the
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put78 // feature on starts it; FREE_WHILE_BUILDING does not cover it. It
79 // includes 200 build minutes a month (about $0.25 of it at cost).
Prices keep themselves current with what g1t pays80 "DEPLOYMENTS_MONTHLY_CENTS": "500",
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put81 "DEPLOYMENTS_BUILD_SECONDS": "12000",
Prices keep themselves current with what g1t pays82 // Where the keeper reads what g1t pays (src/keeper.rs). Its token,
83 // CLOUDFLARE_USAGE_TOKEN, is a secret: Billing, Account Analytics
84 // and AI Gateway, read only.
85 "CLOUDFLARE_ACCOUNT_ID": "1e6f2cffa3f445920836e8ebe446bb58",
86 "AI_GATEWAY_ID": "g1t"
Agents as a team: lifecycle, merge queue, billing and a new shell87 },
Prices keep themselves current with what g1t pays88 // Settling runs every 15 minutes; checking costs daily (keeper::DAILY).
89 "triggers": { "crons": ["*/15 * * * *", "17 4 * * *"] },
Agents as a team: lifecycle, merge queue, billing and a new shell90 // Secret: STRIPE_SECRET_KEY. Without it nothing is charged and the
91 // runner decides who may start agents some other way.
92 "observability": { "enabled": true }
93}