# Get builds

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

> Returns the readable build of one product: the agent session that produced it, turn by turn — the prompts, the reasoning, the commits each turn produced — plus the exact `git log` that re-derives every commit binding from git itself, so nothing here has to be taken on trust.

`GET /v1/agent/builds/{org}/{project}`

> [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/{org}/{project}` |
| **Method**    | `GET`                                                  |
| **Operation** | `get_agent_builds_by_org_by_project`                   |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                 |

Returns the readable build of one product: the agent session that
produced it, turn by turn — the prompts, the reasoning, the commits each turn
produced — plus the exact `git log` that re-derives every commit binding from
git itself, so nothing here has to be taken on trust.

PUBLIC, no tenancy: it answers only for a session its author explicitly
published, which is what makes it safe to be anonymous. An unpublished session
is invisible here no matter who asks; its owner reads it through the org-scoped
/v1/agent/sessions routes, which need a validated principal.

## Request

2 fields.

| Field     | In   | Type   | Required | Description                                             |
| --------- | ---- | ------ | -------- | ------------------------------------------------------- |
| `org`     | path | string | yes      | Org is the org that published the build, from the path. |
| `project` | path | string | yes      | Project is the product's slug, from the path.           |

## Response

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

`200` body — 19 fields.

| Field             | In   | Type               | Always | Description                                                                                                                                                                                |
| ----------------- | ---- | ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `agent`           | body | string             | —      | Agent is the label the surface that did the work calls itself by.                                                                                                                          |
| `endedAt`         | body | string             | —      | EndedAt is when it finished, same format.                                                                                                                                                  |
| `model`           | body | string             | —      | Model is the model that did the work, taken from the FIRST turn whose body names one — a transcript states it, this route does not resolve it.                                             |
| `org`             | body | string             | —      | Org is the org that published this build, echoed from the URL.                                                                                                                             |
| `project`         | body | string             | —      | Project is the product's slug, the other half of that address.                                                                                                                             |
| `repo`            | body | string             | —      | Repo is the repository the work was done in, as the session reported it.                                                                                                                   |
| `session`         | body | string             | —      | Session is the id of the agent session this story IS — the same value a produced commit carries in its `Hanzo-Session:` trailer, which is what ties the repository's history to this page. |
| `startedAt`       | body | string             | —      | StartedAt is when the session opened, RFC 3339 in UTC.                                                                                                                                     |
| `status`          | body | string             | —      | Status is the session's own: running, paused, done or error.                                                                                                                               |
| `title`           | body | string             | —      | Title is the human line the session was opened or renamed with.                                                                                                                            |
| `turns`           | body | agent.buildTurn\[] | —      | Turns is the whole transcript, oldest first, capped at 1000: a published build is a story to read down, not an archive to page.                                                            |
| `turns[].actor`   | body | string             | —      | Actor is who took the turn.                                                                                                                                                                |
| `turns[].at`      | body | string             | —      | At is when the turn was recorded, RFC 3339 in UTC to the second.                                                                                                                           |
| `turns[].body`    | body | string             | —      | Body is the readable text of the turn, taken from the stored event's `text`.                                                                                                               |
| `turns[].commit`  | body | string             | —      | Commit is the full sha this turn produced, empty when the turn changed nothing.                                                                                                            |
| `turns[].kind`    | body | string             | —      | Kind is what the turn was, from the log's closed six: message, tool-call, spawn, log, status, control.                                                                                     |
| `turns[].subject` | body | string             | —      | Subject is that commit's subject line, from the same transcript, so a reader sees what the commit says without fetching the repository.                                                    |
| `turns[].turn`    | body | integer (int64)    | —      | Seq is this turn's POSITION in the session's log — monotonic from 1, per session — and it is what a commit's `Hanzo-Turn:` trailer names.                                                  |
| `verify`          | body | string             | —      | Verify is the exact command that re-derives every commit binding below straight from git, so nothing here has to be taken on trust.                                                        |

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

## Examples

**CLI**

```bash
hanzo agent builds org get <org> <project>
```

**SDK**

**.ts**

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

const api = new AgentApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getAgentBuildsByOrgByProject({ org: 'org', project: 'project' });
```

**.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_by_org_by_project(org='org', project='project')
```

**.go**

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

resp, _, err := client.AgentAPI.GetAgentBuildsByOrgByProject(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_by_org_by_project(&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).getAgentBuildsByOrgByProject();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/agent/builds/<org>/<project> \
  -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)
