Agents
Update an Agent
Partially update an existing agent configuration including models, instructions, tools, knowledge bases, and execution parameters.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
res = orq.agents.update(agent_key="<value>", model="openai/gpt-6-astra", fallback_models=[
"<value>",
], settings={
"tools": [
{
"type": "mcp",
"id": "<id>",
"tool_id": "<id>",
"requires_approval": False,
},
],
}, path="Default", knowledge_bases=[
{
"knowledge_id": "customer-knowledge-base",
},
])
# 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.agents.update({
model: "openai/gpt-6-astra",
fallbackModels: [
"<value>",
],
settings: {
tools: [
{
type: "mcp",
id: "<id>",
toolId: "<id>",
requiresApproval: false,
},
],
},
path: "Default",
knowledgeBases: [
{
knowledgeId: "customer-knowledge-base",
},
],
}, "<value>");
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"agent_key": str, # required
"key": Optional[str],
"display_name": Optional[str],
"project_id": Optional[str],
"role": Optional[str],
"description": Optional[str],
"instructions": Optional[str],
"system_prompt": Optional[str],
"model": { # optional
# one of: UpdateAgentModelConfiguration2, str
"id": str, # required
"parameters": { # optional
"name": Optional[str],
"frequency_penalty": Optional[float],
"max_tokens": Optional[int],
"max_completion_tokens": Optional[int],
"presence_penalty": Optional[float],
"response_format": { # optional
# one of: UpdateAgentResponseFormatText, UpdateAgentResponseFormatJSONObject, UpdateAgentResponseFormatJSONSchema
"type": Union[Union[Literal["text"], Literal["json_object"]], Literal["json_schema"]], # required
"json_schema": { # required (variant-specific)
"description": Optional[str],
"name": str, # required
"schema_": Optional[Any],
"strict": Optional[bool],
},
},
"reasoning_effort": Optional[Literal["none", "instant", "minimal", "low", "medium", "high", "xhigh", "max"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"thinking": { # optional
# one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
"type": Union[Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]], Literal["between_tools"]], # required
"budget_tokens": Union[float, Optional[float]], # required (variant-specific)
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
"display": Optional[Literal["summarized", "omitted", "updates"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: UpdateAgentToolChoice1, UpdateAgentToolChoice2
"type": Optional[Literal["function"]],
"function": { # required (variant-specific)
"name": str, # required
},
},
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[Literal["orq_pii_detection", "orq_secret_detection", "orq_sexual_moderation", "orq_harmful_moderation"], str], # required
"execute_on": Literal["input", "output"], # required
}],
"plugins": List[Union[PIIRedactionPlugin, ResponseHealingPlugin, TraceScrubbingPlugin]], # optional
"fallback_on_codes": List[int], # optional
"fallbacks": [{ # optional
"model": str, # required
}],
"cache": { # optional
"ttl": Optional[float],
"type": Literal["exact_match"], # required
},
"load_balancer": { # optional
# one of: UpdateAgentLoadBalancer1
"type": Literal["weight_based"], # required
"models": [{ # required
"model": str, # required
"weight": Optional[float],
}],
},
"timeout": { # optional
"call_timeout": float, # required
},
"cache_control": { # optional
"type": Literal["ephemeral"], # required
"ttl": Optional[Literal["5m", "1h"]],
},
"prompt_cache_key": Optional[str],
},
"retry": { # optional
"count": Optional[float],
"on_codes": List[float], # optional
},
},
"fallback_models": List[Union[str, UpdateAgentFallbackModelConfiguration2]], # optional
"settings": { # optional
"max_iterations": Optional[int],
"max_execution_time": Optional[int],
"max_cost": Optional[float],
"tool_approval_required": Optional[Literal["all", "respect_tool", "none"]],
"chat_exposed": Optional[bool],
"tools": List[Union[GoogleSearchToolInput, WebScraperToolInput, CallSubAgentToolInput, RetrieveAgentsToolInput, QueryMemoryStoreToolInput, WriteMemoryStoreToolInput, RetrieveMemoryStoresToolInput, DeleteMemoryDocumentToolInput, RetrieveKnowledgeBasesToolInput, QueryKnowledgeBaseToolInput, CurrentDateToolInput, AdvisorToolInput, SidekickToolInput, CodeInterpreterToolInput, FileSystemToolInput, HTTPToolInput, CodeToolInput, FunctionToolInput, JSONSchemaToolInput, McpToolInput]], # optional
"evaluators": [{ # optional
"id": str, # required
"sample_rate": Optional[float],
"execute_on": Literal["input", "output"], # required
}],
"guardrails": [{ # optional
"id": str, # required
"sample_rate": Optional[float],
"execute_on": Literal["input", "output"], # required
}],
},
"path": Optional[str],
"memory_stores": List[str], # optional
"knowledge_bases": [{ # optional
"knowledge_id": str, # required
}],
"team_of_agents": [{ # optional
"key": str, # required
"role": Optional[str],
}],
"skills": List[str], # optional
"agent_plugins": [{ # optional
"id": str, # required
"version": str, # required
}],
"variables": Dict[str, Any], # optional
"engine": Optional[Literal["text", "jinja", "mustache"]],
"version_increment": Optional[Literal["major", "minor", "patch"]],
"version_description": Optional[str],
}
{
key?: string;
displayName?: string;
projectId?: string;
role?: string;
description?: string;
instructions?: string;
systemPrompt?: string;
model?: {
// one of: UpdateAgentModelConfiguration2, string
id: string; // required
parameters?: {
name?: string;
frequencyPenalty?: number;
maxTokens?: number;
maxCompletionTokens?: number;
presencePenalty?: number;
responseFormat?: {
// one of: UpdateAgentResponseFormatText, UpdateAgentResponseFormatJSONObject, UpdateAgentResponseFormatJSONSchema
type: "text" | "json_object" | "json_schema"; // required
jsonSchema: { // required (variant-specific)
description?: string;
name: string; // required
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "instant" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
type: "disabled" | "enabled" | "adaptive" | "between_tools"; // required
budgetTokens: number; // required (variant-specific)
thinkingLevel?: "minimal" | "low" | "medium" | "high";
display?: "summarized" | "omitted" | "updates";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: UpdateAgentToolChoice1, UpdateAgentToolChoice2
type?: "function";
function: { // required (variant-specific)
name: string; // required
};
};
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: "orq_pii_detection" | "orq_secret_detection" | "orq_sexual_moderation" | "orq_harmful_moderation" | string; // required
executeOn: "input" | "output"; // required
}[];
plugins?: (PIIRedactionPlugin | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbackOnCodes?: number[];
fallbacks?: {
model: string; // required
}[];
cache?: {
ttl?: number;
type: "exact_match"; // required
};
loadBalancer?: {
// one of: UpdateAgentLoadBalancer1
type: "weight_based"; // required
models: { // required
model: string; // required
weight?: number;
}[];
};
timeout?: {
callTimeout: number; // required
};
cacheControl?: {
type: "ephemeral"; // required
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
};
retry?: {
count?: number;
onCodes?: number[];
};
};
fallbackModels?: (string | UpdateAgentFallbackModelConfiguration2)[];
settings?: {
maxIterations?: number;
maxExecutionTime?: number;
maxCost?: number;
toolApprovalRequired?: "all" | "respect_tool" | "none";
chatExposed?: boolean;
tools?: (GoogleSearchToolInput | WebScraperToolInput | CallSubAgentToolInput | RetrieveAgentsToolInput | QueryMemoryStoreToolInput | WriteMemoryStoreToolInput | RetrieveMemoryStoresToolInput | DeleteMemoryDocumentToolInput | RetrieveKnowledgeBasesToolInput | QueryKnowledgeBaseToolInput | CurrentDateToolInput | AdvisorToolInput | SidekickToolInput | CodeInterpreterToolInput | FileSystemToolInput | HttpToolInput | CodeToolInput | FunctionToolInput | JsonSchemaToolInput | McpToolInput)[];
evaluators?: {
id: string; // required
sampleRate?: number;
executeOn: "input" | "output"; // required
}[];
guardrails?: {
id: string; // required
sampleRate?: number;
executeOn: "input" | "output"; // required
}[];
};
path?: string;
memoryStores?: string[];
knowledgeBases?: {
knowledgeId: string; // required
}[];
teamOfAgents?: {
key: string; // required
role?: string;
}[];
skills?: string[];
agentPlugins?: {
id: string; // required
version: string; // required
}[];
variables?: Record<string, any>;
engine?: "text" | "jinja" | "mustache";
versionIncrement?: "major" | "minor" | "patch";
versionDescription?: string;
// agentKey is passed as an argument beyond the request object
}
Show Response
Show Response
{
"id": str,
"key": str,
"display_name": Optional[str],
"project_id": str,
"created_by_id": Optional[str],
"updated_by_id": Optional[str],
"created": Optional[str],
"updated": Optional[str],
"status": Literal["live", "draft", "pending", "published"],
"version": Optional[str],
"path": str,
"memory_stores": List[str], # optional
"team_of_agents": [{ # optional
"key": str,
"role": Optional[str],
}],
"skills": List[str], # optional
"agent_plugins": [{ # optional
"id": str,
"version": str,
}],
"metrics": { # optional
"total_cost": Optional[float],
},
"variables": Dict[str, Any], # optional
"knowledge_bases": [{ # optional
"knowledge_id": str,
}],
"source": Optional[Literal["internal", "external", "experiment"]],
"engine": Optional[Literal["text", "jinja", "mustache"]],
"type": Optional[Literal["internal", "a2a"]],
"role": str,
"description": str,
"system_prompt": Optional[str],
"instructions": str,
"settings": { # optional
"max_iterations": Optional[int],
"max_execution_time": Optional[int],
"max_cost": Optional[float],
"tool_approval_required": Optional[Literal["all", "respect_tool", "none"]],
"chat_exposed": Optional[bool],
"tools": [{ # optional
"id": str,
"key": Optional[str],
"action_type": str,
"display_name": Optional[str],
"description": Optional[str],
"configuration": Dict[str, Any], # optional
"requires_approval": Optional[bool],
"tool_id": Optional[str],
"whole_server": Optional[bool],
"conditions": [{ # optional
"condition": str,
"operator": str,
"value": str,
}],
"timeout": Optional[float],
}],
"evaluators": [{ # optional
"id": str,
"sample_rate": Optional[float],
"execute_on": Literal["input", "output"],
}],
"guardrails": [{ # optional
"id": str,
"sample_rate": Optional[float],
"execute_on": Literal["input", "output"],
}],
},
"model": {
"id": str,
"integration_id": Optional[str],
"parameters": { # optional
"name": Optional[str],
"frequency_penalty": Optional[float],
"max_tokens": Optional[int],
"max_completion_tokens": Optional[int],
"presence_penalty": Optional[float],
"response_format": { # optional
# one of: UpdateAgentResponseFormatAgentsResponseText, UpdateAgentResponseFormatAgentsResponseJSONObject, UpdateAgentResponseFormatAgentsResponse200JSONSchema
"type": Union[Union[Literal["text"], Literal["json_object"]], Literal["json_schema"]],
"json_schema": {
"description": Optional[str],
"name": str,
"schema_": Optional[Any],
"strict": Optional[bool],
},
},
"reasoning_effort": Optional[Literal["none", "instant", "minimal", "low", "medium", "high", "xhigh", "max"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"thinking": { # optional
# one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
"type": Union[Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]], Literal["between_tools"]],
"budget_tokens": Union[float, Optional[float]],
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
"display": Optional[Literal["summarized", "omitted", "updates"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: UpdateAgentToolChoiceAgentsResponse1, UpdateAgentToolChoiceAgentsResponse2
"type": Optional[Literal["function"]],
"function": {
"name": str,
},
},
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[Literal["orq_pii_detection", "orq_secret_detection", "orq_sexual_moderation", "orq_harmful_moderation"], str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPlugin, ResponseHealingPlugin, TraceScrubbingPlugin]], # optional
"fallback_on_codes": List[int], # optional
"fallbacks": [{ # optional
"model": str,
}],
"cache": { # optional
"ttl": Optional[float],
"type": Literal["exact_match"],
},
"load_balancer": { # optional
# one of: UpdateAgentLoadBalancerAgentsResponse1
"type": Literal["weight_based"],
"models": [{
"model": str,
"weight": Optional[float],
}],
},
"timeout": { # optional
"call_timeout": float,
},
"cache_control": { # optional
"type": Literal["ephemeral"],
"ttl": Optional[Literal["5m", "1h"]],
},
"prompt_cache_key": Optional[str],
},
"retry": { # optional
"count": Optional[float],
"on_codes": List[float], # optional
},
"fallback_models": List[Union[str, UpdateAgentFallbackModelConfigurationAgents2]], # optional
},
}
{
id: string;
key: string;
displayName?: string;
projectId: string;
createdById?: string;
updatedById?: string;
created?: string;
updated?: string;
status: "live" | "draft" | "pending" | "published";
version?: string;
path: string;
memoryStores?: string[];
teamOfAgents?: {
key: string;
role?: string;
}[];
skills?: string[];
agentPlugins?: {
id: string;
version: string;
}[];
metrics?: {
totalCost?: number;
};
variables?: Record<string, any>;
knowledgeBases?: {
knowledgeId: string;
}[];
source?: "internal" | "external" | "experiment";
engine?: "text" | "jinja" | "mustache";
type?: "internal" | "a2a";
role: string;
description: string;
systemPrompt?: string;
instructions: string;
settings?: {
maxIterations?: number;
maxExecutionTime?: number;
maxCost?: number;
toolApprovalRequired?: "all" | "respect_tool" | "none";
chatExposed?: boolean;
tools?: {
id: string;
key?: string;
actionType: string;
displayName?: string;
description?: string;
configuration?: Record<string, any>;
requiresApproval?: boolean;
toolId?: string;
wholeServer?: boolean;
conditions?: {
condition: string;
operator: string;
value: string;
}[];
timeout?: number;
}[];
evaluators?: {
id: string;
sampleRate?: number;
executeOn: "input" | "output";
}[];
guardrails?: {
id: string;
sampleRate?: number;
executeOn: "input" | "output";
}[];
};
model: {
id: string;
integrationId?: string;
parameters?: {
name?: string;
frequencyPenalty?: number;
maxTokens?: number;
maxCompletionTokens?: number;
presencePenalty?: number;
responseFormat?: {
// one of: UpdateAgentResponseFormatAgentsResponseText, UpdateAgentResponseFormatAgentsResponseJSONObject, UpdateAgentResponseFormatAgentsResponse200JSONSchema
type: "text" | "json_object" | "json_schema";
jsonSchema: {
description?: string;
name: string;
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "instant" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
type: "disabled" | "enabled" | "adaptive" | "between_tools";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
display?: "summarized" | "omitted" | "updates";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: UpdateAgentToolChoiceAgentsResponse1, UpdateAgentToolChoiceAgentsResponse2
type?: "function";
function: {
name: string;
};
};
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: "orq_pii_detection" | "orq_secret_detection" | "orq_sexual_moderation" | "orq_harmful_moderation" | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPlugin | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbackOnCodes?: number[];
fallbacks?: {
model: string;
}[];
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: {
// one of: UpdateAgentLoadBalancerAgentsResponse1
type: "weight_based";
models: {
model: string;
weight?: number;
}[];
};
timeout?: {
callTimeout: number;
};
cacheControl?: {
type: "ephemeral";
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
};
retry?: {
count?: number;
onCodes?: number[];
};
fallbackModels?: (string | UpdateAgentFallbackModelConfigurationAgents2)[];
};
}
Show Variant types
Show Variant types
UpdateAgentFallbackModelConfiguration2
{
"id": str,
"parameters": { # optional
"name": Optional[str],
"frequency_penalty": Optional[float],
"max_tokens": Optional[int],
"max_completion_tokens": Optional[int],
"presence_penalty": Optional[float],
"response_format": { # optional
# one of: UpdateAgentResponseFormatAgentsText, UpdateAgentResponseFormatAgentsJSONObject, UpdateAgentResponseFormatAgentsRequestJSONSchema
"type": Union[Union[Literal["text"], Literal["json_object"]], Literal["json_schema"]],
"json_schema": {
"description": Optional[str],
"name": str,
"schema_": Optional[Any],
"strict": Optional[bool],
},
},
"reasoning_effort": Optional[Literal["none", "instant", "minimal", "low", "medium", "high", "xhigh", "max"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"thinking": { # optional
# one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
"type": Union[Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]], Literal["between_tools"]],
"budget_tokens": Union[float, Optional[float]],
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
"display": Optional[Literal["summarized", "omitted", "updates"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: UpdateAgentToolChoiceAgents1, UpdateAgentToolChoiceAgents2
"type": Optional[Literal["function"]],
"function": {
"name": str,
},
},
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[Literal["orq_pii_detection", "orq_secret_detection", "orq_sexual_moderation", "orq_harmful_moderation"], str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPlugin, ResponseHealingPlugin, TraceScrubbingPlugin]], # optional
"fallback_on_codes": List[int], # optional
"fallbacks": [{ # optional
"model": str,
}],
"cache": { # optional
"ttl": Optional[float],
"type": Literal["exact_match"],
},
"load_balancer": { # optional
# one of: UpdateAgentLoadBalancerAgents1
"type": Literal["weight_based"],
"models": [{
"model": str,
"weight": Optional[float],
}],
},
"timeout": { # optional
"call_timeout": float,
},
"cache_control": { # optional
"type": Literal["ephemeral"],
"ttl": Optional[Literal["5m", "1h"]],
},
"prompt_cache_key": Optional[str],
},
"retry": { # optional
"count": Optional[float],
"on_codes": List[float], # optional
},
}
{
id: string;
parameters?: {
name?: string;
frequencyPenalty?: number;
maxTokens?: number;
maxCompletionTokens?: number;
presencePenalty?: number;
responseFormat?: {
// one of: UpdateAgentResponseFormatAgentsText, UpdateAgentResponseFormatAgentsJSONObject, UpdateAgentResponseFormatAgentsRequestJSONSchema
type: "text" | "json_object" | "json_schema";
jsonSchema: {
description?: string;
name: string;
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "instant" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
type: "disabled" | "enabled" | "adaptive" | "between_tools";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
display?: "summarized" | "omitted" | "updates";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: UpdateAgentToolChoiceAgents1, UpdateAgentToolChoiceAgents2
type?: "function";
function: {
name: string;
};
};
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: "orq_pii_detection" | "orq_secret_detection" | "orq_sexual_moderation" | "orq_harmful_moderation" | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPlugin | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbackOnCodes?: number[];
fallbacks?: {
model: string;
}[];
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: {
// one of: UpdateAgentLoadBalancerAgents1
type: "weight_based";
models: {
model: string;
weight?: number;
}[];
};
timeout?: {
callTimeout: number;
};
cacheControl?: {
type: "ephemeral";
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
};
retry?: {
count?: number;
onCodes?: number[];
};
}
UpdateAgentFallbackModelConfigurationAgents2
{
"id": str,
"parameters": { # optional
"name": Optional[str],
"frequency_penalty": Optional[float],
"max_tokens": Optional[int],
"max_completion_tokens": Optional[int],
"presence_penalty": Optional[float],
"response_format": { # optional
# one of: UpdateAgentResponseFormatAgentsResponse200Text, UpdateAgentResponseFormatAgentsResponse200JSONObject, UpdateAgentResponseFormatAgentsResponse200ApplicationJSONResponseBodyJSONSchema
"type": Union[Union[Literal["text"], Literal["json_object"]], Literal["json_schema"]],
"json_schema": {
"description": Optional[str],
"name": str,
"schema_": Optional[Any],
"strict": Optional[bool],
},
},
"reasoning_effort": Optional[Literal["none", "instant", "minimal", "low", "medium", "high", "xhigh", "max"]],
"verbosity": Optional[str],
"seed": Optional[float],
"stop": Union[str, List[str]], # optional
"thinking": { # optional
# one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
"type": Union[Union[Union[Literal["disabled"], Literal["enabled"]], Literal["adaptive"]], Literal["between_tools"]],
"budget_tokens": Union[float, Optional[float]],
"thinking_level": Optional[Literal["minimal", "low", "medium", "high"]],
"display": Optional[Literal["summarized", "omitted", "updates"]],
},
"temperature": Optional[float],
"top_p": Optional[float],
"top_k": Optional[float],
"tool_choice": { # optional
# one of: UpdateAgentToolChoiceAgentsResponse2001, UpdateAgentToolChoiceAgentsResponse2002
"type": Optional[Literal["function"]],
"function": {
"name": str,
},
},
"parallel_tool_calls": Optional[bool],
"modalities": List[Literal["text", "audio"]], # optional
"guardrails": [{ # optional
"id": Union[Literal["orq_pii_detection", "orq_secret_detection", "orq_sexual_moderation", "orq_harmful_moderation"], str],
"execute_on": Literal["input", "output"],
}],
"plugins": List[Union[PIIRedactionPlugin, ResponseHealingPlugin, TraceScrubbingPlugin]], # optional
"fallback_on_codes": List[int], # optional
"fallbacks": [{ # optional
"model": str,
}],
"cache": { # optional
"ttl": Optional[float],
"type": Literal["exact_match"],
},
"load_balancer": { # optional
# one of: UpdateAgentLoadBalancerAgentsResponse2001
"type": Literal["weight_based"],
"models": [{
"model": str,
"weight": Optional[float],
}],
},
"timeout": { # optional
"call_timeout": float,
},
"cache_control": { # optional
"type": Literal["ephemeral"],
"ttl": Optional[Literal["5m", "1h"]],
},
"prompt_cache_key": Optional[str],
},
"retry": { # optional
"count": Optional[float],
"on_codes": List[float], # optional
},
}
{
id: string;
parameters?: {
name?: string;
frequencyPenalty?: number;
maxTokens?: number;
maxCompletionTokens?: number;
presencePenalty?: number;
responseFormat?: {
// one of: UpdateAgentResponseFormatAgentsResponse200Text, UpdateAgentResponseFormatAgentsResponse200JSONObject, UpdateAgentResponseFormatAgentsResponse200ApplicationJSONResponseBodyJSONSchema
type: "text" | "json_object" | "json_schema";
jsonSchema: {
description?: string;
name: string;
schema?: any;
strict?: boolean;
};
};
reasoningEffort?: "none" | "instant" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
verbosity?: string;
seed?: number;
stop?: string | string[];
thinking?: {
// one of: ThinkingConfigDisabledSchema, ThinkingConfigEnabledSchema, ThinkingConfigAdaptiveSchema, ThinkingConfigBetweenToolsSchema
type: "disabled" | "enabled" | "adaptive" | "between_tools";
budgetTokens: number;
thinkingLevel?: "minimal" | "low" | "medium" | "high";
display?: "summarized" | "omitted" | "updates";
};
temperature?: number;
topP?: number;
topK?: number;
toolChoice?: {
// one of: UpdateAgentToolChoiceAgentsResponse2001, UpdateAgentToolChoiceAgentsResponse2002
type?: "function";
function: {
name: string;
};
};
parallelToolCalls?: boolean;
modalities?: ("text" | "audio")[];
guardrails?: {
id: "orq_pii_detection" | "orq_secret_detection" | "orq_sexual_moderation" | "orq_harmful_moderation" | string;
executeOn: "input" | "output";
}[];
plugins?: (PIIRedactionPlugin | ResponseHealingPlugin | TraceScrubbingPlugin)[];
fallbackOnCodes?: number[];
fallbacks?: {
model: string;
}[];
cache?: {
ttl?: number;
type: "exact_match";
};
loadBalancer?: {
// one of: UpdateAgentLoadBalancerAgentsResponse2001
type: "weight_based";
models: {
model: string;
weight?: number;
}[];
};
timeout?: {
callTimeout: number;
};
cacheControl?: {
type: "ephemeral";
ttl?: "5m" | "1h";
};
promptCacheKey?: string;
};
retry?: {
count?: number;
onCodes?: number[];
};
}