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.
| Pricing says it plainly: models at the provider's price, the agent rate for what g1t runs around every model call (the gateway, secrets, routing, context and pass-through to your own provider, so your own keys too), everything else at cost plus 20%, your own runners free, no seats; Security and quality comes with the plan with no separate fee, and live activations end. Each agent has an effort setting, Auto to Max, with what a typical task has cost at each level, and Spend's Spend less, keep quality suggests a lower level only when the agent's own past work shows quality held, to apply or dismiss. The pricing, spend and agents guides say how. | 1 | -- Effort and recommendations (docs.g1t.sh/guides/spend/). |
| 2 | -- | |
| 3 | -- An agent's effort setting lives in its routing JSON (`effort`: auto, | |
| 4 | -- low, medium, high or max), so it is versioned with the rest of the | |
| 5 | -- definition and needs no column. What is recorded here is the level each | |
| 6 | -- piece of work actually ran at, so what a level costs and how often its | |
| 7 | -- work is accepted can be measured from real history. | |
| 8 | ||
| 9 | -- The level a session ran at: low, medium, high or max. When Auto raises | |
| 10 | -- it partway (someone steered it), the highest. Null before this. | |
| 11 | ALTER TABLE agent_sessions ADD COLUMN effort TEXT; | |
| 12 | -- The tier its last step ran on, for the record. | |
| 13 | ALTER TABLE agent_sessions ADD COLUMN tier TEXT; | |
| 14 | -- The level a chat reply ran at. | |
| 15 | ALTER TABLE agent_replies ADD COLUMN effort TEXT; | |
| 16 | ||
| 17 | CREATE INDEX IF NOT EXISTS agent_sessions_finished ON agent_sessions (workspace_id, agent_id, finished_at); | |
| 18 | ||
| 19 | -- Ways to spend less, from the weekly check (src/recommend.ts). One row per | |
| 20 | -- agent and suggestion; a check refreshes an open or thin one in place, and | |
| 21 | -- never reopens one that was applied or dismissed until the agent's | |
| 22 | -- setting changes. status: open, thin (too little history to say), | |
| 23 | -- applied, dismissed, stale (the setting changed under it). | |
| 24 | CREATE TABLE agent_recommendations ( | |
| 25 | id TEXT PRIMARY KEY, | |
| 26 | workspace_id TEXT NOT NULL, | |
| 27 | agent_id TEXT NOT NULL, | |
| 28 | kind TEXT NOT NULL, | |
| 29 | status TEXT NOT NULL, | |
| 30 | from_effort TEXT NOT NULL, | |
| 31 | to_effort TEXT NOT NULL, | |
| 32 | title TEXT NOT NULL, | |
| 33 | reason TEXT NOT NULL, | |
| 34 | -- JSON: the window and both sides' counts, acceptance and costs. | |
| 35 | evidence TEXT NOT NULL, | |
| 36 | saving_month_micros INTEGER, | |
| 37 | checked_at TEXT NOT NULL, | |
| 38 | resolved_by TEXT, | |
| 39 | resolved_at TEXT, | |
| 40 | created_at TEXT NOT NULL | |
| 41 | ); | |
| 42 | CREATE UNIQUE INDEX agent_recommendations_one ON agent_recommendations (agent_id, kind, from_effort, to_effort); | |
| 43 | CREATE INDEX agent_recommendations_workspace ON agent_recommendations (workspace_id, status); | |
| 44 | ||
| 45 | -- When the check last ran for each workspace, so the page can say so and | |
| 46 | -- the daily run checks each workspace once a week. | |
| 47 | CREATE TABLE agent_recommendation_checks ( | |
| 48 | workspace_id TEXT PRIMARY KEY, | |
| 49 | checked_at TEXT NOT NULL | |
| 50 | ); |