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.
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 1 | import type { User, Viewer } from "./identity"; |
| 2 | import type { Result } from "./result"; | |
| 3 | import type { Attempt } from "./work"; | |
| 4 | ||
| g1t agents: model menu and optional AI Gateway routing | 5 | /** A model a g1t agent can run on, as offered to the person starting it. */ |
| 6 | export type AgentModel = { | |
| 7 | /** Stable name used in requests, e.g. `balanced`. */ | |
| 8 | id: string; | |
| 9 | label: string; | |
| 10 | description: string; | |
| Show the model behind each choice; toolchains in the sandbox | 11 | /** The model behind it, by its public name, e.g. `Claude Sonnet 5.5`. */ |
| 12 | modelName: string; | |
| g1t agents: model menu and optional AI Gateway routing | 13 | }; |
| 14 | ||
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 15 | export type RunHostedInput = { |
| 16 | /** How many agents to race on the intent, each in its own sandbox. */ | |
| 17 | count: number; | |
| 18 | /** Extra guidance appended to the intent's brief for these runs. */ | |
| 19 | instructions?: string; | |
| g1t agents: model menu and optional AI Gateway routing | 20 | /** One of the offered model ids; the first offered when absent. */ |
| 21 | model?: string; | |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 22 | }; |
| 23 | ||
| 24 | /** Hosted agents: sandboxes on g1t that work on an intent. */ | |
| 25 | export interface RunnerApi { | |
| g1t agents: model menu and optional AI Gateway routing | 26 | /** The models this viewer may run g1t agents on; empty if they may not. */ |
| 27 | models(viewer: Viewer): Promise<AgentModel[]>; | |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 28 | /** |
| 29 | * Starts `count` attempts on the intent, each run by an agent in its own | |
| 30 | * sandbox. Returns as soon as the sandboxes are starting; progress shows | |
| 31 | * up in each attempt's session. | |
| 32 | */ | |
| 33 | run(actor: User, intentId: string, input: RunHostedInput): Promise<Result<Attempt[]>>; | |
| 34 | } |