---
title: "List Environments"
method: GET
path: "/agents/{namespace_slug}/{agent_name}/environments"
tags: ["Environments"]
---

# List Environments

`GET /agents/{namespace_slug}/{agent_name}/environments`

List all environments for an agent.

    Environments define deployment targets (e.g., production, staging, preview).

## Path parameters

- `namespace_slug` string, required
- `agent_name` string, required

## Response `200`

Successful Response

- EnvListResponse — Response for listing environments.
  - `environments` EnvResponse[], required — List of environments
    - `agent_id` string, required — Parent agent ID
    - `branch_rules` string[], required — Branch patterns for matching (e.g., ['main'], ['feature/*'])
    - `created_at` string, date-time, nullable — Creation timestamp
    - `id` string, required — Unique identifier
    - `is_prod` boolean, required — Whether this is the production environment (protected)
    - `name` string, required — Environment name (e.g., 'production', 'staging')
    - `updated_at` string, date-time, nullable — Last update timestamp
  - `total` integer, required — Total count

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/terminaluse/apis/sb0-api.md) · [All operations](https://skmtc.net/terminaluse/apis/sb0-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/terminaluse/sb0-api/versions/f24a474dc415/schema)
