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

# AI Workspaces

> The staging cluster where Ankra's AI runs short-lived workloads - workspaces, agent runs, and PR demos - and the time-to-live rules that clean them up.

AI workspaces are short-lived workloads Ankra's AI runs for you: code-search workspaces, agent and subagent pods, and time-limited PR demos of your applications. They all run on a **staging cluster** you designate, never on your production clusters. Configure everything under **AI** → **Settings** → **Workspaces**.

## Staging Cluster

Pick one of your connected clusters as the staging cluster. Its agent must be online for workspaces to start - the page shows the agent status for the saved cluster.

The same card sets the **default AI mode** new integrations start in (for example **Ask**, which allows read-only operations plus low-risk creates) - individual Slack, Teams, and Git connections can override it.

## Preview Domain

PR demos can get a public URL. Point a wildcard DNS zone at the staging cluster's ingress, then set the preview domain, ingress class, and TLS secret here. Without a preview domain, demos stay in-cluster only.

See [PR preview environments](/guides/pr-preview-environments) for the full flow from pull request to running demo.

## Time-to-Live

Workspaces clean themselves up:

* **Workspace TTL** - how long code-search and agent workspaces live.
* **Demo TTL** - the default lifetime of a PR demo.
* **Per-role caps** - the longest a member of each role (admins and owners, operators, members) can keep a demo running.

## Active Workspaces

The bottom of the page lists every running workspace and PR demo with its cluster, namespace, and expiry. Admins can terminate any of them; the workspace's namespace on the staging cluster is deleted shortly after.

## Permissions

Changing the staging cluster, preview domain, or TTLs requires organisation **admin**. All members can see the active workspace list.
