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

# Agent Overview

> Understanding the Chamber Kubernetes agent

The Chamber agent is a lightweight Kubernetes controller that connects your GPU clusters to Chamber.

## What the Agent Does

The agent runs in your Kubernetes cluster and:

<CardGroup cols={2}>
  <Card title="Reports Capacity" icon="server">
    Discovers GPU nodes and reports capacity to Chamber
  </Card>

  <Card title="Manages Workloads" icon="rotate">
    Creates and monitors GPU workloads on your cluster
  </Card>

  <Card title="Collects Metrics" icon="chart-line">
    Gathers GPU utilization for dashboards
  </Card>

  <Card title="Handles Scheduling" icon="gavel">
    Implements scheduling decisions from Chamber
  </Card>
</CardGroup>

## Architecture

```mermaid theme={null}
flowchart LR
    subgraph cluster["Your Kubernetes Cluster"]
        Agent["Chamber Agent"]
        GPU1["GPU Nodes"]
    end

    Agent -->|Secure connection\n outbound only| Chamber["Chamber"]
    Agent --> GPU1
```

The agent maintains a secure connection to Chamber and executes scheduling decisions locally.

## Resilience

<Info>
  **Workloads continue running even if Chamber is temporarily unavailable.** The agent operates independently once workloads are scheduled. If the connection is lost, running workloads are unaffected and the agent automatically reconnects.
</Info>

## Communication

### Outbound Only

The agent only makes **outbound** connections:

* No inbound ports required
* Works behind corporate firewalls
* Encrypted with TLS

### Network Requirements

| Host              | Port | Purpose               |
| ----------------- | ---- | --------------------- |
| `*.usechamber.io` | 443  | Chamber communication |

## Resource Requirements

| Resource | Requirement                |
| -------- | -------------------------- |
| CPU      | 100m request, 200m limit   |
| Memory   | 128Mi request, 256Mi limit |

<Tip>
  The agent has a minimal footprint. These defaults work for most clusters.
</Tip>

## Security

### Permissions

The agent requires these Kubernetes permissions:

```yaml theme={null}
rules:
  # Core resources - read cluster state
  - apiGroups: [""]
    resources: ["nodes", "pods", "namespaces", "events"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["services", "endpoints"]  # DCGM-Exporter discovery
    verbs: ["get", "list"]

  # Workload management
  - apiGroups: ["batch"]
    resources: ["jobs"]
    verbs: ["create", "delete", "get", "list", "watch"]

  # Metrics
  - apiGroups: ["metrics.k8s.io"]
    resources: ["pods", "nodes"]
    verbs: ["get", "list"]

  - apiGroups: ["scheduling.run.ai"]
    resources: ["queues", "podgroups"]
    verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
```

<Note>
  The agent does **not** require cluster-admin. Permissions are scoped to GPU workload management.
</Note>

### Data Sent to Chamber

| Data                                          | Purpose                  |
| --------------------------------------------- | ------------------------ |
| Node inventory (GPU count, type)              | Capacity tracking        |
| Workload metadata (name, status, GPU request) | Workload management      |
| GPU utilization metrics                       | Dashboards and reporting |

The agent does **not** send container logs, environment variables, or secrets.

## Next Steps

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/agent/installation">
    Install the agent via Helm
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/agent/troubleshooting">
    Common issues and solutions
  </Card>

  <Card title="Deploy a Cluster" icon="cloud" href="/cluster-deployment/overview">
    Deploy a full GPU cluster with Terraform
  </Card>
</CardGroup>
