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

# Experiments SDK Reference

> SDK reference for the Experiments API, available in Node.js and Python.

## Experiments

### List Experiments

Lists experiments in the workspace, newest first.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.list()

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.list();

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "limit": Optional[int],
    "starting_after": Optional[str],
    "ending_before": Optional[str],
    "project_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  limit?: number;
  startingAfter?: string;
  endingBefore?: string;
  projectId?: string;
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "data": [{  # optional
        "experiment_id": Optional[str],
        "display_name": Optional[str],
        "project_id": Optional[str],
        "dataset_id": Optional[str],
        "dataset_version_id": Optional[str],
        "selected_run_id": Optional[str],
        "created_at": str,  # optional
        "updated_at": str,  # optional
        "source": Optional[str],
        "row_height_level": Optional[int],
        "unique_evaluators": [{  # optional
            "evaluator_id": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_key": Optional[str],
        }],
        "created_by_id": Optional[str],
    }],
    "has_more": Optional[bool],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  data?: {
    experimentId?: string;
    displayName?: string;
    projectId?: string;
    datasetId?: string;
    datasetVersionId?: string;
    selectedRunId?: string;
    createdAt?: Date;
    updatedAt?: Date;
    source?: string;
    rowHeightLevel?: number;
    uniqueEvaluators?: {
      evaluatorId?: string;
      evaluatorType?: string;
      evaluatorName?: string;
      evaluatorKey?: string;
    }[];
    createdById?: string;
  }[];
  hasMore?: boolean;
}
```

### Create an Experiment

Creates an experiment. project\_id defaults to the API key's project and is required for keys that span several projects. When dataset\_id is set, a draft run is created with rows from that dataset.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.create(display_name="<value>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.create({
    displayName: "<value>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "display_name": Optional[str],
    "project_id": Optional[str],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "source_run": {  # optional
        "experiment_id": Optional[str],
        "run_id": Optional[str],
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  displayName?: string;
  projectId?: string;
  datasetId?: string;
  datasetVersionId?: string;
  sourceRun?: {
    experimentId?: string;
    runId?: string;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": Optional[str],
    "display_name": Optional[str],
    "project_id": Optional[str],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "selected_run_id": Optional[str],
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "source": Optional[str],
    "row_height_level": Optional[int],
    "unique_evaluators": [{  # optional
        "evaluator_id": Optional[str],
        "evaluator_type": Optional[str],
        "evaluator_name": Optional[str],
        "evaluator_key": Optional[str],
    }],
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId?: string;
  displayName?: string;
  projectId?: string;
  datasetId?: string;
  datasetVersionId?: string;
  selectedRunId?: string;
  createdAt?: Date;
  updatedAt?: Date;
  source?: string;
  rowHeightLevel?: number;
  uniqueEvaluators?: {
    evaluatorId?: string;
    evaluatorType?: string;
    evaluatorName?: string;
    evaluatorKey?: string;
  }[];
  createdById?: string;
}
```

### Retrieve an Experiment

Returns experiment metadata. Runs and cell data are separate resources.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.get(experiment_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.get({
    experimentId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": Optional[str],
    "display_name": Optional[str],
    "project_id": Optional[str],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "selected_run_id": Optional[str],
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "source": Optional[str],
    "row_height_level": Optional[int],
    "unique_evaluators": [{  # optional
        "evaluator_id": Optional[str],
        "evaluator_type": Optional[str],
        "evaluator_name": Optional[str],
        "evaluator_key": Optional[str],
    }],
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId?: string;
  displayName?: string;
  projectId?: string;
  datasetId?: string;
  datasetVersionId?: string;
  selectedRunId?: string;
  createdAt?: Date;
  updatedAt?: Date;
  source?: string;
  rowHeightLevel?: number;
  uniqueEvaluators?: {
    evaluatorId?: string;
    evaluatorType?: string;
    evaluatorName?: string;
    evaluatorKey?: string;
  }[];
  createdById?: string;
}
```

### Delete an Experiment

Deletes an experiment and its runs.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    orq.experiments.delete(experiment_id="<id>")

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  await orq.experiments.delete({
    experimentId: "<id>",
  });

}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
}
```

### Update an Experiment

Updates experiment metadata. Omitted optional fields keep their current values.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.update(experiment_id="<id>", display_name="<value>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.update({
    experimentId: "<id>",
    updateExperimentRequest: {
      displayName: "<value>",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "display_name": Optional[str],
    "selected_run_id": Optional[str],
    "row_height_level": Optional[int],
    "project_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  updateExperimentRequest: {  // required
    displayName?: string;
    selectedRunId?: string;
    rowHeightLevel?: number;
    projectId?: string;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": Optional[str],
    "display_name": Optional[str],
    "project_id": Optional[str],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "selected_run_id": Optional[str],
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "source": Optional[str],
    "row_height_level": Optional[int],
    "unique_evaluators": [{  # optional
        "evaluator_id": Optional[str],
        "evaluator_type": Optional[str],
        "evaluator_name": Optional[str],
        "evaluator_key": Optional[str],
    }],
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId?: string;
  displayName?: string;
  projectId?: string;
  datasetId?: string;
  datasetVersionId?: string;
  selectedRunId?: string;
  createdAt?: Date;
  updatedAt?: Date;
  source?: string;
  rowHeightLevel?: number;
  uniqueEvaluators?: {
    evaluatorId?: string;
    evaluatorType?: string;
    evaluatorName?: string;
    evaluatorKey?: string;
  }[];
  createdById?: string;
}
```

### List Runs

Lists runs for an experiment, newest first. Each run is metadata only.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.list_runs(experiment_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.listRuns({
    experimentId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "limit": Optional[int],
    "starting_after": Optional[str],
    "ending_before": Optional[str],
    "include_metrics": Optional[bool],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  limit?: number;
  startingAfter?: string;
  endingBefore?: string;
  includeMetrics?: boolean;
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "data": [{  # optional
        "run_id": Optional[str],
        "experiment_id": Optional[str],
        "key": Optional[str],
        "status": Optional[Literal["RUN_STATUS_UNSPECIFIED", "RUN_STATUS_DRAFT", "RUN_STATUS_QUEUED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED", "RUN_STATUS_CANCELED"]],
        "dataset_id": Optional[str],
        "dataset_version_id": Optional[str],
        "row_count": Optional[int],
        "cell_status_counts": {  # optional
            "not_run": Optional[int],
            "queued": Optional[int],
            "running": Optional[int],
            "completed": Optional[int],
            "failed": Optional[int],
            "canceled": Optional[int],
        },
        "columns": [{  # optional
            "column_id": Optional[str],
            "key": Optional[str],
            "display_name": Optional[str],
            "position": Optional[int],
            "active": Optional[bool],
            "prompt": {  # optional
                "prompt_config": Dict[str, Any],
                "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
                "engine": Optional[str],
                "tools": List[Dict[str, Any]],  # optional
                "knowledge_bases": List[Dict[str, Any]],  # optional
                "metadata": Dict[str, Any],  # optional
                "entity_configuration": Dict[str, Any],  # optional
            },
            "agent": {  # optional
                "agent_key": Optional[str],
                "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
                "messages": List[Dict[str, Any]],  # optional
                "engine": Optional[str],
                "parent_id": Optional[str],
                "agent_tag": Optional[str],
            },
            "harness": {  # optional
                "harness_config_id": Optional[str],
            },
            "openresponse": Dict[str, Any],  # optional
            "evaluator": {  # optional
                "evaluator_id": Optional[str],
                "evaluator_name": Optional[str],
                "evaluator_type": Optional[str],
                "evaluator_output_type": Optional[str],
            },
            "review": {  # optional
                "human_eval_id": Optional[str],
                "human_eval_name": Optional[str],
                "human_eval_type": Optional[str],
            },
            "dataset": {  # optional
                "column_type": Optional[str],
            },
            "metric": {  # optional
                "metric_key": Optional[str],
            },
            "job_output": {  # optional
                "job_name": Optional[str],
            },
            "width": Optional[int],
        }],
        "settings": {  # optional
            "concurrency": Optional[int],
            "timeout": Optional[str],
            "max_turns": Optional[int],
            "hidden_column_ids": List[str],  # optional
        },
        "started_at": str,  # optional
        "completed_at": str,  # optional
        "created_at": str,  # optional
        "updated_at": str,  # optional
        "metrics": Dict[str, float],  # optional
        "stats": {  # optional
            "total_cost": Optional[float],
            "total_runs": Optional[int],
            "total_errors": Optional[int],
            "total_done": Optional[int],
        },
        "created_by_id": Optional[str],
    }],
    "has_more": Optional[bool],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  data?: {
    runId?: string;
    experimentId?: string;
    key?: string;
    status?: "RUN_STATUS_UNSPECIFIED" | "RUN_STATUS_DRAFT" | "RUN_STATUS_QUEUED" | "RUN_STATUS_RUNNING" | "RUN_STATUS_COMPLETED" | "RUN_STATUS_FAILED" | "RUN_STATUS_CANCELED";
    datasetId?: string;
    datasetVersionId?: string;
    rowCount?: number;
    cellStatusCounts?: {
      notRun?: number;
      queued?: number;
      running?: number;
      completed?: number;
      failed?: number;
      canceled?: number;
    };
    columns?: {
      columnId?: string;
      key?: string;
      displayName?: string;
      position?: number;
      active?: boolean;
      prompt?: {
        promptConfig: Record<string, any>;
        messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
        engine?: string;
        tools?: Record<string, any>[];
        knowledgeBases?: Record<string, any>[];
        metadata?: Record<string, any>;
        entityConfiguration?: Record<string, any>;
      };
      agent?: {
        agentKey?: string;
        messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
        messages?: Record<string, any>[];
        engine?: string;
        parentId?: string;
        agentTag?: string;
      };
      harness?: {
        harnessConfigId?: string;
      };
      openresponse?: Record<string, unknown>;
      evaluator?: {
        evaluatorId?: string;
        evaluatorName?: string;
        evaluatorType?: string;
        evaluatorOutputType?: string;
      };
      review?: {
        humanEvalId?: string;
        humanEvalName?: string;
        humanEvalType?: string;
      };
      dataset?: {
        columnType?: string;
      };
      metric?: {
        metricKey?: string;
      };
      jobOutput?: {
        jobName?: string;
      };
      width?: number;
    }[];
    settings?: {
      concurrency?: number;
      timeout?: string;
      maxTurns?: number;
      hiddenColumnIds?: string[];
    };
    startedAt?: Date;
    completedAt?: Date;
    createdAt?: Date;
    updatedAt?: Date;
    metrics?: Record<string, number>;
    stats?: {
      totalCost?: number;
      totalRuns?: number;
      totalErrors?: number;
      totalDone?: number;
    };
    createdById?: string;
  }[];
  hasMore?: boolean;
}
```

### Create Run

Creates a new run, copying columns from the selected run when present. A rerun is a new run.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.create_run(experiment_id="<id>", key="baseline")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.createRun({
    experimentId: "<id>",
    createRunRequest: {
      key: "baseline",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "key": Optional[str],
    "settings": {  # optional
        "concurrency": Optional[int],
        "timeout": Optional[str],
        "max_turns": Optional[int],
        "hidden_column_ids": List[str],  # optional
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  createRunRequest: {  // required
    key?: string;
    settings?: {
      concurrency?: number;
      timeout?: string;
      maxTurns?: number;
      hiddenColumnIds?: string[];
    };
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "run_id": Optional[str],
    "experiment_id": Optional[str],
    "key": Optional[str],
    "status": Optional[Literal["RUN_STATUS_UNSPECIFIED", "RUN_STATUS_DRAFT", "RUN_STATUS_QUEUED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED", "RUN_STATUS_CANCELED"]],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "row_count": Optional[int],
    "cell_status_counts": {  # optional
        "not_run": Optional[int],
        "queued": Optional[int],
        "running": Optional[int],
        "completed": Optional[int],
        "failed": Optional[int],
        "canceled": Optional[int],
    },
    "columns": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
    "settings": {  # optional
        "concurrency": Optional[int],
        "timeout": Optional[str],
        "max_turns": Optional[int],
        "hidden_column_ids": List[str],  # optional
    },
    "started_at": str,  # optional
    "completed_at": str,  # optional
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "metrics": Dict[str, float],  # optional
    "stats": {  # optional
        "total_cost": Optional[float],
        "total_runs": Optional[int],
        "total_errors": Optional[int],
        "total_done": Optional[int],
    },
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  runId?: string;
  experimentId?: string;
  key?: string;
  status?: "RUN_STATUS_UNSPECIFIED" | "RUN_STATUS_DRAFT" | "RUN_STATUS_QUEUED" | "RUN_STATUS_RUNNING" | "RUN_STATUS_COMPLETED" | "RUN_STATUS_FAILED" | "RUN_STATUS_CANCELED";
  datasetId?: string;
  datasetVersionId?: string;
  rowCount?: number;
  cellStatusCounts?: {
    notRun?: number;
    queued?: number;
    running?: number;
    completed?: number;
    failed?: number;
    canceled?: number;
  };
  columns?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
  settings?: {
    concurrency?: number;
    timeout?: string;
    maxTurns?: number;
    hiddenColumnIds?: string[];
  };
  startedAt?: Date;
  completedAt?: Date;
  createdAt?: Date;
  updatedAt?: Date;
  metrics?: Record<string, number>;
  stats?: {
    totalCost?: number;
    totalRuns?: number;
    totalErrors?: number;
    totalDone?: number;
  };
  createdById?: string;
}
```

### Get Run

Returns run status, per-cell status counts, row count, and column configs. Does not return the cell matrix.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.get_run(experiment_id="<id>", run_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.getRun({
    experimentId: "<id>",
    runId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "run_id": Optional[str],
    "experiment_id": Optional[str],
    "key": Optional[str],
    "status": Optional[Literal["RUN_STATUS_UNSPECIFIED", "RUN_STATUS_DRAFT", "RUN_STATUS_QUEUED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED", "RUN_STATUS_CANCELED"]],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "row_count": Optional[int],
    "cell_status_counts": {  # optional
        "not_run": Optional[int],
        "queued": Optional[int],
        "running": Optional[int],
        "completed": Optional[int],
        "failed": Optional[int],
        "canceled": Optional[int],
    },
    "columns": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
    "settings": {  # optional
        "concurrency": Optional[int],
        "timeout": Optional[str],
        "max_turns": Optional[int],
        "hidden_column_ids": List[str],  # optional
    },
    "started_at": str,  # optional
    "completed_at": str,  # optional
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "metrics": Dict[str, float],  # optional
    "stats": {  # optional
        "total_cost": Optional[float],
        "total_runs": Optional[int],
        "total_errors": Optional[int],
        "total_done": Optional[int],
    },
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  runId?: string;
  experimentId?: string;
  key?: string;
  status?: "RUN_STATUS_UNSPECIFIED" | "RUN_STATUS_DRAFT" | "RUN_STATUS_QUEUED" | "RUN_STATUS_RUNNING" | "RUN_STATUS_COMPLETED" | "RUN_STATUS_FAILED" | "RUN_STATUS_CANCELED";
  datasetId?: string;
  datasetVersionId?: string;
  rowCount?: number;
  cellStatusCounts?: {
    notRun?: number;
    queued?: number;
    running?: number;
    completed?: number;
    failed?: number;
    canceled?: number;
  };
  columns?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
  settings?: {
    concurrency?: number;
    timeout?: string;
    maxTurns?: number;
    hiddenColumnIds?: string[];
  };
  startedAt?: Date;
  completedAt?: Date;
  createdAt?: Date;
  updatedAt?: Date;
  metrics?: Record<string, number>;
  stats?: {
    totalCost?: number;
    totalRuns?: number;
    totalErrors?: number;
    totalDone?: number;
  };
  createdById?: string;
}
```

### Delete Run

Deletes a run and its cell data. Distinct from cancel, which keeps completed cells.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    orq.experiments.delete_run(experiment_id="<id>", run_id="<id>")

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  await orq.experiments.deleteRun({
    experimentId: "<id>",
    runId: "<id>",
  });

}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
}
```

### Update Run

Updates run key and execution settings. Does not execute the run.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.update_run(experiment_id="<id>", run_id="<id>", key="baseline")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.updateRun({
    experimentId: "<id>",
    runId: "<id>",
    updateRunRequest: {
      key: "baseline",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "key": Optional[str],
    "settings": {  # optional
        "concurrency": Optional[int],
        "timeout": Optional[str],
        "max_turns": Optional[int],
        "hidden_column_ids": List[str],  # optional
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  updateRunRequest: {  // required
    key?: string;
    settings?: {
      concurrency?: number;
      timeout?: string;
      maxTurns?: number;
      hiddenColumnIds?: string[];
    };
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "run_id": Optional[str],
    "experiment_id": Optional[str],
    "key": Optional[str],
    "status": Optional[Literal["RUN_STATUS_UNSPECIFIED", "RUN_STATUS_DRAFT", "RUN_STATUS_QUEUED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED", "RUN_STATUS_CANCELED"]],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "row_count": Optional[int],
    "cell_status_counts": {  # optional
        "not_run": Optional[int],
        "queued": Optional[int],
        "running": Optional[int],
        "completed": Optional[int],
        "failed": Optional[int],
        "canceled": Optional[int],
    },
    "columns": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
    "settings": {  # optional
        "concurrency": Optional[int],
        "timeout": Optional[str],
        "max_turns": Optional[int],
        "hidden_column_ids": List[str],  # optional
    },
    "started_at": str,  # optional
    "completed_at": str,  # optional
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "metrics": Dict[str, float],  # optional
    "stats": {  # optional
        "total_cost": Optional[float],
        "total_runs": Optional[int],
        "total_errors": Optional[int],
        "total_done": Optional[int],
    },
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  runId?: string;
  experimentId?: string;
  key?: string;
  status?: "RUN_STATUS_UNSPECIFIED" | "RUN_STATUS_DRAFT" | "RUN_STATUS_QUEUED" | "RUN_STATUS_RUNNING" | "RUN_STATUS_COMPLETED" | "RUN_STATUS_FAILED" | "RUN_STATUS_CANCELED";
  datasetId?: string;
  datasetVersionId?: string;
  rowCount?: number;
  cellStatusCounts?: {
    notRun?: number;
    queued?: number;
    running?: number;
    completed?: number;
    failed?: number;
    canceled?: number;
  };
  columns?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
  settings?: {
    concurrency?: number;
    timeout?: string;
    maxTurns?: number;
    hiddenColumnIds?: string[];
  };
  startedAt?: Date;
  completedAt?: Date;
  createdAt?: Date;
  updatedAt?: Date;
  metrics?: Record<string, number>;
  stats?: {
    totalCost?: number;
    totalRuns?: number;
    totalErrors?: number;
    totalDone?: number;
  };
  createdById?: string;
}
```

### Cancel Run

Stops queued and running cells and moves the run to canceled. A cell whose execution is already in flight may still write its result.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.cancel_run(experiment_id="<id>", run_id="<id>", row_ids=["<row_id>"])

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.cancelRun({
    experimentId: "<id>",
    runId: "<id>",
    cancelExperimentRunRequest: {
      rowIds: ["<value>"],
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "row_ids": List[str],  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  cancelExperimentRunRequest: {  // required
    rowIds?: string[];
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "run_id": Optional[str],
    "experiment_id": Optional[str],
    "key": Optional[str],
    "status": Optional[Literal["RUN_STATUS_UNSPECIFIED", "RUN_STATUS_DRAFT", "RUN_STATUS_QUEUED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED", "RUN_STATUS_CANCELED"]],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "row_count": Optional[int],
    "cell_status_counts": {  # optional
        "not_run": Optional[int],
        "queued": Optional[int],
        "running": Optional[int],
        "completed": Optional[int],
        "failed": Optional[int],
        "canceled": Optional[int],
    },
    "columns": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
    "settings": {  # optional
        "concurrency": Optional[int],
        "timeout": Optional[str],
        "max_turns": Optional[int],
        "hidden_column_ids": List[str],  # optional
    },
    "started_at": str,  # optional
    "completed_at": str,  # optional
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "metrics": Dict[str, float],  # optional
    "stats": {  # optional
        "total_cost": Optional[float],
        "total_runs": Optional[int],
        "total_errors": Optional[int],
        "total_done": Optional[int],
    },
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  runId?: string;
  experimentId?: string;
  key?: string;
  status?: "RUN_STATUS_UNSPECIFIED" | "RUN_STATUS_DRAFT" | "RUN_STATUS_QUEUED" | "RUN_STATUS_RUNNING" | "RUN_STATUS_COMPLETED" | "RUN_STATUS_FAILED" | "RUN_STATUS_CANCELED";
  datasetId?: string;
  datasetVersionId?: string;
  rowCount?: number;
  cellStatusCounts?: {
    notRun?: number;
    queued?: number;
    running?: number;
    completed?: number;
    failed?: number;
    canceled?: number;
  };
  columns?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
  settings?: {
    concurrency?: number;
    timeout?: string;
    maxTurns?: number;
    hiddenColumnIds?: string[];
  };
  startedAt?: Date;
  completedAt?: Date;
  createdAt?: Date;
  updatedAt?: Date;
  metrics?: Record<string, number>;
  stats?: {
    totalCost?: number;
    totalRuns?: number;
    totalErrors?: number;
    totalDone?: number;
  };
  createdById?: string;
}
```

### Update Run Column Layout

Reorders, resizes, hides or shows columns of a run in one call. Columns not listed keep their layout.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.update_run_column_layout(experiment_id="<id>", run_id="<id>", columns=[{"column_id": "<id>", "position": 0}])

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.updateRunColumnLayout({
    experimentId: "<id>",
    runId: "<id>",
    updateRunColumnLayoutRequest: {
      columns: [{ columnId: "<id>", position: 0 }],
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "columns": [{  # optional
        "column_id": Optional[str],
        "position": Optional[int],
        "width": Optional[int],
        "active": Optional[bool],
    }],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  updateRunColumnLayoutRequest: {  // required
    columns?: {
      columnId?: string;
      position?: number;
      width?: number;
      active?: boolean;
    }[];
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "run_id": Optional[str],
    "experiment_id": Optional[str],
    "key": Optional[str],
    "status": Optional[Literal["RUN_STATUS_UNSPECIFIED", "RUN_STATUS_DRAFT", "RUN_STATUS_QUEUED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED", "RUN_STATUS_CANCELED"]],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "row_count": Optional[int],
    "cell_status_counts": {  # optional
        "not_run": Optional[int],
        "queued": Optional[int],
        "running": Optional[int],
        "completed": Optional[int],
        "failed": Optional[int],
        "canceled": Optional[int],
    },
    "columns": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
    "settings": {  # optional
        "concurrency": Optional[int],
        "timeout": Optional[str],
        "max_turns": Optional[int],
        "hidden_column_ids": List[str],  # optional
    },
    "started_at": str,  # optional
    "completed_at": str,  # optional
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "metrics": Dict[str, float],  # optional
    "stats": {  # optional
        "total_cost": Optional[float],
        "total_runs": Optional[int],
        "total_errors": Optional[int],
        "total_done": Optional[int],
    },
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  runId?: string;
  experimentId?: string;
  key?: string;
  status?: "RUN_STATUS_UNSPECIFIED" | "RUN_STATUS_DRAFT" | "RUN_STATUS_QUEUED" | "RUN_STATUS_RUNNING" | "RUN_STATUS_COMPLETED" | "RUN_STATUS_FAILED" | "RUN_STATUS_CANCELED";
  datasetId?: string;
  datasetVersionId?: string;
  rowCount?: number;
  cellStatusCounts?: {
    notRun?: number;
    queued?: number;
    running?: number;
    completed?: number;
    failed?: number;
    canceled?: number;
  };
  columns?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
  settings?: {
    concurrency?: number;
    timeout?: string;
    maxTurns?: number;
    hiddenColumnIds?: string[];
  };
  startedAt?: Date;
  completedAt?: Date;
  createdAt?: Date;
  updatedAt?: Date;
  metrics?: Record<string, number>;
  stats?: {
    totalCost?: number;
    totalRuns?: number;
    totalErrors?: number;
    totalDone?: number;
  };
  createdById?: string;
}
```

### List Evals

List eval columns

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.list_evals(experiment_id="<id>", run_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.listEvals({
    experimentId: "<id>",
    runId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "data": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  data?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
}
```

### Create Eval

Links an existing evaluator. Config is updated at the evaluator source, not here.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.create_eval(experiment_id="<id>", run_id="<id>", position=0)

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.createEval({
    experimentId: "<id>",
    runId: "<id>",
    createEvalColumnRequest: {
      position: 0,
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "evaluator_id": Optional[str],
    "position": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  createEvalColumnRequest: {  // required
    evaluatorId?: string;
    position?: number;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "column_id": Optional[str],
    "key": Optional[str],
    "display_name": Optional[str],
    "position": Optional[int],
    "active": Optional[bool],
    "prompt": {  # optional
        "prompt_config": Dict[str, Any],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "engine": Optional[str],
        "tools": List[Dict[str, Any]],  # optional
        "knowledge_bases": List[Dict[str, Any]],  # optional
        "metadata": Dict[str, Any],  # optional
        "entity_configuration": Dict[str, Any],  # optional
    },
    "agent": {  # optional
        "agent_key": Optional[str],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "messages": List[Dict[str, Any]],  # optional
        "engine": Optional[str],
        "parent_id": Optional[str],
        "agent_tag": Optional[str],
    },
    "harness": {  # optional
        "harness_config_id": Optional[str],
    },
    "openresponse": Dict[str, Any],  # optional
    "evaluator": {  # optional
        "evaluator_id": Optional[str],
        "evaluator_name": Optional[str],
        "evaluator_type": Optional[str],
        "evaluator_output_type": Optional[str],
    },
    "review": {  # optional
        "human_eval_id": Optional[str],
        "human_eval_name": Optional[str],
        "human_eval_type": Optional[str],
    },
    "dataset": {  # optional
        "column_type": Optional[str],
    },
    "metric": {  # optional
        "metric_key": Optional[str],
    },
    "job_output": {  # optional
        "job_name": Optional[str],
    },
    "width": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  columnId?: string;
  key?: string;
  displayName?: string;
  position?: number;
  active?: boolean;
  prompt?: {
    promptConfig: Record<string, any>;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    engine?: string;
    tools?: Record<string, any>[];
    knowledgeBases?: Record<string, any>[];
    metadata?: Record<string, any>;
    entityConfiguration?: Record<string, any>;
  };
  agent?: {
    agentKey?: string;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    messages?: Record<string, any>[];
    engine?: string;
    parentId?: string;
    agentTag?: string;
  };
  harness?: {
    harnessConfigId?: string;
  };
  openresponse?: Record<string, unknown>;
  evaluator?: {
    evaluatorId?: string;
    evaluatorName?: string;
    evaluatorType?: string;
    evaluatorOutputType?: string;
  };
  review?: {
    humanEvalId?: string;
    humanEvalName?: string;
    humanEvalType?: string;
  };
  dataset?: {
    columnType?: string;
  };
  metric?: {
    metricKey?: string;
  };
  jobOutput?: {
    jobName?: string;
  };
  width?: number;
}
```

### Delete Eval

Remove an eval column

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    orq.experiments.delete_eval(experiment_id="<id>", run_id="<id>", eval_id="<id>")

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  await orq.experiments.deleteEval({
    experimentId: "<id>",
    runId: "<id>",
    evalId: "<id>",
  });

}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "eval_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  evalId: string;  // required
}
```

### Patch Eval Cell

Human override of an automated evaluator verdict on one datapoint.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.patch_eval_cell(experiment_id="<id>", run_id="<id>", eval_id="<id>", datapoint_id="<id>", value={"quality": "good"})

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.patchEvalCell({
    experimentId: "<id>",
    runId: "<id>",
    evalId: "<id>",
    datapointId: "<id>",
    patchEvalCellRequest: {
      value: { "<key>": "<value>" },
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "eval_id": str,  # required
    "datapoint_id": str,  # required
    "value": Dict[str, Any],  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  evalId: string;  // required
  datapointId: string;  // required
  patchEvalCellRequest: {  // required
    value?: Record<string, any>;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "cell_id": Optional[str],
    "row_id": Optional[str],
    "column_id": Optional[str],
    "repeat_index": Optional[int],
    "status": Optional[Literal["CELL_STATUS_UNSPECIFIED", "CELL_STATUS_NOT_RUN", "CELL_STATUS_QUEUED", "CELL_STATUS_RUNNING", "CELL_STATUS_COMPLETED", "CELL_STATUS_FAILED", "CELL_STATUS_CANCELED"]],
    "value": Dict[str, Any],  # optional
    "artifacts": {  # optional
        "trace_id": Optional[str],
        "response_id": Optional[str],
        "session_id": Optional[str],
        "session_run_id": Optional[str],
        "pull_request_url": Optional[str],
        "patch_object_key": Optional[str],
    },
    "progress": {  # optional
        "elapsed": Optional[str],
        "spend_usd": Optional[float],
        "activity": Optional[str],
    },
    "error_message": Optional[str],
    "type": Optional[Literal["CELL_TYPE_UNSPECIFIED", "CELL_TYPE_TEXT", "CELL_TYPE_NUMBER", "CELL_TYPE_INPUTS", "CELL_TYPE_MESSAGES", "CELL_TYPE_RESPONSE", "CELL_TYPE_AGENT_RESPONSE", "CELL_TYPE_EVALUATOR", "CELL_TYPE_METRIC", "CELL_TYPE_HUMAN_EVAL", "CELL_TYPE_OPENRESPONSE"]],
    "task_column_id": Optional[str],
    "created_at": str,  # optional
    "updated_at": str,  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  cellId?: string;
  rowId?: string;
  columnId?: string;
  repeatIndex?: number;
  status?: "CELL_STATUS_UNSPECIFIED" | "CELL_STATUS_NOT_RUN" | "CELL_STATUS_QUEUED" | "CELL_STATUS_RUNNING" | "CELL_STATUS_COMPLETED" | "CELL_STATUS_FAILED" | "CELL_STATUS_CANCELED";
  value?: Record<string, any>;
  artifacts?: {
    traceId?: string;
    responseId?: string;
    sessionId?: string;
    sessionRunId?: string;
    pullRequestUrl?: string;
    patchObjectKey?: string;
  };
  progress?: {
    elapsed?: string;
    spendUsd?: number;
    activity?: string;
  };
  errorMessage?: string;
  type?: "CELL_TYPE_UNSPECIFIED" | "CELL_TYPE_TEXT" | "CELL_TYPE_NUMBER" | "CELL_TYPE_INPUTS" | "CELL_TYPE_MESSAGES" | "CELL_TYPE_RESPONSE" | "CELL_TYPE_AGENT_RESPONSE" | "CELL_TYPE_EVALUATOR" | "CELL_TYPE_METRIC" | "CELL_TYPE_HUMAN_EVAL" | "CELL_TYPE_OPENRESPONSE";
  taskColumnId?: string;
  createdAt?: Date;
  updatedAt?: Date;
}
```

### Execute Run

Executes cells at the requested scope. FULL, PARTIAL, ROW and COLUMN queue the matching cells (a task column also queues its linked evaluator, metric and review cells) and start the orchestrator, which also re-runs failed cells of every row it picks up. A run that is already queued or running rejects new execution until it finishes or is cancelled. CELL re-runs one task or evaluator cell in place. Re-executing a terminal run does not require creating a new run.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.execute_run(experiment_id="<id>", run_id="<id>", scope="EXECUTE_SCOPE_CELL")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.executeRun({
    experimentId: "<id>",
    runId: "<id>",
    executeRunRequest: {
      scope: "EXECUTE_SCOPE_CELL",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "scope": Optional[Literal["EXECUTE_SCOPE_UNSPECIFIED", "EXECUTE_SCOPE_CELL", "EXECUTE_SCOPE_ROW", "EXECUTE_SCOPE_COLUMN", "EXECUTE_SCOPE_PARTIAL", "EXECUTE_SCOPE_FULL"]],
    "targets": [{  # optional
        "row_id": Optional[str],
        "column_id": Optional[str],
        "column_key": Optional[str],
        "repeat_index": Optional[int],
    }],
    "constraints": {  # optional
        "llm": {  # optional
            "max_turns": Optional[int],
            "timeout": Optional[str],
            "concurrency": Optional[int],
        },
        "harness": {  # optional
            "wall_clock_value": Optional[int],
            "wall_clock_unit": Optional[Literal["WALL_CLOCK_UNIT_UNSPECIFIED", "WALL_CLOCK_UNIT_MINUTES", "WALL_CLOCK_UNIT_HOURS"]],
            "spend_cap_usd": Optional[float],
            "spend_cap_tokens": Optional[str],
            "concurrency": Optional[int],
        },
    },
    "repeat_count": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  executeRunRequest: {  // required
    scope?: "EXECUTE_SCOPE_UNSPECIFIED" | "EXECUTE_SCOPE_CELL" | "EXECUTE_SCOPE_ROW" | "EXECUTE_SCOPE_COLUMN" | "EXECUTE_SCOPE_PARTIAL" | "EXECUTE_SCOPE_FULL";
    targets?: {
      rowId?: string;
      columnId?: string;
      columnKey?: string;
      repeatIndex?: number;
    }[];
    constraints?: {
      llm?: {
        maxTurns?: number;
        timeout?: string;
        concurrency?: number;
      };
      harness?: {
        wallClockValue?: number;
        wallClockUnit?: "WALL_CLOCK_UNIT_UNSPECIFIED" | "WALL_CLOCK_UNIT_MINUTES" | "WALL_CLOCK_UNIT_HOURS";
        spendCapUsd?: number;
        spendCapTokens?: string;
        concurrency?: number;
      };
    };
    repeatCount?: number;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "run_id": Optional[str],
    "experiment_id": Optional[str],
    "key": Optional[str],
    "status": Optional[Literal["RUN_STATUS_UNSPECIFIED", "RUN_STATUS_DRAFT", "RUN_STATUS_QUEUED", "RUN_STATUS_RUNNING", "RUN_STATUS_COMPLETED", "RUN_STATUS_FAILED", "RUN_STATUS_CANCELED"]],
    "dataset_id": Optional[str],
    "dataset_version_id": Optional[str],
    "row_count": Optional[int],
    "cell_status_counts": {  # optional
        "not_run": Optional[int],
        "queued": Optional[int],
        "running": Optional[int],
        "completed": Optional[int],
        "failed": Optional[int],
        "canceled": Optional[int],
    },
    "columns": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
    "settings": {  # optional
        "concurrency": Optional[int],
        "timeout": Optional[str],
        "max_turns": Optional[int],
        "hidden_column_ids": List[str],  # optional
    },
    "started_at": str,  # optional
    "completed_at": str,  # optional
    "created_at": str,  # optional
    "updated_at": str,  # optional
    "metrics": Dict[str, float],  # optional
    "stats": {  # optional
        "total_cost": Optional[float],
        "total_runs": Optional[int],
        "total_errors": Optional[int],
        "total_done": Optional[int],
    },
    "created_by_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  runId?: string;
  experimentId?: string;
  key?: string;
  status?: "RUN_STATUS_UNSPECIFIED" | "RUN_STATUS_DRAFT" | "RUN_STATUS_QUEUED" | "RUN_STATUS_RUNNING" | "RUN_STATUS_COMPLETED" | "RUN_STATUS_FAILED" | "RUN_STATUS_CANCELED";
  datasetId?: string;
  datasetVersionId?: string;
  rowCount?: number;
  cellStatusCounts?: {
    notRun?: number;
    queued?: number;
    running?: number;
    completed?: number;
    failed?: number;
    canceled?: number;
  };
  columns?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
  settings?: {
    concurrency?: number;
    timeout?: string;
    maxTurns?: number;
    hiddenColumnIds?: string[];
  };
  startedAt?: Date;
  completedAt?: Date;
  createdAt?: Date;
  updatedAt?: Date;
  metrics?: Record<string, number>;
  stats?: {
    totalCost?: number;
    totalRuns?: number;
    totalErrors?: number;
    totalDone?: number;
  };
  createdById?: string;
}
```

### Get Run Metrics

Returns aggregated evaluator and built-in metrics for a run, keyed by task column and metric. Pass baseline\_run\_id to include the delta against another run.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.get_run_metrics(experiment_id="<id>", run_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.getRunMetrics({
    experimentId: "<id>",
    runId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "baseline_run_id": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  baselineRunId?: string;
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "metrics": Dict[str, MetricSummary],  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  metrics?: Record<string, MetricSummary>;
}
```

### Query Run

Returns selected cells by row and column name. POST because selections can exceed URL limits.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.query_run(experiment_id="<id>", run_id="<id>", rows=["<row_id>"])

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.queryRun({
    experimentId: "<id>",
    runId: "<id>",
    queryRunRequest: {
      rows: ["<value>"],
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "rows": List[str],  # optional
    "columns": List[str],  # optional
    "repeat_index": Optional[int],
    "limit": Optional[int],
    "starting_after": Optional[str],
    "updated_after": str,  # optional
    "partial_rows": Optional[bool],
    "exclude_static_cells": Optional[bool],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  queryRunRequest: {  // required
    rows?: string[];
    columns?: string[];
    repeatIndex?: number;
    limit?: number;
    startingAfter?: string;
    updatedAfter?: Date;
    partialRows?: boolean;
    excludeStaticCells?: boolean;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "rows": [{  # optional
        "row_id": Optional[str],
        "display_name": Optional[str],
        "cells": [{  # optional
            "cell_id": Optional[str],
            "row_id": Optional[str],
            "column_id": Optional[str],
            "repeat_index": Optional[int],
            "status": Optional[Literal["CELL_STATUS_UNSPECIFIED", "CELL_STATUS_NOT_RUN", "CELL_STATUS_QUEUED", "CELL_STATUS_RUNNING", "CELL_STATUS_COMPLETED", "CELL_STATUS_FAILED", "CELL_STATUS_CANCELED"]],
            "value": Dict[str, Any],  # optional
            "artifacts": {  # optional
                "trace_id": Optional[str],
                "response_id": Optional[str],
                "session_id": Optional[str],
                "session_run_id": Optional[str],
                "pull_request_url": Optional[str],
                "patch_object_key": Optional[str],
            },
            "progress": {  # optional
                "elapsed": Optional[str],
                "spend_usd": Optional[float],
                "activity": Optional[str],
            },
            "error_message": Optional[str],
            "type": Optional[Literal["CELL_TYPE_UNSPECIFIED", "CELL_TYPE_TEXT", "CELL_TYPE_NUMBER", "CELL_TYPE_INPUTS", "CELL_TYPE_MESSAGES", "CELL_TYPE_RESPONSE", "CELL_TYPE_AGENT_RESPONSE", "CELL_TYPE_EVALUATOR", "CELL_TYPE_METRIC", "CELL_TYPE_HUMAN_EVAL", "CELL_TYPE_OPENRESPONSE"]],
            "task_column_id": Optional[str],
            "created_at": str,  # optional
            "updated_at": str,  # optional
        }],
        "status": Optional[Literal["ROW_STATUS_UNSPECIFIED", "ROW_STATUS_NOT_RUN", "ROW_STATUS_QUEUED", "ROW_STATUS_RUNNING", "ROW_STATUS_COMPLETED", "ROW_STATUS_FAILED", "ROW_STATUS_CANCELED"]],
        "created_at": str,  # optional
        "updated_at": str,  # optional
    }],
    "has_more": Optional[bool],
    "server_timestamp": str,  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  rows?: {
    rowId?: string;
    displayName?: string;
    cells?: {
      cellId?: string;
      rowId?: string;
      columnId?: string;
      repeatIndex?: number;
      status?: "CELL_STATUS_UNSPECIFIED" | "CELL_STATUS_NOT_RUN" | "CELL_STATUS_QUEUED" | "CELL_STATUS_RUNNING" | "CELL_STATUS_COMPLETED" | "CELL_STATUS_FAILED" | "CELL_STATUS_CANCELED";
      value?: Record<string, any>;
      artifacts?: {
        traceId?: string;
        responseId?: string;
        sessionId?: string;
        sessionRunId?: string;
        pullRequestUrl?: string;
        patchObjectKey?: string;
      };
      progress?: {
        elapsed?: string;
        spendUsd?: number;
        activity?: string;
      };
      errorMessage?: string;
      type?: "CELL_TYPE_UNSPECIFIED" | "CELL_TYPE_TEXT" | "CELL_TYPE_NUMBER" | "CELL_TYPE_INPUTS" | "CELL_TYPE_MESSAGES" | "CELL_TYPE_RESPONSE" | "CELL_TYPE_AGENT_RESPONSE" | "CELL_TYPE_EVALUATOR" | "CELL_TYPE_METRIC" | "CELL_TYPE_HUMAN_EVAL" | "CELL_TYPE_OPENRESPONSE";
      taskColumnId?: string;
      createdAt?: Date;
      updatedAt?: Date;
    }[];
    status?: "ROW_STATUS_UNSPECIFIED" | "ROW_STATUS_NOT_RUN" | "ROW_STATUS_QUEUED" | "ROW_STATUS_RUNNING" | "ROW_STATUS_COMPLETED" | "ROW_STATUS_FAILED" | "ROW_STATUS_CANCELED";
    createdAt?: Date;
    updatedAt?: Date;
  }[];
  hasMore?: boolean;
  serverTimestamp?: Date;
}
```

### List Reviews

List human review columns

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.list_reviews(experiment_id="<id>", run_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.listReviews({
    experimentId: "<id>",
    runId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "data": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  data?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
}
```

### Create Review

Add a human review column

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.create_review(experiment_id="<id>", run_id="<id>", display_name="<value>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.createReview({
    experimentId: "<id>",
    runId: "<id>",
    createReviewColumnRequest: {
      displayName: "<value>",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "human_eval_id": Optional[str],
    "display_name": Optional[str],
    "human_eval_type": Optional[str],
    "position": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  createReviewColumnRequest: {  // required
    humanEvalId?: string;
    displayName?: string;
    humanEvalType?: string;
    position?: number;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "column_id": Optional[str],
    "key": Optional[str],
    "display_name": Optional[str],
    "position": Optional[int],
    "active": Optional[bool],
    "prompt": {  # optional
        "prompt_config": Dict[str, Any],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "engine": Optional[str],
        "tools": List[Dict[str, Any]],  # optional
        "knowledge_bases": List[Dict[str, Any]],  # optional
        "metadata": Dict[str, Any],  # optional
        "entity_configuration": Dict[str, Any],  # optional
    },
    "agent": {  # optional
        "agent_key": Optional[str],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "messages": List[Dict[str, Any]],  # optional
        "engine": Optional[str],
        "parent_id": Optional[str],
        "agent_tag": Optional[str],
    },
    "harness": {  # optional
        "harness_config_id": Optional[str],
    },
    "openresponse": Dict[str, Any],  # optional
    "evaluator": {  # optional
        "evaluator_id": Optional[str],
        "evaluator_name": Optional[str],
        "evaluator_type": Optional[str],
        "evaluator_output_type": Optional[str],
    },
    "review": {  # optional
        "human_eval_id": Optional[str],
        "human_eval_name": Optional[str],
        "human_eval_type": Optional[str],
    },
    "dataset": {  # optional
        "column_type": Optional[str],
    },
    "metric": {  # optional
        "metric_key": Optional[str],
    },
    "job_output": {  # optional
        "job_name": Optional[str],
    },
    "width": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  columnId?: string;
  key?: string;
  displayName?: string;
  position?: number;
  active?: boolean;
  prompt?: {
    promptConfig: Record<string, any>;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    engine?: string;
    tools?: Record<string, any>[];
    knowledgeBases?: Record<string, any>[];
    metadata?: Record<string, any>;
    entityConfiguration?: Record<string, any>;
  };
  agent?: {
    agentKey?: string;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    messages?: Record<string, any>[];
    engine?: string;
    parentId?: string;
    agentTag?: string;
  };
  harness?: {
    harnessConfigId?: string;
  };
  openresponse?: Record<string, unknown>;
  evaluator?: {
    evaluatorId?: string;
    evaluatorName?: string;
    evaluatorType?: string;
    evaluatorOutputType?: string;
  };
  review?: {
    humanEvalId?: string;
    humanEvalName?: string;
    humanEvalType?: string;
  };
  dataset?: {
    columnType?: string;
  };
  metric?: {
    metricKey?: string;
  };
  jobOutput?: {
    jobName?: string;
  };
  width?: number;
}
```

### Delete Review

Remove a human review column

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    orq.experiments.delete_review(experiment_id="<id>", run_id="<id>", review_id="<id>")

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  await orq.experiments.deleteReview({
    experimentId: "<id>",
    runId: "<id>",
    reviewId: "<id>",
  });

}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "review_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  reviewId: string;  // required
}
```

### Update Review

Updates display fields on the column. The human-eval definition is updated at source.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.update_review(experiment_id="<id>", run_id="<id>", review_id="<id>", display_name="<value>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.updateReview({
    experimentId: "<id>",
    runId: "<id>",
    reviewId: "<id>",
    updateReviewColumnRequest: {
      displayName: "<value>",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "review_id": str,  # required
    "display_name": Optional[str],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  reviewId: string;  // required
  updateReviewColumnRequest: {  // required
    displayName?: string;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "column_id": Optional[str],
    "key": Optional[str],
    "display_name": Optional[str],
    "position": Optional[int],
    "active": Optional[bool],
    "prompt": {  # optional
        "prompt_config": Dict[str, Any],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "engine": Optional[str],
        "tools": List[Dict[str, Any]],  # optional
        "knowledge_bases": List[Dict[str, Any]],  # optional
        "metadata": Dict[str, Any],  # optional
        "entity_configuration": Dict[str, Any],  # optional
    },
    "agent": {  # optional
        "agent_key": Optional[str],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "messages": List[Dict[str, Any]],  # optional
        "engine": Optional[str],
        "parent_id": Optional[str],
        "agent_tag": Optional[str],
    },
    "harness": {  # optional
        "harness_config_id": Optional[str],
    },
    "openresponse": Dict[str, Any],  # optional
    "evaluator": {  # optional
        "evaluator_id": Optional[str],
        "evaluator_name": Optional[str],
        "evaluator_type": Optional[str],
        "evaluator_output_type": Optional[str],
    },
    "review": {  # optional
        "human_eval_id": Optional[str],
        "human_eval_name": Optional[str],
        "human_eval_type": Optional[str],
    },
    "dataset": {  # optional
        "column_type": Optional[str],
    },
    "metric": {  # optional
        "metric_key": Optional[str],
    },
    "job_output": {  # optional
        "job_name": Optional[str],
    },
    "width": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  columnId?: string;
  key?: string;
  displayName?: string;
  position?: number;
  active?: boolean;
  prompt?: {
    promptConfig: Record<string, any>;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    engine?: string;
    tools?: Record<string, any>[];
    knowledgeBases?: Record<string, any>[];
    metadata?: Record<string, any>;
    entityConfiguration?: Record<string, any>;
  };
  agent?: {
    agentKey?: string;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    messages?: Record<string, any>[];
    engine?: string;
    parentId?: string;
    agentTag?: string;
  };
  harness?: {
    harnessConfigId?: string;
  };
  openresponse?: Record<string, unknown>;
  evaluator?: {
    evaluatorId?: string;
    evaluatorName?: string;
    evaluatorType?: string;
    evaluatorOutputType?: string;
  };
  review?: {
    humanEvalId?: string;
    humanEvalName?: string;
    humanEvalType?: string;
  };
  dataset?: {
    columnType?: string;
  };
  metric?: {
    metricKey?: string;
  };
  jobOutput?: {
    jobName?: string;
  };
  width?: number;
}
```

### Patch Review Cell

Set a human review cell

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.patch_review_cell(experiment_id="<id>", run_id="<id>", review_id="<id>", datapoint_id="<id>", value={"quality": "good"})

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.patchReviewCell({
    experimentId: "<id>",
    runId: "<id>",
    reviewId: "<id>",
    datapointId: "<id>",
    patchReviewCellRequest: {
      value: { "<key>": "<value>" },
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "review_id": str,  # required
    "datapoint_id": str,  # required
    "value": Dict[str, Any],  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  reviewId: string;  // required
  datapointId: string;  // required
  patchReviewCellRequest: {  // required
    value?: Record<string, any>;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "cell_id": Optional[str],
    "row_id": Optional[str],
    "column_id": Optional[str],
    "repeat_index": Optional[int],
    "status": Optional[Literal["CELL_STATUS_UNSPECIFIED", "CELL_STATUS_NOT_RUN", "CELL_STATUS_QUEUED", "CELL_STATUS_RUNNING", "CELL_STATUS_COMPLETED", "CELL_STATUS_FAILED", "CELL_STATUS_CANCELED"]],
    "value": Dict[str, Any],  # optional
    "artifacts": {  # optional
        "trace_id": Optional[str],
        "response_id": Optional[str],
        "session_id": Optional[str],
        "session_run_id": Optional[str],
        "pull_request_url": Optional[str],
        "patch_object_key": Optional[str],
    },
    "progress": {  # optional
        "elapsed": Optional[str],
        "spend_usd": Optional[float],
        "activity": Optional[str],
    },
    "error_message": Optional[str],
    "type": Optional[Literal["CELL_TYPE_UNSPECIFIED", "CELL_TYPE_TEXT", "CELL_TYPE_NUMBER", "CELL_TYPE_INPUTS", "CELL_TYPE_MESSAGES", "CELL_TYPE_RESPONSE", "CELL_TYPE_AGENT_RESPONSE", "CELL_TYPE_EVALUATOR", "CELL_TYPE_METRIC", "CELL_TYPE_HUMAN_EVAL", "CELL_TYPE_OPENRESPONSE"]],
    "task_column_id": Optional[str],
    "created_at": str,  # optional
    "updated_at": str,  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  cellId?: string;
  rowId?: string;
  columnId?: string;
  repeatIndex?: number;
  status?: "CELL_STATUS_UNSPECIFIED" | "CELL_STATUS_NOT_RUN" | "CELL_STATUS_QUEUED" | "CELL_STATUS_RUNNING" | "CELL_STATUS_COMPLETED" | "CELL_STATUS_FAILED" | "CELL_STATUS_CANCELED";
  value?: Record<string, any>;
  artifacts?: {
    traceId?: string;
    responseId?: string;
    sessionId?: string;
    sessionRunId?: string;
    pullRequestUrl?: string;
    patchObjectKey?: string;
  };
  progress?: {
    elapsed?: string;
    spendUsd?: number;
    activity?: string;
  };
  errorMessage?: string;
  type?: "CELL_TYPE_UNSPECIFIED" | "CELL_TYPE_TEXT" | "CELL_TYPE_NUMBER" | "CELL_TYPE_INPUTS" | "CELL_TYPE_MESSAGES" | "CELL_TYPE_RESPONSE" | "CELL_TYPE_AGENT_RESPONSE" | "CELL_TYPE_EVALUATOR" | "CELL_TYPE_METRIC" | "CELL_TYPE_HUMAN_EVAL" | "CELL_TYPE_OPENRESPONSE";
  taskColumnId?: string;
  createdAt?: Date;
  updatedAt?: Date;
}
```

### Delete Rows

Deletes the given rows of a run and their cells.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    orq.experiments.delete_rows(experiment_id="<id>", run_id="<id>", row_ids=["<row_id>"])

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  await orq.experiments.deleteRows({
    experimentId: "<id>",
    runId: "<id>",
    deleteRowsRequest: {
      rowIds: ["<value>"],
    },
  });

}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "row_ids": List[str],  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  deleteRowsRequest: {  // required
    rowIds?: string[];
  };
}
```

### Update Run Cell

Writes a cell value by cell id, including dataset and review cells. An empty value clears the cell. Running cells cannot be changed.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.update_run_cell(experiment_id="<id>", run_id="<id>", row_id="<id>", cell_id="<id>", value={"<key>": "<value>"})

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.updateRunCell({
    experimentId: "<id>",
    runId: "<id>",
    rowId: "<id>",
    cellId: "<id>",
    updateRunCellRequest: {
      value: { "<key>": "<value>" },
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "row_id": str,  # required
    "cell_id": str,  # required
    "value": Dict[str, Any],  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  rowId: string;  // required
  cellId: string;  // required
  updateRunCellRequest: {  // required
    value?: Record<string, any>;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "cell_id": Optional[str],
    "row_id": Optional[str],
    "column_id": Optional[str],
    "repeat_index": Optional[int],
    "status": Optional[Literal["CELL_STATUS_UNSPECIFIED", "CELL_STATUS_NOT_RUN", "CELL_STATUS_QUEUED", "CELL_STATUS_RUNNING", "CELL_STATUS_COMPLETED", "CELL_STATUS_FAILED", "CELL_STATUS_CANCELED"]],
    "value": Dict[str, Any],  # optional
    "artifacts": {  # optional
        "trace_id": Optional[str],
        "response_id": Optional[str],
        "session_id": Optional[str],
        "session_run_id": Optional[str],
        "pull_request_url": Optional[str],
        "patch_object_key": Optional[str],
    },
    "progress": {  # optional
        "elapsed": Optional[str],
        "spend_usd": Optional[float],
        "activity": Optional[str],
    },
    "error_message": Optional[str],
    "type": Optional[Literal["CELL_TYPE_UNSPECIFIED", "CELL_TYPE_TEXT", "CELL_TYPE_NUMBER", "CELL_TYPE_INPUTS", "CELL_TYPE_MESSAGES", "CELL_TYPE_RESPONSE", "CELL_TYPE_AGENT_RESPONSE", "CELL_TYPE_EVALUATOR", "CELL_TYPE_METRIC", "CELL_TYPE_HUMAN_EVAL", "CELL_TYPE_OPENRESPONSE"]],
    "task_column_id": Optional[str],
    "created_at": str,  # optional
    "updated_at": str,  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  cellId?: string;
  rowId?: string;
  columnId?: string;
  repeatIndex?: number;
  status?: "CELL_STATUS_UNSPECIFIED" | "CELL_STATUS_NOT_RUN" | "CELL_STATUS_QUEUED" | "CELL_STATUS_RUNNING" | "CELL_STATUS_COMPLETED" | "CELL_STATUS_FAILED" | "CELL_STATUS_CANCELED";
  value?: Record<string, any>;
  artifacts?: {
    traceId?: string;
    responseId?: string;
    sessionId?: string;
    sessionRunId?: string;
    pullRequestUrl?: string;
    patchObjectKey?: string;
  };
  progress?: {
    elapsed?: string;
    spendUsd?: number;
    activity?: string;
  };
  errorMessage?: string;
  type?: "CELL_TYPE_UNSPECIFIED" | "CELL_TYPE_TEXT" | "CELL_TYPE_NUMBER" | "CELL_TYPE_INPUTS" | "CELL_TYPE_MESSAGES" | "CELL_TYPE_RESPONSE" | "CELL_TYPE_AGENT_RESPONSE" | "CELL_TYPE_EVALUATOR" | "CELL_TYPE_METRIC" | "CELL_TYPE_HUMAN_EVAL" | "CELL_TYPE_OPENRESPONSE";
  taskColumnId?: string;
  createdAt?: Date;
  updatedAt?: Date;
}
```

### Duplicate Row

Copies a row's dataset cells into a new row placed after the source. Task, evaluator, metric and review cells start empty.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.duplicate_row(experiment_id="<id>", run_id="<id>", row_id="<id>", duplicate_row_request={"<key>": "<value>"})

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.duplicateRow({
    experimentId: "<id>",
    runId: "<id>",
    rowId: "<id>",
    duplicateRowRequest: {
      "<key>": "<value>",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "row_id": str,  # required
    "duplicate_row_request": Dict[str, Any],  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  rowId: string;  // required
  duplicateRowRequest: Record<string, unknown>;  // required
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "row_id": Optional[str],
    "display_name": Optional[str],
    "cells": [{  # optional
        "cell_id": Optional[str],
        "row_id": Optional[str],
        "column_id": Optional[str],
        "repeat_index": Optional[int],
        "status": Optional[Literal["CELL_STATUS_UNSPECIFIED", "CELL_STATUS_NOT_RUN", "CELL_STATUS_QUEUED", "CELL_STATUS_RUNNING", "CELL_STATUS_COMPLETED", "CELL_STATUS_FAILED", "CELL_STATUS_CANCELED"]],
        "value": Dict[str, Any],  # optional
        "artifacts": {  # optional
            "trace_id": Optional[str],
            "response_id": Optional[str],
            "session_id": Optional[str],
            "session_run_id": Optional[str],
            "pull_request_url": Optional[str],
            "patch_object_key": Optional[str],
        },
        "progress": {  # optional
            "elapsed": Optional[str],
            "spend_usd": Optional[float],
            "activity": Optional[str],
        },
        "error_message": Optional[str],
        "type": Optional[Literal["CELL_TYPE_UNSPECIFIED", "CELL_TYPE_TEXT", "CELL_TYPE_NUMBER", "CELL_TYPE_INPUTS", "CELL_TYPE_MESSAGES", "CELL_TYPE_RESPONSE", "CELL_TYPE_AGENT_RESPONSE", "CELL_TYPE_EVALUATOR", "CELL_TYPE_METRIC", "CELL_TYPE_HUMAN_EVAL", "CELL_TYPE_OPENRESPONSE"]],
        "task_column_id": Optional[str],
        "created_at": str,  # optional
        "updated_at": str,  # optional
    }],
    "status": Optional[Literal["ROW_STATUS_UNSPECIFIED", "ROW_STATUS_NOT_RUN", "ROW_STATUS_QUEUED", "ROW_STATUS_RUNNING", "ROW_STATUS_COMPLETED", "ROW_STATUS_FAILED", "ROW_STATUS_CANCELED"]],
    "created_at": str,  # optional
    "updated_at": str,  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  rowId?: string;
  displayName?: string;
  cells?: {
    cellId?: string;
    rowId?: string;
    columnId?: string;
    repeatIndex?: number;
    status?: "CELL_STATUS_UNSPECIFIED" | "CELL_STATUS_NOT_RUN" | "CELL_STATUS_QUEUED" | "CELL_STATUS_RUNNING" | "CELL_STATUS_COMPLETED" | "CELL_STATUS_FAILED" | "CELL_STATUS_CANCELED";
    value?: Record<string, any>;
    artifacts?: {
      traceId?: string;
      responseId?: string;
      sessionId?: string;
      sessionRunId?: string;
      pullRequestUrl?: string;
      patchObjectKey?: string;
    };
    progress?: {
      elapsed?: string;
      spendUsd?: number;
      activity?: string;
    };
    errorMessage?: string;
    type?: "CELL_TYPE_UNSPECIFIED" | "CELL_TYPE_TEXT" | "CELL_TYPE_NUMBER" | "CELL_TYPE_INPUTS" | "CELL_TYPE_MESSAGES" | "CELL_TYPE_RESPONSE" | "CELL_TYPE_AGENT_RESPONSE" | "CELL_TYPE_EVALUATOR" | "CELL_TYPE_METRIC" | "CELL_TYPE_HUMAN_EVAL" | "CELL_TYPE_OPENRESPONSE";
    taskColumnId?: string;
    createdAt?: Date;
    updatedAt?: Date;
  }[];
  status?: "ROW_STATUS_UNSPECIFIED" | "ROW_STATUS_NOT_RUN" | "ROW_STATUS_QUEUED" | "ROW_STATUS_RUNNING" | "ROW_STATUS_COMPLETED" | "ROW_STATUS_FAILED" | "ROW_STATUS_CANCELED";
  createdAt?: Date;
  updatedAt?: Date;
}
```

### List Tasks

List task columns

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.list_tasks(experiment_id="<id>", run_id="<id>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.listTasks({
    experimentId: "<id>",
    runId: "<id>",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "data": [{  # optional
        "column_id": Optional[str],
        "key": Optional[str],
        "display_name": Optional[str],
        "position": Optional[int],
        "active": Optional[bool],
        "prompt": {  # optional
            "prompt_config": Dict[str, Any],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "engine": Optional[str],
            "tools": List[Dict[str, Any]],  # optional
            "knowledge_bases": List[Dict[str, Any]],  # optional
            "metadata": Dict[str, Any],  # optional
            "entity_configuration": Dict[str, Any],  # optional
        },
        "agent": {  # optional
            "agent_key": Optional[str],
            "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
            "messages": List[Dict[str, Any]],  # optional
            "engine": Optional[str],
            "parent_id": Optional[str],
            "agent_tag": Optional[str],
        },
        "harness": {  # optional
            "harness_config_id": Optional[str],
        },
        "openresponse": Dict[str, Any],  # optional
        "evaluator": {  # optional
            "evaluator_id": Optional[str],
            "evaluator_name": Optional[str],
            "evaluator_type": Optional[str],
            "evaluator_output_type": Optional[str],
        },
        "review": {  # optional
            "human_eval_id": Optional[str],
            "human_eval_name": Optional[str],
            "human_eval_type": Optional[str],
        },
        "dataset": {  # optional
            "column_type": Optional[str],
        },
        "metric": {  # optional
            "metric_key": Optional[str],
        },
        "job_output": {  # optional
            "job_name": Optional[str],
        },
        "width": Optional[int],
    }],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  data?: {
    columnId?: string;
    key?: string;
    displayName?: string;
    position?: number;
    active?: boolean;
    prompt?: {
      promptConfig: Record<string, any>;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    evaluator?: {
      evaluatorId?: string;
      evaluatorName?: string;
      evaluatorType?: string;
      evaluatorOutputType?: string;
    };
    review?: {
      humanEvalId?: string;
      humanEvalName?: string;
      humanEvalType?: string;
    };
    dataset?: {
      columnType?: string;
    };
    metric?: {
      metricKey?: string;
    };
    jobOutput?: {
      jobName?: string;
    };
    width?: number;
  }[];
}
```

### Create Task

Attaches a prompt, orq agent, or (reserved) harness config as a task column. Input mapping is required.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.create_task(experiment_id="<id>", run_id="<id>", display_name="<value>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.createTask({
    experimentId: "<id>",
    runId: "<id>",
    createTaskColumnRequest: {
      displayName: "<value>",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "display_name": Optional[str],
    "prompt": {  # optional
        "prompt_config": Dict[str, Any],  # required
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "engine": Optional[str],
        "tools": List[Dict[str, Any]],  # optional
        "knowledge_bases": List[Dict[str, Any]],  # optional
        "metadata": Dict[str, Any],  # optional
        "entity_configuration": Dict[str, Any],  # optional
    },
    "agent": {  # optional
        "agent_key": Optional[str],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "messages": List[Dict[str, Any]],  # optional
        "engine": Optional[str],
        "parent_id": Optional[str],
        "agent_tag": Optional[str],
    },
    "harness": {  # optional
        "harness_config_id": Optional[str],
    },
    "openresponse": Dict[str, Any],  # optional
    "position": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  createTaskColumnRequest: {  // required
    displayName?: string;
    prompt?: {
      promptConfig: Record<string, any>;  // required
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
    openresponse?: Record<string, unknown>;
    position?: number;
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "column_id": Optional[str],
    "key": Optional[str],
    "display_name": Optional[str],
    "position": Optional[int],
    "active": Optional[bool],
    "prompt": {  # optional
        "prompt_config": Dict[str, Any],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "engine": Optional[str],
        "tools": List[Dict[str, Any]],  # optional
        "knowledge_bases": List[Dict[str, Any]],  # optional
        "metadata": Dict[str, Any],  # optional
        "entity_configuration": Dict[str, Any],  # optional
    },
    "agent": {  # optional
        "agent_key": Optional[str],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "messages": List[Dict[str, Any]],  # optional
        "engine": Optional[str],
        "parent_id": Optional[str],
        "agent_tag": Optional[str],
    },
    "harness": {  # optional
        "harness_config_id": Optional[str],
    },
    "openresponse": Dict[str, Any],  # optional
    "evaluator": {  # optional
        "evaluator_id": Optional[str],
        "evaluator_name": Optional[str],
        "evaluator_type": Optional[str],
        "evaluator_output_type": Optional[str],
    },
    "review": {  # optional
        "human_eval_id": Optional[str],
        "human_eval_name": Optional[str],
        "human_eval_type": Optional[str],
    },
    "dataset": {  # optional
        "column_type": Optional[str],
    },
    "metric": {  # optional
        "metric_key": Optional[str],
    },
    "job_output": {  # optional
        "job_name": Optional[str],
    },
    "width": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  columnId?: string;
  key?: string;
  displayName?: string;
  position?: number;
  active?: boolean;
  prompt?: {
    promptConfig: Record<string, any>;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    engine?: string;
    tools?: Record<string, any>[];
    knowledgeBases?: Record<string, any>[];
    metadata?: Record<string, any>;
    entityConfiguration?: Record<string, any>;
  };
  agent?: {
    agentKey?: string;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    messages?: Record<string, any>[];
    engine?: string;
    parentId?: string;
    agentTag?: string;
  };
  harness?: {
    harnessConfigId?: string;
  };
  openresponse?: Record<string, unknown>;
  evaluator?: {
    evaluatorId?: string;
    evaluatorName?: string;
    evaluatorType?: string;
    evaluatorOutputType?: string;
  };
  review?: {
    humanEvalId?: string;
    humanEvalName?: string;
    humanEvalType?: string;
  };
  dataset?: {
    columnType?: string;
  };
  metric?: {
    metricKey?: string;
  };
  jobOutput?: {
    jobName?: string;
  };
  width?: number;
}
```

### Delete Task

Delete a task column

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    orq.experiments.delete_task(experiment_id="<id>", run_id="<id>", task_id="<id>")

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  await orq.experiments.deleteTask({
    experimentId: "<id>",
    runId: "<id>",
    taskId: "<id>",
  });

}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "task_id": str,  # required
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  taskId: string;  // required
}
```

### Update Task

Updates an unlinked task column in place.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.update_task(experiment_id="<id>", run_id="<id>", task_id="<id>", display_name="<value>")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.updateTask({
    experimentId: "<id>",
    runId: "<id>",
    taskId: "<id>",
    updateTaskColumnRequest: {
      displayName: "<value>",
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "task_id": str,  # required
    "display_name": Optional[str],
    "prompt": {  # optional
        "prompt_config": Dict[str, Any],  # required
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "engine": Optional[str],
        "tools": List[Dict[str, Any]],  # optional
        "knowledge_bases": List[Dict[str, Any]],  # optional
        "metadata": Dict[str, Any],  # optional
        "entity_configuration": Dict[str, Any],  # optional
    },
    "agent": {  # optional
        "agent_key": Optional[str],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "messages": List[Dict[str, Any]],  # optional
        "engine": Optional[str],
        "parent_id": Optional[str],
        "agent_tag": Optional[str],
    },
    "harness": {  # optional
        "harness_config_id": Optional[str],
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  taskId: string;  // required
  updateTaskColumnRequest: {  // required
    displayName?: string;
    prompt?: {
      promptConfig: Record<string, any>;  // required
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      engine?: string;
      tools?: Record<string, any>[];
      knowledgeBases?: Record<string, any>[];
      metadata?: Record<string, any>;
      entityConfiguration?: Record<string, any>;
    };
    agent?: {
      agentKey?: string;
      messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
      messages?: Record<string, any>[];
      engine?: string;
      parentId?: string;
      agentTag?: string;
    };
    harness?: {
      harnessConfigId?: string;
    };
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "column_id": Optional[str],
    "key": Optional[str],
    "display_name": Optional[str],
    "position": Optional[int],
    "active": Optional[bool],
    "prompt": {  # optional
        "prompt_config": Dict[str, Any],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "engine": Optional[str],
        "tools": List[Dict[str, Any]],  # optional
        "knowledge_bases": List[Dict[str, Any]],  # optional
        "metadata": Dict[str, Any],  # optional
        "entity_configuration": Dict[str, Any],  # optional
    },
    "agent": {  # optional
        "agent_key": Optional[str],
        "messages_source": Optional[Literal["MESSAGES_SOURCE_UNSPECIFIED", "MESSAGES_SOURCE_PROMPT_CONFIG", "MESSAGES_SOURCE_MESSAGES_COLUMN", "MESSAGES_SOURCE_COMBINED"]],
        "messages": List[Dict[str, Any]],  # optional
        "engine": Optional[str],
        "parent_id": Optional[str],
        "agent_tag": Optional[str],
    },
    "harness": {  # optional
        "harness_config_id": Optional[str],
    },
    "openresponse": Dict[str, Any],  # optional
    "evaluator": {  # optional
        "evaluator_id": Optional[str],
        "evaluator_name": Optional[str],
        "evaluator_type": Optional[str],
        "evaluator_output_type": Optional[str],
    },
    "review": {  # optional
        "human_eval_id": Optional[str],
        "human_eval_name": Optional[str],
        "human_eval_type": Optional[str],
    },
    "dataset": {  # optional
        "column_type": Optional[str],
    },
    "metric": {  # optional
        "metric_key": Optional[str],
    },
    "job_output": {  # optional
        "job_name": Optional[str],
    },
    "width": Optional[int],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  columnId?: string;
  key?: string;
  displayName?: string;
  position?: number;
  active?: boolean;
  prompt?: {
    promptConfig: Record<string, any>;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    engine?: string;
    tools?: Record<string, any>[];
    knowledgeBases?: Record<string, any>[];
    metadata?: Record<string, any>;
    entityConfiguration?: Record<string, any>;
  };
  agent?: {
    agentKey?: string;
    messagesSource?: "MESSAGES_SOURCE_UNSPECIFIED" | "MESSAGES_SOURCE_PROMPT_CONFIG" | "MESSAGES_SOURCE_MESSAGES_COLUMN" | "MESSAGES_SOURCE_COMBINED";
    messages?: Record<string, any>[];
    engine?: string;
    parentId?: string;
    agentTag?: string;
  };
  harness?: {
    harnessConfigId?: string;
  };
  openresponse?: Record<string, unknown>;
  evaluator?: {
    evaluatorId?: string;
    evaluatorName?: string;
    evaluatorType?: string;
    evaluatorOutputType?: string;
  };
  review?: {
    humanEvalId?: string;
    humanEvalName?: string;
    humanEvalType?: string;
  };
  dataset?: {
    columnType?: string;
  };
  metric?: {
    metricKey?: string;
  };
  jobOutput?: {
    jobName?: string;
  };
  width?: number;
}
```

### Patch Task Cell

Writes a cell result, including externally executed or harness cells.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.patch_task_cell(experiment_id="<id>", run_id="<id>", task_id="<id>", datapoint_id="<id>", repeat_index=0)

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.patchTaskCell({
    experimentId: "<id>",
    runId: "<id>",
    taskId: "<id>",
    datapointId: "<id>",
    patchTaskCellRequest: {
      repeatIndex: 0,
    },
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "task_id": str,  # required
    "datapoint_id": str,  # required
    "repeat_index": Optional[int],
    "value": Dict[str, Any],  # optional
    "artifacts": {  # optional
        "trace_id": Optional[str],
        "response_id": Optional[str],
        "session_id": Optional[str],
        "session_run_id": Optional[str],
        "pull_request_url": Optional[str],
        "patch_object_key": Optional[str],
    },
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  taskId: string;  // required
  datapointId: string;  // required
  patchTaskCellRequest: {  // required
    repeatIndex?: number;
    value?: Record<string, any>;
    artifacts?: {
      traceId?: string;
      responseId?: string;
      sessionId?: string;
      sessionRunId?: string;
      pullRequestUrl?: string;
      patchObjectKey?: string;
    };
  };
}
```

**Response**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "cell_id": Optional[str],
    "row_id": Optional[str],
    "column_id": Optional[str],
    "repeat_index": Optional[int],
    "status": Optional[Literal["CELL_STATUS_UNSPECIFIED", "CELL_STATUS_NOT_RUN", "CELL_STATUS_QUEUED", "CELL_STATUS_RUNNING", "CELL_STATUS_COMPLETED", "CELL_STATUS_FAILED", "CELL_STATUS_CANCELED"]],
    "value": Dict[str, Any],  # optional
    "artifacts": {  # optional
        "trace_id": Optional[str],
        "response_id": Optional[str],
        "session_id": Optional[str],
        "session_run_id": Optional[str],
        "pull_request_url": Optional[str],
        "patch_object_key": Optional[str],
    },
    "progress": {  # optional
        "elapsed": Optional[str],
        "spend_usd": Optional[float],
        "activity": Optional[str],
    },
    "error_message": Optional[str],
    "type": Optional[Literal["CELL_TYPE_UNSPECIFIED", "CELL_TYPE_TEXT", "CELL_TYPE_NUMBER", "CELL_TYPE_INPUTS", "CELL_TYPE_MESSAGES", "CELL_TYPE_RESPONSE", "CELL_TYPE_AGENT_RESPONSE", "CELL_TYPE_EVALUATOR", "CELL_TYPE_METRIC", "CELL_TYPE_HUMAN_EVAL", "CELL_TYPE_OPENRESPONSE"]],
    "task_column_id": Optional[str],
    "created_at": str,  # optional
    "updated_at": str,  # optional
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  cellId?: string;
  rowId?: string;
  columnId?: string;
  repeatIndex?: number;
  status?: "CELL_STATUS_UNSPECIFIED" | "CELL_STATUS_NOT_RUN" | "CELL_STATUS_QUEUED" | "CELL_STATUS_RUNNING" | "CELL_STATUS_COMPLETED" | "CELL_STATUS_FAILED" | "CELL_STATUS_CANCELED";
  value?: Record<string, any>;
  artifacts?: {
    traceId?: string;
    responseId?: string;
    sessionId?: string;
    sessionRunId?: string;
    pullRequestUrl?: string;
    patchObjectKey?: string;
  };
  progress?: {
    elapsed?: string;
    spendUsd?: number;
    activity?: string;
  };
  errorMessage?: string;
  type?: "CELL_TYPE_UNSPECIFIED" | "CELL_TYPE_TEXT" | "CELL_TYPE_NUMBER" | "CELL_TYPE_INPUTS" | "CELL_TYPE_MESSAGES" | "CELL_TYPE_RESPONSE" | "CELL_TYPE_AGENT_RESPONSE" | "CELL_TYPE_EVALUATOR" | "CELL_TYPE_METRIC" | "CELL_TYPE_HUMAN_EVAL" | "CELL_TYPE_OPENRESPONSE";
  taskColumnId?: string;
  createdAt?: Date;
  updatedAt?: Date;
}
```

### Export Run

Downloads the run as a file, including human review and evaluator corrections made after an earlier export.

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY"),
) as orq:

    res = orq.experiments.export_run(experiment_id="<id>", run_id="<id>", format_="json")

    # Handle response
    print(res)

```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { Orq } from "@orq-ai/node";

const orq = new Orq({
  apiKey: process.env["ORQ_API_KEY"] ?? "",
});

async function run() {
  const result = await orq.experiments.exportRun({
    experimentId: "<id>",
    runId: "<id>",
    format: "json",
  });

  console.log(result);
}

run();
```

**Parameters**

```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "experiment_id": str,  # required
    "run_id": str,  # required
    "format_": Optional[Literal["csv", "json", "jsonl"]],
}
```

```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  experimentId: string;  // required
  runId: string;  // required
  format?: "csv" | "json" | "jsonl";
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.