> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.astropods.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.astropods.com/_mcp/server.

# List an agent's build history

GET https://astropods.com/api/v1/agents/{account}/{name}/builds

Every build attempt, newest first, from both registration paths: server-side GitHub builds and CLI pushes. A build's error is returned only to callers with blueprint:edit.

Reference: https://docs.astropods.com/api-reference/astropods-api/agents/list-an-agents-build-history

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `account` (string, required) — Account name
- `name` (string, required) — Agent name

### Query parameters

- `limit` (string, optional) — Maximum builds to return (default 50, max 200)

## Response

### 200

OK

- `builds` (list of AgentBuildResponse, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `code` (string, optional)
- `details` (string, optional)
- `error` (string, optional)

## Types

### AgentBuildResponse

- `branch` (string, optional)
- `build_id` (string, optional)
- `commit_message` (string, optional)
- `commit_sha` (string, optional)
- `completed_at` (string, optional)
- `error` (string, optional)
- `is_latest` (boolean, optional)
- `pushed_by` (string, optional)
- `pushed_by_handle` (string, optional)
- `repo_full_name` (string, optional)
- `source` (string, optional)
- `started_at` (string, optional)
- `status` (string, optional)
- `step` (string, optional)
- `vulnerabilities` (BuildVulnerabilitySummary, optional)
- `working_tree_dirty` (boolean, optional, nullable)

### BuildVulnerabilitySummary

- `critical` (integer, optional)
- `fixable` (integer, optional)
- `high` (integer, optional)
- `low` (integer, optional)
- `medium` (integer, optional)
- `status` (string, optional)
- `unknown` (integer, optional)

## Examples

**Response**

```json
{
  "builds": [
    {
      "branch": "string",
      "build_id": "string",
      "commit_message": "string",
      "commit_sha": "string",
      "completed_at": "string",
      "error": "string",
      "is_latest": true,
      "pushed_by": "string",
      "pushed_by_handle": "string",
      "repo_full_name": "string",
      "source": "string",
      "started_at": "string",
      "status": "string",
      "step": "string",
      "vulnerabilities": {
        "critical": 1,
        "fixable": 1,
        "high": 1,
        "low": 1,
        "medium": 1,
        "status": "string",
        "unknown": 1
      },
      "working_tree_dirty": true
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://astropods.com/api/v1/agents/account/name/builds"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://astropods.com/api/v1/agents/account/name/builds';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://astropods.com/api/v1/agents/account/name/builds"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://astropods.com/api/v1/agents/account/name/builds")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://astropods.com/api/v1/agents/account/name/builds")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://astropods.com/api/v1/agents/account/name/builds', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://astropods.com/api/v1/agents/account/name/builds");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://astropods.com/api/v1/agents/account/name/builds")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```