# List builds

URL: https://docs.hanzo.ai/docs/openapi/agent/get-agent-builds

> Returns the public index of every published build, most recently updated first, so a gallery can link straight to the story behind each product.

`GET /v1/agent/builds`

> [Agent →](https://docs.hanzo.ai/docs/openapi/agent) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/agent/builds` |
| **Method**    | `GET`                                  |
| **Operation** | `get_agent_builds`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Returns the public index of every published build, most recently
updated first, so a gallery can link straight to the story behind each product.
PUBLIC, no tenancy: publishing is the author's act, and only published root
sessions appear here.

## Request

1 field.

| Field   | In    | Type    | Required | Description          |
| ------- | ----- | ------- | -------- | -------------------- |
| `limit` | query | integer | —        | Limit caps the page. |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | agent.buildList | ok      |
| `default` | problem-details | refused |

`200` body — 11 fields.

| Field                | In   | Type                  | Always | Description                                                                                                                              |
| -------------------- | ---- | --------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `builds`             | body | agent.buildSummary\[] | —      | Builds is every published build, most recently updated first.                                                                            |
| `builds[].agent`     | body | string                | —      | Agent is the label the surface that did the work calls itself by.                                                                        |
| `builds[].endedAt`   | body | string                | —      | EndedAt is when it finished, same format.                                                                                                |
| `builds[].org`       | body | string                | —      | Org and Project are the build's public ADDRESS — the pair the full story is read at, and the pair a visitor sees in the URL bar.         |
| `builds[].project`   | body | string                | —      | Project is the product's slug, the second half of that address.                                                                          |
| `builds[].repo`      | body | string                | —      | Repo is the repository the work was done in, as the session reported it.                                                                 |
| `builds[].session`   | body | string                | —      | Session is the agent session behind the build, and the value its commits name in their `Hanzo-Session:` trailer.                         |
| `builds[].startedAt` | body | string                | —      | StartedAt is when the session opened, RFC 3339 in UTC.                                                                                   |
| `builds[].status`    | body | string                | —      | Status is the session's own: running, paused, done or error — so a card can show a build still being written.                            |
| `builds[].title`     | body | string                | —      | Title is the human line for the card.                                                                                                    |
| `builds[].turns`     | body | integer (int64)       | —      | Turns is HOW MANY turns the transcript holds — a COUNT, unlike the `turn` on each turn of the full story, which is that turn's position. |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo agent builds list
```

**SDK**

**.ts**

```ts
import { Configuration, AgentApi } from 'hanzoai';

const api = new AgentApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getAgentBuilds();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AgentApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AgentApi(client).get_agent_builds()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.AgentAPI.GetAgentBuilds(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, agent_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = agent_api::get_agent_builds(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AgentApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new AgentApi(client).getAgentBuilds();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/agent/builds \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **agent** through the `agent` tool, which names its 38 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_agents"
         }
       }
     }'
```

---

[Agent API](https://docs.hanzo.ai/docs/openapi/agent) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
