Experiments
List Experiments
Lists experiments in the workspace, newest first.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)
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();
Show Parameters
Show Parameters
{
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"project_id": Optional[str],
}
{
limit?: number;
startingAfter?: string;
endingBefore?: string;
projectId?: string;
}
Show Response
Show Response
{
"data": [{ # optional
"experiment_id": Optional[str],
"display_name": Optional[str],
"project_id": Optional[str],
"dataset_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],
}
{
data?: {
experimentId?: string;
displayName?: string;
projectId?: string;
datasetId?: 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 and its first run, a draft named Run 1. When dataset_id is set, the run gets one row per datapoint, up to 1000. project_id defaults to the caller’s project and is required for API keys that span several projects.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="Customer churn experiment")
# Handle response
print(res)
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: "Customer churn experiment",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"display_name": str, # required
"project_id": Optional[str],
"dataset_id": Optional[str],
"source_run": { # optional
"experiment_id": str, # required
"run_id": str, # required
},
}
{
displayName: string; // required
projectId?: string;
datasetId?: string;
sourceRun?: {
experimentId: string; // required
runId: string; // required
};
}
Show Response
Show Response
{
"experiment_id": Optional[str],
"display_name": Optional[str],
"project_id": Optional[str],
"dataset_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],
}
{
experimentId?: string;
displayName?: string;
projectId?: string;
datasetId?: 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.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
}
{
experimentId: string; // required
}
Show Response
Show Response
{
"experiment_id": Optional[str],
"display_name": Optional[str],
"project_id": Optional[str],
"dataset_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],
}
{
experimentId?: string;
displayName?: string;
projectId?: string;
datasetId?: 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 with all its runs, rows and cells.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>")
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
}
{
experimentId: string; // required
}
Update an Experiment
Updates experiment metadata. Omitted optional fields keep their current values.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"display_name": Optional[str],
"selected_run_id": Optional[str],
"row_height_level": Optional[int],
"project_id": Optional[str],
}
{
experimentId: string; // required
updateExperimentRequest: { // required
displayName?: string;
selectedRunId?: string;
rowHeightLevel?: number;
projectId?: string;
};
}
Show Response
Show Response
{
"experiment_id": Optional[str],
"display_name": Optional[str],
"project_id": Optional[str],
"dataset_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],
}
{
experimentId?: string;
displayName?: string;
projectId?: string;
datasetId?: 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.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"limit": Optional[int],
"starting_after": Optional[str],
"ending_before": Optional[str],
"include_metrics": Optional[bool],
}
{
experimentId: string; // required
limit?: number;
startingAfter?: string;
endingBefore?: string;
includeMetrics?: boolean;
}
Show Response
Show Response
{
"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],
"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": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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_errors": Optional[int],
"total_done": Optional[int],
},
"created_by_id": Optional[str],
}],
"has_more": Optional[bool],
}
{
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;
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: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: 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;
totalErrors?: number;
totalDone?: number;
};
createdById?: string;
}[];
hasMore?: boolean;
}
Create Run
Creates a new run, copying columns from the selected run when present. A new run starts with empty output cells; executing cells on an existing run does not create one.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)
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();
Show Parameters
Show Parameters
{
"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
},
}
{
experimentId: string; // required
createRunRequest: { // required
key?: string;
settings?: {
concurrency?: number;
timeout?: string;
maxTurns?: number;
hiddenColumnIds?: string[];
};
};
}
Show Response
Show Response
{
"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],
"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": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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_errors": Optional[int],
"total_done": Optional[int],
},
"created_by_id": Optional[str],
}
{
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;
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: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: 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;
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.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
}
Show Response
Show Response
{
"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],
"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": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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_errors": Optional[int],
"total_done": Optional[int],
},
"created_by_id": Optional[str],
}
{
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;
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: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: 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;
totalErrors?: number;
totalDone?: number;
};
createdById?: string;
}
Delete Run
Deletes a run and its cell data. The last run of an experiment cannot be deleted. Distinct from cancel, which keeps completed cells.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>")
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
}
Update Run
Updates run key and execution settings. Does not execute the run.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)
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();
Show Parameters
Show Parameters
{
"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
},
}
{
experimentId: string; // required
runId: string; // required
updateRunRequest: { // required
key?: string;
settings?: {
concurrency?: number;
timeout?: string;
maxTurns?: number;
hiddenColumnIds?: string[];
};
};
}
Show Response
Show Response
{
"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],
"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": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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_errors": Optional[int],
"total_done": Optional[int],
},
"created_by_id": Optional[str],
}
{
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;
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: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: 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;
totalErrors?: number;
totalDone?: number;
};
createdById?: string;
}
List Annotations
Lists the annotation columns of a run.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
res = orq.experiments.list_annotations(experiment_id="<id>", run_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.experiments.listAnnotations({
experimentId: "<id>",
runId: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
}
Show Response
Show Response
{
"data": [{ # optional
"column_id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"position": Optional[int],
"active": Optional[bool],
"prompt": { # optional
"prompt_config": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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],
}],
}
{
data?: {
columnId?: string;
key?: string;
displayName?: string;
position?: number;
active?: boolean;
prompt?: {
promptConfig: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: string;
};
dataset?: {
columnType?: string;
};
metric?: {
metricKey?: string;
};
jobOutput?: {
jobName?: string;
};
width?: number;
}[];
}
Create Annotation
Adds an annotation column. Each row gets one annotation cell per task column.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
res = orq.experiments.create_annotation(experiment_id="<id>", run_id="<id>", annotation_id="<id>", display_name="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.experiments.createAnnotation({
experimentId: "<id>",
runId: "<id>",
createAnnotationColumnRequest: {
annotationId: "<id>",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"annotation_id": str, # required
"display_name": Optional[str],
"annotation_type": Optional[str],
"position": Optional[int],
}
{
experimentId: string; // required
runId: string; // required
createAnnotationColumnRequest: { // required
annotationId: string; // required
displayName?: string;
annotationType?: string;
position?: number;
};
}
Show Response
Show Response
{
"column_id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"position": Optional[int],
"active": Optional[bool],
"prompt": { # optional
"prompt_config": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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],
}
{
columnId?: string;
key?: string;
displayName?: string;
position?: number;
active?: boolean;
prompt?: {
promptConfig: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: string;
};
dataset?: {
columnType?: string;
};
metric?: {
metricKey?: string;
};
jobOutput?: {
jobName?: string;
};
width?: number;
}
Delete Annotation
Removes an annotation column and all its cells.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
orq.experiments.delete_annotation(experiment_id="<id>", run_id="<id>", annotation_column_id="<id>")
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
await orq.experiments.deleteAnnotation({
experimentId: "<id>",
runId: "<id>",
annotationColumnId: "<id>",
});
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"annotation_column_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
annotationColumnId: string; // required
}
Update Annotation
Updates display fields on the column. The human-eval definition is updated at source.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
res = orq.experiments.update_annotation(experiment_id="<id>", run_id="<id>", annotation_column_id="<id>", display_name="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.experiments.updateAnnotation({
experimentId: "<id>",
runId: "<id>",
annotationColumnId: "<id>",
updateAnnotationColumnRequest: {
displayName: "<value>",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"annotation_column_id": str, # required
"display_name": Optional[str],
}
{
experimentId: string; // required
runId: string; // required
annotationColumnId: string; // required
updateAnnotationColumnRequest: { // required
displayName?: string;
};
}
Show Response
Show Response
{
"column_id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"position": Optional[int],
"active": Optional[bool],
"prompt": { # optional
"prompt_config": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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],
}
{
columnId?: string;
key?: string;
displayName?: string;
position?: number;
active?: boolean;
prompt?: {
promptConfig: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: string;
};
dataset?: {
columnType?: string;
};
metric?: {
metricKey?: string;
};
jobOutput?: {
jobName?: string;
};
width?: number;
}
Patch Annotation Cell
Writes the annotation value of one row for one task column. An annotation column holds one cell per task column, so task_id selects which response is being annotated. The task output of that row must be completed. The value must match the annotation type, and a running cell cannot be changed.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
res = orq.experiments.patch_annotation_cell(experiment_id="<id>", run_id="<id>", annotation_column_id="<id>", datapoint_id="<id>", value={
"key": "<value>",
"key1": "<value>",
"key2": "<value>",
}, task_id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.experiments.patchAnnotationCell({
experimentId: "<id>",
runId: "<id>",
annotationColumnId: "<id>",
datapointId: "<id>",
patchAnnotationCellRequest: {
value: {
"key": "<value>",
"key1": "<value>",
"key2": "<value>",
},
taskId: "<id>",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"annotation_column_id": str, # required
"datapoint_id": str, # required
"value": Dict[str, Any], # required
"task_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
annotationColumnId: string; // required
datapointId: string; // required
patchAnnotationCellRequest: { // required
value: Record<string, any>; // required
taskId: string; // required
};
}
Show Response
Show Response
{
"cell_id": Optional[str],
"row_id": Optional[str],
"column_id": Optional[str],
"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],
},
"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_ANNOTATION", "CELL_TYPE_OPENRESPONSE"]],
"task_column_id": Optional[str],
"created_at": str, # optional
"updated_at": str, # optional
}
{
cellId?: string;
rowId?: string;
columnId?: string;
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;
};
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_ANNOTATION" | "CELL_TYPE_OPENRESPONSE";
taskColumnId?: string;
createdAt?: Date;
updatedAt?: Date;
}
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.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"row_ids": List[str], # optional
}
{
experimentId: string; // required
runId: string; // required
cancelExperimentRunRequest: { // required
rowIds?: string[];
};
}
Show Response
Show Response
{
"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],
"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": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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_errors": Optional[int],
"total_done": Optional[int],
},
"created_by_id": Optional[str],
}
{
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;
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: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: 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;
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.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=[])
# Handle response
print(res)
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: [],
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"columns": [{ # required
"column_id": str, # required
"position": Optional[int],
"width": Optional[int],
"active": Optional[bool],
}],
}
{
experimentId: string; // required
runId: string; // required
updateRunColumnLayoutRequest: { // required
columns: { // required
columnId: string; // required
position?: number;
width?: number;
active?: boolean;
}[];
};
}
Show Response
Show Response
{
"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],
"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": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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_errors": Optional[int],
"total_done": Optional[int],
},
"created_by_id": Optional[str],
}
{
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;
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: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: 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;
totalErrors?: number;
totalDone?: number;
};
createdById?: string;
}
List Evals
Lists the evaluator columns of a run.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
}
Show Response
Show Response
{
"data": [{ # optional
"column_id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"position": Optional[int],
"active": Optional[bool],
"prompt": { # optional
"prompt_config": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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],
}],
}
{
data?: {
columnId?: string;
key?: string;
displayName?: string;
position?: number;
active?: boolean;
prompt?: {
promptConfig: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: string;
};
dataset?: {
columnType?: string;
};
metric?: {
metricKey?: string;
};
jobOutput?: {
jobName?: string;
};
width?: number;
}[];
}
Create Eval
Links an existing evaluator. Each row gets one evaluator cell per task column. Config is updated at the evaluator source, not here.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>", evaluator_id="<id>", position=0)
# Handle response
print(res)
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: {
evaluatorId: "<id>",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"evaluator_id": str, # required
"position": Optional[int],
}
{
experimentId: string; // required
runId: string; // required
createEvalColumnRequest: { // required
evaluatorId: string; // required
position?: number;
};
}
Show Response
Show Response
{
"column_id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"position": Optional[int],
"active": Optional[bool],
"prompt": { # optional
"prompt_config": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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],
}
{
columnId?: string;
key?: string;
displayName?: string;
position?: number;
active?: boolean;
prompt?: {
promptConfig: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: string;
};
dataset?: {
columnType?: string;
};
metric?: {
metricKey?: string;
};
jobOutput?: {
jobName?: string;
};
width?: number;
}
Delete Eval
Removes an evaluator column and all its cells.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>")
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"eval_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
evalId: string; // required
}
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 and metric 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.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_COLUMN")
# Handle response
print(res)
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_COLUMN",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"scope": Literal["EXECUTE_SCOPE_UNSPECIFIED", "EXECUTE_SCOPE_CELL", "EXECUTE_SCOPE_ROW", "EXECUTE_SCOPE_COLUMN", "EXECUTE_SCOPE_PARTIAL", "EXECUTE_SCOPE_FULL"], # required
"targets": [{ # optional
"row_id": Optional[str],
"column_id": Optional[str],
"column_key": Optional[str],
"source_column_id": Optional[str],
}],
"constraints": { # optional
"llm": { # optional
"max_turns": Optional[int],
"timeout": Optional[str],
"concurrency": Optional[int],
},
},
}
{
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"; // required
targets?: {
rowId?: string;
columnId?: string;
columnKey?: string;
sourceColumnId?: string;
}[];
constraints?: {
llm?: {
maxTurns?: number;
timeout?: string;
concurrency?: number;
};
};
};
}
Show Response
Show Response
{
"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],
"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": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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_errors": Optional[int],
"total_done": Optional[int],
},
"created_by_id": Optional[str],
}
{
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;
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: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: 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;
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.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"baseline_run_id": Optional[str],
}
{
experimentId: string; // required
runId: string; // required
baselineRunId?: string;
}
Show Response
Show Response
{
"metrics": Dict[str, MetricSummary], # optional
}
{
metrics?: Record<string, MetricSummary>;
}
Query Run
Returns the rows of a run with their cells, filtered by row and column. POST because selections can exceed URL limits.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"rows": List[str], # optional
"columns": List[str], # optional
"limit": Optional[int],
"starting_after": Optional[str],
"updated_after": str, # optional
"partial_rows": Optional[bool],
"exclude_static_cells": Optional[bool],
}
{
experimentId: string; // required
runId: string; // required
queryRunRequest: { // required
rows?: string[];
columns?: string[];
limit?: number;
startingAfter?: string;
updatedAfter?: Date;
partialRows?: boolean;
excludeStaticCells?: boolean;
};
}
Show Response
Show Response
{
"rows": [{ # optional
"row_id": Optional[str],
"cells": [{ # optional
"cell_id": Optional[str],
"row_id": Optional[str],
"column_id": Optional[str],
"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],
},
"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_ANNOTATION", "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
}
{
rows?: {
rowId?: string;
cells?: {
cellId?: string;
rowId?: string;
columnId?: string;
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;
};
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_ANNOTATION" | "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;
}
Delete Rows
Deletes the given rows of a run and their cells.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=[
"<value 1>",
"<value 2>",
"<value 3>",
])
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 1>",
"<value 2>",
"<value 3>",
],
},
});
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"row_ids": List[str], # required
}
{
experimentId: string; // required
runId: string; // required
deleteRowsRequest: { // required
rowIds: string[]; // required
};
}
Duplicate Row
Copies a row into a new row at the end of the run. Dataset and annotation cells keep their values; response, agent response, open response, evaluator and metric cells start empty.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"row_id": str, # required
"duplicate_row_request": Dict[str, Any], # required
}
{
experimentId: string; // required
runId: string; // required
rowId: string; // required
duplicateRowRequest: Record<string, unknown>; // required
}
Show Response
Show Response
{
"row_id": Optional[str],
"cells": [{ # optional
"cell_id": Optional[str],
"row_id": Optional[str],
"column_id": Optional[str],
"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],
},
"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_ANNOTATION", "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
}
{
rowId?: string;
cells?: {
cellId?: string;
rowId?: string;
columnId?: string;
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;
};
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_ANNOTATION" | "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
Lists the task columns of a run: prompt, agent and openresponse columns.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
}
Show Response
Show Response
{
"data": [{ # optional
"column_id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"position": Optional[int],
"active": Optional[bool],
"prompt": { # optional
"prompt_config": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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],
}],
}
{
data?: {
columnId?: string;
key?: string;
displayName?: string;
position?: number;
active?: boolean;
prompt?: {
promptConfig: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: string;
};
dataset?: {
columnType?: string;
};
metric?: {
metricKey?: string;
};
jobOutput?: {
jobName?: string;
};
width?: number;
}[];
}
Create Task
Adds a task column with one source: a prompt, an agent, or an openresponse column filled outside orq.ai. Every existing row gets a cell for it, and the first task column also adds cost and latency metric columns.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="Summarize ticket")
# Handle response
print(res)
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: "Summarize ticket",
},
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"display_name": str, # required
"prompt": { # optional
"prompt_config": { # required
"model": str, # required
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"position": Optional[int],
}
{
experimentId: string; // required
runId: string; // required
createTaskColumnRequest: { // required
displayName: string; // required
prompt?: {
promptConfig: { // required
model: string; // required
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
position?: number;
};
}
Show Response
Show Response
{
"column_id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"position": Optional[int],
"active": Optional[bool],
"prompt": { # optional
"prompt_config": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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],
}
{
columnId?: string;
key?: string;
displayName?: string;
position?: number;
active?: boolean;
prompt?: {
promptConfig: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: string;
};
dataset?: {
columnType?: string;
};
metric?: {
metricKey?: string;
};
jobOutput?: {
jobName?: string;
};
width?: number;
}
Delete Task
Deletes a task column with its cells and the evaluator, metric and annotation cells linked to it. Deleting the last task column also removes the metric columns.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>")
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"task_id": str, # required
}
{
experimentId: string; // required
runId: string; // required
taskId: string; // required
}
Update Task
Renames a task column or replaces its source. Existing cells are not changed.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"task_id": str, # required
"display_name": Optional[str],
"prompt": { # optional
"prompt_config": { # required
"model": str, # required
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
}
{
experimentId: string; // required
runId: string; // required
taskId: string; // required
updateTaskColumnRequest: { // required
displayName?: string;
prompt?: {
promptConfig: { // required
model: string; // required
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
};
}
Show Response
Show Response
{
"column_id": Optional[str],
"key": Optional[str],
"display_name": Optional[str],
"position": Optional[int],
"active": Optional[bool],
"prompt": { # optional
"prompt_config": {
"model": str,
"provider": Optional[str],
"messages": List[Dict[str, Any]], # optional
"model_parameters": Dict[str, Any], # optional
"model_db_id": Optional[str],
"model_type": Optional[str],
"integration_id": Optional[str],
"stream": Optional[bool],
"version": Optional[str],
},
"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
},
"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],
},
"openresponse": Dict[str, Any], # optional
"evaluator": { # optional
"evaluator_id": Optional[str],
"evaluator_name": Optional[str],
"evaluator_type": Optional[str],
"evaluator_output_type": Optional[str],
},
"annotation": { # optional
"annotation_id": Optional[str],
"annotation_name": Optional[str],
"annotation_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],
}
{
columnId?: string;
key?: string;
displayName?: string;
position?: number;
active?: boolean;
prompt?: {
promptConfig: {
model: string;
provider?: string;
messages?: Record<string, unknown>[];
modelParameters?: Record<string, any>;
modelDbId?: string;
modelType?: string;
integrationId?: string;
stream?: boolean;
version?: string;
};
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>;
};
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;
};
openresponse?: Record<string, unknown>;
evaluator?: {
evaluatorId?: string;
evaluatorName?: string;
evaluatorType?: string;
evaluatorOutputType?: string;
};
annotation?: {
annotationId?: string;
annotationName?: string;
annotationType?: string;
};
dataset?: {
columnType?: string;
};
metric?: {
metricKey?: string;
};
jobOutput?: {
jobName?: string;
};
width?: number;
}
Export Run
Downloads the run as a file, including annotations and evaluator corrections made after an earlier export.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)
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();
Show Parameters
Show Parameters
{
"experiment_id": str, # required
"run_id": str, # required
"format_": Optional[Literal["csv", "json", "jsonl"]],
}
{
experimentId: string; // required
runId: string; // required
format?: "csv" | "json" | "jsonl";
}