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

# Agent

> TypeScript SDK reference for the Agent resource

## uploadAgentFiles

`POST /v1/sessions/{sessionId}/agent/files` — Upload Agent Resources

```typescript theme={null}
import { client, Agent } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Agent.uploadAgentFiles({
  path: {
    sessionId: 'your-sessionId'
  },
  body: {
    file: new File(['file content'], 'file.txt')
  }
});
console.log(result);
```

## listAgentFiles

`GET /v1/sessions/{sessionId}/agent/files` — List Agent Resources

```typescript theme={null}
import { client, Agent } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Agent.listAgentFiles({
  path: {
    sessionId: 'your-sessionId'
  }
});
console.log(result);
```

## pauseAgent

`POST /v1/sessions/{session_id}/agent/pause` — Pause Agent

```typescript theme={null}
import { client, Agent } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Agent.pauseAgent({
  path: {
    session_id: 'your-session-id'
  }
});
console.log(result);
```

## resumeAgent

`POST /v1/sessions/{session_id}/agent/resume` — Resume Agent

```typescript theme={null}
import { client, Agent } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Agent.resumeAgent({
  path: {
    session_id: 'your-session-id'
  }
});
console.log(result);
```

## listPendingInterventions

`GET /v1/sessions/pending-interventions` — List Pending Human Interventions

```typescript theme={null}
import { client, Agent } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Agent.listPendingInterventions();
console.log(result);
```

## getRequestedHumanIntervention

`GET /v1/sessions/{session_id}/agent/requested-human-intervention` — Get Requested Human Interventions

```typescript theme={null}
import { client, Agent } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Agent.getRequestedHumanIntervention({
  path: {
    session_id: 'your-session-id'
  }
});
console.log(result);
```

## respondToHumanIntervention

`POST /v1/sessions/{session_id}/agent/respond-to-human-intervention` — Respond to Human Intervention

```typescript theme={null}
import { client, Agent } from 'anchorbrowser';

// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });

const result = await Agent.respondToHumanIntervention({
  path: {
    session_id: 'your-session-id'
  },
  body: {
    response: 'string'
  }
});
console.log(result);
```
