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

# Examples

> Copy-ready examples for calling Roe with the TypeScript SDK.

## SDK operations

Copy-ready calls for each operation available through this SDK. Required and
optional inputs are shown inline in the code.

### Agents

#### `agents_list`

List agents or create a new agent.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.list(
  {
    page: 1, // optional
    pageSize: 1, // optional
  }
);
```

#### `agents_create`

Create a new base agent.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.create(
  {
    name: "name", // required
    engineClassId: "engineClassId", // required
    inputDefinitions: [{ key: "text", data_type: "text/plain" }], // optional
    engineConfig: { model: "gpt-5.5-2026-04-23" }, // optional
    versionName: "versionName", // optional
    description: "description", // optional
  }
);
```

#### `agents_jobs_results_create`

Get results for multiple agent jobs

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.retrieveResultMany(["job_id"]);
```

#### `agents_jobs_statuses_create`

Get status for multiple agent jobs

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.retrieveStatusMany(["job_id"]);
```

#### `agents_jobs_artifacts_result_retrieve`

Get tool result artifact (result only)

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.retrieveArtifact(
  "jobId",
  "artifactKey",
);
```

#### `agents_jobs_references_retrieve`

Serve a reference file associated with an agent job.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const content = await client.agents.jobs.downloadReference(
  "job_id",
  "resource_id",
  false,
);
```

#### `agents_jobs_result_retrieve`

Get agent job result data.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.retrieveResult("jobId");
```

#### `agents_jobs_cancel_create`

Cancel an agent job

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.cancel("jobId");
```

#### `agents_jobs_delete_data_create`

Delete agent job data

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.deleteData("jobId");
```

#### `agents_jobs_status_retrieve`

Get agent job status.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.retrieveStatus("jobId");
```

#### `agents_run`

Run agent synchronously

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.runSync(
  "agent_id",
  { text: "text" },
  {},
);
```

#### `agents_run_async_create`

Run agent asynchronously.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const job = await client.agents.run({
  agentId: "agent_id",
  inputs: { text: "text" },
  timeoutSeconds: 300,
  metadata: {},
});
```

#### `agents_run_async_many`

Run agent asynchronously with multiple inputs

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const batch = await client.agents.runMany({
  agentId: "agent_id",
  batchInputs: [{ text: "text" }],
  timeoutSeconds: 300,
});
```

#### `agents_run_version`

Run agent version synchronously

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.runVersionSync(
  "agent_id",
  "version_id",
  { text: "text" },
  {},
);
```

#### `agents_run_versions_async_create`

Run agent version asynchronously.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const job = await client.agents.runVersion({
  agentId: "agent_id",
  versionId: "version_id",
  inputs: { text: "text" },
  timeoutSeconds: 300,
  metadata: {},
});
```

#### `agents_destroy`

Delete a base agent.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.delete("agentId");
```

#### `agents_retrieve`

Retrieve an agent.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.retrieve("agentId");
```

#### `agents_partial_update`

Partially update an agent.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.update(
  "agentId",
  {
    name: "name", // optional
    disableCache: true, // optional
    cacheFailedJobs: true, // optional
  }
);
```

#### `agents_update`

Update a base agent.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.replace(
  "agentId",
  {
    name: "name", // optional
    disableCache: true, // optional
    cacheFailedJobs: true, // optional
  }
);
```

#### `agents_duplicate_create`

Duplicate an agent.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.duplicate("agentId");
```

#### `agents_jobs_list`

List agent jobs or create a new agent job.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.list(
  {
    agentId: "agentId", // required
    page: 1, // optional
    pageSize: 1, // optional
    statusCode: "statusCode", // optional
    versionName: "versionName", // optional
    metadata: "metadata", // optional
    createdFrom: "createdFrom", // optional
    createdTo: "createdTo", // optional
    search: "search", // optional
    ordering: "ordering", // optional
  }
);
```

#### `agents_jobs_cancel_all_create`

Cancel all running agent jobs (:cancelAll)

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.jobs.cancelAll("agentId");
```

#### `agents_versions_list`

List agent versions.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.versions.list("agentId");
```

#### `agents_versions_create`

Create a new agent version.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.versions.create(
  {
    agentId: "agentId", // required
    inputDefinitions: [{ key: "text", data_type: "text/plain" }], // optional
    engineConfig: { model: "gpt-5.5-2026-04-23" }, // optional
    versionName: "versionName", // optional
    description: "description", // optional
  }
);
```

#### `agents_versions_current_retrieve`

Retrieve the current version of an agent.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.versions.retrieveCurrent("agentId");
```

#### `agents_versions_destroy`

Delete an agent version.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.versions.delete(
  "agentId",
  "versionId",
);
```

#### `agents_versions_retrieve`

Retrieve an agent version.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.versions.retrieve(
  "agentId",
  "versionId",
  true,
);
```

#### `agents_versions_partial_update`

Partially update an agent version.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.versions.update(
  "agentId",
  "versionId",
  {
    versionName: "versionName", // optional
    description: "description", // optional
  }
);
```

#### `agents_versions_update`

Update an agent version.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.agents.versions.replace(
  "agentId",
  "versionId",
  {
    versionName: "versionName", // optional
    description: "description", // optional
  }
);
```

### Connections

#### `connections_list`

List/create connections.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connections.list(
  {
    connectorType: "connectorType", // optional
    search: "search", // optional
    page: 1, // optional
    pageSize: 1, // optional
  }
);
```

#### `connections_create`

List/create connections.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connections.create(
  {
    connectorType: "connectorType", // required
    name: "name", // required
    config: {}, // required
    description: "description", // optional
    authConfig: {}, // optional
  }
);
```

#### `connections_test_credentials_create`

Test credentials without storing them.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connections.testCredentials(
  {
    connectorType: "connectorType", // required
    config: {}, // required
    authConfig: {}, // optional
  }
);
```

#### `connections_destroy`

Manage connection.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connections.delete("connectionId");
```

#### `connections_retrieve`

Manage connection.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connections.retrieve("connectionId");
```

#### `connections_partial_update`

Manage connection.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connections.update(
  "connectionId",
  {
    name: "name", // optional
    description: "description", // optional
    config: {}, // optional
    authConfig: {}, // optional
  }
);
```

#### `connections_update`

Manage connection.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connections.replace(
  "connectionId",
  {
    name: "name", // optional
    description: "description", // optional
    config: {}, // optional
    authConfig: {}, // optional
  }
);
```

#### `connections_test_create`

Test connection.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connections.test("connectionId");
```

### Connectors

#### `connectors_retrieve`

List all connector types.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connectors.list();
```

#### `connectors_retrieve_by_type`

Get connector details.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.connectors.retrieve("connectorType");
```

### Discovery

#### `discovery_supported_models_list`

List supported model IDs

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.discovery.listSupportedModels("capability");
```

#### `discovery_agent_engine_types_list`

List supported agent engine types

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.discovery.listAgentEngineTypes();
```

### Knowledge Base

#### `knowledge_base_list`

List all KBs for the org, or start a new draft.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.list({
  page: 1, // optional
  pageSize: 10, // optional
});
```

#### `knowledge_base_create`

List all KBs for the org, or start a new draft.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.create({
  company: "company",
  brief: "brief",
});
```

#### `knowledge_base_catalog_retrieve`

Names-only typology+tactic catalog.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.catalog();
```

#### `knowledge_base_import_lens_create`

Import a finalized Atlas lens into roe-main by its atlas\_lens\_id.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.importLens("atlas_lens_id");
```

#### `knowledge_base_lens_retrieve`

Fetch a lens directly from Atlas by its atlas\_lens\_id and return the
names-only projection.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.lensByAtlasId("atlas_lens_id");
```

#### `knowledge_base_destroy`

Get or delete a single KB.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

await client.knowledge_base.delete("knowledge_base_id");
```

#### `knowledge_base_retrieve`

Get or delete a single KB.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.retrieve("knowledge_base_id");
```

#### `knowledge_base_draft_retrieve`

Poll the atlas draft.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.pollDraft("knowledge_base_id");
```

#### `knowledge_base_finalize_create`

Commit the agreed selection into a lens and mark the KB active.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.finalize("knowledge_base_id");
```

#### `knowledge_base_regenerate_create`

Kick off another async generation round with feedback.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.regenerate("knowledge_base_id");
```

#### `knowledge_base_resolve_create`

Approve or decline a pending regeneration proposal.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.resolve("knowledge_base_id");
```

#### `knowledge_base_selection_partial_update`

Persist hand-edits to the working selection (typology + tactic opt-in/out).

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.patchSelection("knowledge_base_id", {
  refs: [],
});
```

#### `knowledge_base_sync_create`

Standalone best-effort lens sync (display mode).

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.knowledge_base.sync("knowledge_base_id");
```

#### `knowledge_base_unlink_destroy`

Unlink a knowledge base: remove the local KnowledgeBase row only, leaving
the Atlas lens (and any in-progress draft) untouched.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

await client.knowledge_base.unlink("knowledge_base_id");
```

### Policies

#### `policies_list`

List all policies and create a new policy.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.list(
  {
    page: 1, // optional
    pageSize: 1, // optional
  }
);
```

#### `policies_create`

List all policies and create a new policy.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.create(
  {
    name: "name", // required
    content: {}, // required
    description: "description", // optional
    versionName: "versionName", // optional
  }
);
```

#### `policies_destroy`

Retrieve, update, or delete a single policy by ID.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.delete("policyId");
```

#### `policies_retrieve`

Retrieve, update, or delete a single policy by ID.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.retrieve("policyId");
```

#### `policies_partial_update`

Retrieve, update, or delete a single policy by ID.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.update(
  "policyId",
  {
    name: "name", // optional
    description: "description", // optional
  }
);
```

#### `policies_update`

Retrieve, update, or delete a single policy by ID.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.replace(
  "policyId",
  {
    name: "name", // required
    description: "description", // optional
  }
);
```

#### `policies_versions_list`

Create a new policy version or list all versions of a specific policy.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.versions.list("policy_id");
```

#### `policies_versions_create`

Create a new policy version or list all versions of a specific policy.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.versions.create({
  policyId: "policy_id",
  content: {},
  versionName: "version_name",
  baseVersionId: "base_version_id",
});
```

#### `policies_versions_retrieve`

Get a specific policy version by policy\_id and version\_id.

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.policies.versions.retrieve(
  "policy_id",
  "version_id",
);
```

### Tables

#### `tables_list`

List Roe tables

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.tables.list();
```

#### `tables_query_create`

Run a read-only Roe table query

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.tables.query(
  {
    sql: "sql", // required
    limit: 1, // optional
  }
);
```

#### `tables_query_result_retrieve`

Get a Roe table query result

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.tables.queryResult("tableQueryId");
```

#### `tables_destroy`

Delete a Roe table

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.tables.delete("tableName");
```

#### `tables_describe_retrieve`

Describe a Roe table

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.tables.describe("tableName");
```

#### `tables_preview_retrieve`

Preview a Roe table

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.tables.preview(
  "tableName",
  {
    limit: 1, // optional
  }
);
```

#### `upload_table`

Upload a CSV as a Roe table

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.tables.upload(
  {
    tableName: "table_name",
    file: "file.csv",
    withHeaders: true,
  }
);
```

### Users

#### `users_current_user_retrieve`

Get the current user

```typescript theme={null}
import { RoeClient } from "roe-typescript";

const client = new RoeClient();

const result = await client.users.me();
```
