> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Start with /introduction/getting-started. Use the Direct Query API (POST /query) with the Newton Fusion model (text, image, and video reasoning) or the Newton Omega encoder (time-series embeddings). ATAI_API_ENDPOINT must include the version path: /v0.5 for most APIs, /v0.6 for the Fine-Tuning Service. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects.

# Get Bundle

> Retrieve a single bundle, optionally with its recent runs

<Callout icon="clock" color="#3064E3" iconType="solid">
  Requires [version 1.1.9](/release-notes/1.1.x#v1-1-9) or later of the Archetype platform.
</Callout>

## Overview

This endpoint returns one bundle by its `bnd_` id.

Set `include_latest_runs=true` to attach the bundle's most recent runs, so a bundle detail view can show run history without a second call to `/agents/instances`.

## Request

<ParamField path="bundle_id" type="string" required>
  Bundle `bnd_` id.
</ParamField>

<ParamField query="include_latest_runs" type="boolean" default="false">
  Include the bundle's most recent runs as `latest_runs`. Off by default — it costs an extra join per bundle.
</ParamField>

## Response

<ResponseField name="id" type="string" required>
  TypeID-encoded bundle identifier (`bnd_` prefix).
</ResponseField>

<ResponseField name="name" type="string" required>
  Human label for the bundle.
</ResponseField>

<ResponseField name="description" type="string" required>
  Human description of the bundle.
</ResponseField>

<ResponseField name="blueprint_id" type="string" required>
  The pinned blueprint's immutable `blp_` id. Resolve its key via the blueprint registry when needed.
</ResponseField>

<ResponseField name="values" type="object" required>
  User value overrides, layered over the blueprint defaults at run time.
</ResponseField>

<ResponseField name="status" type="string" required>
  Build lifecycle of the bundle: `building`, `ready`, or `failed`.
</ResponseField>

<ResponseField name="is_canonical" type="boolean" required>
  True for a canonical (platform-authored) bundle, visible to every org.
</ResponseField>

<ResponseField name="created_at" type="string" required>
  Creation timestamp (date-time).
</ResponseField>

<ResponseField name="org_id" type="string">
  Owning org; omitted for a canonical bundle.
</ResponseField>

<ResponseField name="model" type="string">
  Model override; omitted when the bundle uses the blueprint's default.
</ResponseField>

<ResponseField name="artifacts" type="object">
  Artifact links attached to the bundle.
</ResponseField>

<ResponseField name="latest_runs" type="array">
  The bundle's five most recent runs, newest first. Present only when the read asked for it via `include_latest_runs=true`; an empty array means the bundle has never been run. Runs are scoped to the caller's org, so a canonical bundle shows only the caller's own runs of it.
</ResponseField>

### Run summary object (`latest_runs[]`)

<ResponseField name="id" type="string" required>
  TypeID-encoded agent identifier (`agt_` prefix).
</ResponseField>

<ResponseField name="status" type="string" required>
  Agent lifecycle status: `running`, `paused`, `completed`, `failed`, or `canceled`.
</ResponseField>

<ResponseField name="created_at" type="string" required>
  Creation timestamp (date-time).
</ResponseField>

<ResponseField name="started_at" type="string">
  When the run started; `null` before then.
</ResponseField>

<ResponseField name="completed_at" type="string">
  When the run finished; `null` while unfinished.
</ResponseField>

<ResponseField name="job_id" type="string">
  External executor's job id for this run (a JOS `job_` id). Present once the run has been dispatched.
</ResponseField>

<ResponseField name="error" type="string">
  Failure detail; `null` unless the run failed.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl "$ATAI_API_URL/agents/bundles/bnd_01jc9pd42kzq7v8n3h5m6rtx0w" \
    -H "Authorization: Bearer $ATAI_API_KEY"
  ```

  ```bash cURL - With Run History theme={"system"}
  curl "$ATAI_API_URL/agents/bundles/bnd_01jc9pd42kzq7v8n3h5m6rtx0w?include_latest_runs=true" \
    -H "Authorization: Bearer $ATAI_API_KEY"
  ```

  ```python Python theme={"system"}
  import os
  import requests

  base_url = os.environ["ATAI_API_URL"]
  api_key = os.environ["ATAI_API_KEY"]

  response = requests.get(
      f"{base_url}/agents/bundles/bnd_01jc9pd42kzq7v8n3h5m6rtx0w",
      headers={"Authorization": f"Bearer {api_key}"},
      params={"include_latest_runs": "true"},
  )

  if response.status_code == 200:
      bundle = response.json()
      print(f"{bundle['name']} pins {bundle['blueprint_id']} (status {bundle['status']})")
      for run in bundle.get("latest_runs") or []:
          print(f"  {run['id']}: {run['status']}")
  else:
      print(f"Error: {response.json()['errors']}")
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch(
    `${process.env.ATAI_API_URL}/agents/bundles/bnd_01jc9pd42kzq7v8n3h5m6rtx0w?include_latest_runs=true`,
    {
      headers: {
        'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
      }
    }
  );

  const body = await response.json();

  if (response.ok) {
    console.log(`${body.name} pins ${body.blueprint_id} (status ${body.status})`);
    (body.latest_runs ?? []).forEach(run => console.log(`  ${run.id}: ${run.status}`));
  } else {
    console.error('Error:', body.errors);
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={"system"}
  {
    "id": "bnd_01jc9pd42kzq7v8n3h5m6rtx0w",
    "org_id": "org_01jc8m5r2vq9xt4bn7h3kdzs6w",
    "name": "Pump A monitor",
    "description": "Open-set monitor tuned for pump A telemetry.",
    "blueprint_id": "blp_01jc9n7k3xf8mbq2v5t0ary6de",
    "model": null,
    "values": {},
    "artifacts": {
      "calibration": "s3://.../knn_index"
    },
    "status": "ready",
    "is_canonical": false,
    "created_at": "2026-08-11T15:02:19Z",
    "latest_runs": [
      {
        "id": "agt_01jc9q8v5nm3ry7t2bkz4dhs6f",
        "status": "running",
        "job_id": "job_01jc9q9k4t8v2mnr5xh7bdzy3s",
        "created_at": "2026-08-11T15:10:00Z",
        "started_at": "2026-08-11T15:10:04Z",
        "completed_at": null,
        "error": null
      }
    ]
  }
  ```

  ```json 404 - Bundle not found theme={"system"}
  {
    "errors": [
      {
        "code": "<error_code>",
        "message": "Bundle not found.",
        "suggestion": null,
        "error_uid": "err-xxxxxxxx"
      }
    ]
  }
  ```
</ResponseExample>

## Important Notes

<Note>
  * Without `include_latest_runs=true`, `latest_runs` is absent — an empty array means the bundle has never been run.
  * A run's name is always its bundle's name, so it is not repeated in `latest_runs`. Fetch the full run (connectors, blueprint reference) from `GET /agents/instances/{agent_id}`.
</Note>
