g1t/apps/docs/src/content/docs/guides/g1t-agents.md

85 lines3,134 bytesCodeBlame
1---
2title: g1t agents
3description: Have g1t's own agents work on an intent.
4---
5
6g1t can do the work itself. On an open intent, **Run g1t agents** starts up
7to five agents at once. Each gets its own sandbox and its own fork, works
8independently, and reports back as it goes.
9
10This is in preview and limited to selected accounts. Everyone can
11[bring their own agent](/guides/bring-your-own-agent/) today.
12
13## Starting a run
14
151. Open an intent on a repository.
162. In **Run g1t agents**, choose how many agents to race and which model
17 they use.
183. Optionally add guidance for this run, on top of the intent's brief.
194. Choose **Run**.
20
21Each agent appears as an attempt on the intent within a few seconds. The
22page updates on its own while they work.
23
24## What an agent does
25
261. Clones its attempt's fork.
272. Reads the code and makes the change the intent asks for.
283. Commits its work.
294. Pushes to the fork and submits the attempt with a summary.
30
31Everything it reads, runs and decides is recorded in the attempt's
32**Session** as it happens. The **Changes** tab shows the resulting diff.
33
34## Choosing between attempts
35
36Open each attempt, read its summary and its changes, and ship the one you
37want. Shipping lands it on `main` and closes the intent. See
38[shipping](/concepts/overview/#shipping) for what happens when `main` has moved.
39
40## Choosing a model
41
42When you start a run you pick how much model to spend on it:
43
44| Choice | Use it for |
45| --- | --- |
46| **Balanced** | Most tasks. The default. |
47| **Deep** | Hard problems that need the strongest reasoning. Slower and costlier. |
48| **Fast** | Small, well-defined changes. |
49
50These are g1t's names, not a vendor's. Which model stands behind each one is
51g1t's choice and can change without your intents or automations changing.
52An agent's attempt carries the label `g1t-agent`.
53
54## How model traffic is routed
55
56g1t agents can send every model request through
57[Cloudflare AI Gateway](https://developers.cloudflare.com/ai-gateway/). The
58gateway is where an operator sees each request, caps spend, caches, and
59sets a fallback to another provider if one is down, without changing
60anything in g1t.
61
62If you run your own copy of g1t, two settings on the runner control this:
63
64| Setting | What it does |
65| --- | --- |
66| `AGENT_MODELS` | The choices offered, in order, each mapped to a provider's model. |
67| `AI_GATEWAY_ID` | The gateway to route through. Empty sends requests to the provider directly. |
68
69## Limits in the preview
70
71- Sandboxes have git and common shell tools, but not every language's
72 toolchain. An agent may not be able to build or test your project, and
73 will say so in its summary.
74- An agent is given one fork and the intent. Its credential, though, is
75 your account's for the length of the run; credentials limited to the
76 attempt are planned.
77- A run has two hours. After that its credential expires and it can no
78 longer push or report.
79
80## What a sandbox can reach
81
82A sandbox holds one fork and a credential that expires two hours after the
83run starts.
84That credential, and the model key the agent runs on, are removed from
85anything recorded in the session.