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

# Overview

> Run AI agents in fully managed cloud sandboxes.

Qoder Cloud Agents is a fully managed runtime for AI agents. You don't have to build your own agent loop, manage tool execution sandboxes, or handle long-lived connections. Define an Agent and start a Session via API, and complex tasks run in the cloud while results stream back in real time.

<Card title="Open the Cloud Agents console" icon="arrow-up-right-from-square" href="https://qoder.com/cloud/agents" horizontal>
  Manage Agents, Environments, and Sessions in the browser.
</Card>

## Core concepts

| Concept         | Description                                                                           | Analogy                   |
| --------------- | ------------------------------------------------------------------------------------- | ------------------------- |
| **Agent**       | A reusable configuration template that defines the model, system prompt, and tool set | "Job description"         |
| **Environment** | The container runtime for a Session, including network and dependency configuration   | "Desk and toolbox"        |
| **Session**     | A concrete instance of a conversation or task execution                               | "A specific work session" |
| **Event**       | The real-time event stream produced by a Session                                      | "Live progress feed"      |

## Workflow

<Steps>
  <Step title="Define an Agent">
    Specify the model, system prompt, and available tools.
  </Step>

  <Step title="Configure an Environment">
    Choose the container type, networking policy, and preinstalled dependencies. New accounts do not have a pre-provisioned default environment — you must first `POST /api/v1/cloud/environments` to create one.
  </Step>

  <Step title="Start a Session">
    Bind an Agent and Environment to create a runtime instance.
  </Step>

  <Step title="Send message + Stream events">
    Send a `user.message` to the Session and stream the Agent's thinking, messages, and status changes over SSE (or fetch them via polling).
  </Step>
</Steps>

## Verify connectivity

```bash theme={null}
# Verify the PAT and list all Agents
curl -s https://api.qoder.com/api/v1/cloud/agents \
  -H "Authorization: Bearer $QODER_PAT"
```

A successful response looks like:

```json theme={null}
{
  "data": [],
  "first_id": null,
  "last_id": null,
  "has_more": false
}
```

## When to use Cloud Agents

* **Long-running asynchronous tasks** — code review, large refactors, automated test generation.
* **API integration** — embed agent capabilities in backend services without maintaining a runtime.
* **Batch processing** — fan out parallel Sessions to handle bulk requests.
* **Scheduled jobs** — combine with a scheduler to run periodic inspections or reports.

## Authentication

Every API request must include the following header:

| Header          | Value          | Description           |
| --------------- | -------------- | --------------------- |
| `Authorization` | `Bearer <PAT>` | Personal access token |

<Note>
  Create your PAT under "Settings → Personal Access Tokens" in the Qoder console. Treat it as a secret and do not commit it to source control.
</Note>

## Pagination

List endpoints use cursor-based pagination with this response shape:

```json theme={null}
{
  "data": [...],
  "first_id": "agent_019e451902fe7a2ca42c2dfc62d9320e",
  "last_id": "agent_019e45369b3379e18bfaf59b3aad2fc9",
  "has_more": true
}
```

Use the `after_id` and `before_id` query parameters to page through results.

## FAQ

**Q: Can I use Cloud Agents and the Qoder CLI at the same time?**

A: Yes. The CLI is best for local interactive development; Cloud Agents is best for automation and integration. They complement each other.

**Q: How many Sessions can a single Agent run concurrently?**

A: There is no hard limit. The same Agent configuration can back many active Sessions simultaneously.

**Q: How is data secured?**

A: Each Session runs in an isolated container sandbox; Sessions cannot reach one another. Data is wiped when the environment is destroyed.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/cloud-agents/quickstart">
    Get your first Cloud Agent running in five steps.
  </Card>

  <Card title="Cloud Agents console" icon="browser" href="https://qoder.com/cloud/agents">
    Manage Agents, Environments, and Sessions from the web UI.
  </Card>

  <Card title="Agent setup" icon="user-gear" href="/cloud-agents/define-agent">
    Dive deeper into Agent configuration.
  </Card>

  <Card title="Cloud environment setup" icon="server" href="/cloud-agents/environments">
    Configure the runtime environment.
  </Card>

  <Card title="Start a session" icon="play" href="/cloud-agents/sessions">
    Manage Session lifecycle.
  </Card>
</CardGroup>
