Skip to content

Update Agent Config

client.agentConfigs.update(stringagentConfigID, AgentConfigUpdateParams { task_id, allowed_tools, description, 6 more } params, RequestOptionsoptions?): AgentConfigUpdateResponse { id, allowed_tools, created_at, 9 more }
PATCH/v5/agent_configs/{agent_config_id}

Partially update a stored agent config; only fields present in the request body are changed.

persistent_workspace and repos are both patchable — an explicit null on repos clears the override back to the deployment default, while the always-present fields (name, system_prompt, harness, allowed_tools, model, and persistent_workspace) reject an explicit null. Because persistent_workspace and repos are read when a task is created and are fixed for a task’s life, changing them affects only tasks created afterward, not one already running. The optional task_id query parameter opts into a live-config side effect: after the row is persisted, the changed pass-through fields (system_prompt, model, harness, and allowed_tools split into harness tools versus MCP servers) are shallow-merged into that running task’s params on Agentex in a background task so the worker picks them up on its next turn; persistent_workspace and repos are intentionally not forwarded to a running task. That side effect runs after the response is sent, is best-effort, and no-ops if the task does not exist or the caller does not own it. A user caller can only update a config they created unless fine-grained access control grants access.

ParametersExpand Collapse
agentConfigID: string
params: AgentConfigUpdateParams { task_id, allowed_tools, description, 6 more }
task_id?: string

Query param: If set, after persisting the patch we shallow-merge the changed fields into this task’s params column on Agentex so the worker picks up the new values on its next turn. Caller-provided context — Agentex enforces task ownership via its own auth, so the side-effect no-ops if the caller doesn’t own the task.

allowed_tools?: Array<"Read" | "Write" | "Edit" | 34 more>

Body param

One of the following:
"Read"
"Write"
"Edit"
"Bash"
"Glob"
"Grep"
"List"
"WebFetch"
"WebSearch"
"Task"
"TodoWrite"
"NotebookEdit"
"ExitPlanMode"
"Slack"
"Linear"
"GitHub"
"Confluence"
"Notion"
"Datadog"
"PagerDuty"
"Salesforce"
"Figma"
"Granola"
"Jira"
"Gmail"
"GoogleCalendar"
"GoogleDrive"
"GoogleDocs"
"GoogleSheets"
"GoogleSlides"
"Snowflake"
"Redash"
"Tableau"
"Metabase"
"Gong"
"ZoomInfo"
"Clay"
description?: string

Body param

maxLength2000
harness?: "claude-code" | "codex" | "litellm"

Body param: Supported agent harness strategies.

Mirrors PROVIDERS in golden-agent’s project/harness/activity.py.

One of the following:
"claude-code"
"codex"
"litellm"
model?: string

Body param

maxLength255
minLength1
name?: string

Body param

maxLength255
minLength1
persistent_workspace?: boolean

Body param

repos?: Array<RepoSpec { url, depth, path } >

Body param

url: string
maxLength2048
minLength1
depth?: number
minimum1
path?: string
maxLength1024
system_prompt?: string

Body param

maxLength100000
minLength1
ReturnsExpand Collapse
AgentConfigUpdateResponse { id, allowed_tools, created_at, 9 more }
id: string
allowed_tools: Array<string>
created_at: string
formatdate-time
harness: string
model: string
name: string
system_prompt: string
updated_at: string
formatdate-time
description?: string
object?: "agent_config"
persistent_workspace?: boolean
repos?: Array<RepoSpec { url, depth, path } >
url: string
maxLength2048
minLength1
depth?: number
minimum1
path?: string
maxLength1024

Update Agent Config

import SGPClient from 'scale-gp';

const client = new SGPClient({
  accountID: 'My Account ID',
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

const agentConfig = await client.agentConfigs.update('agent_config_id');

console.log(agentConfig.id);
{
  "id": "id",
  "allowed_tools": [
    "string"
  ],
  "created_at": "2019-12-27T18:11:19.117Z",
  "harness": "harness",
  "model": "model",
  "name": "name",
  "system_prompt": "system_prompt",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "object": "agent_config",
  "persistent_workspace": true,
  "repos": [
    {
      "url": "x",
      "depth": 1,
      "path": "path"
    }
  ]
}
Returns Examples
{
  "id": "id",
  "allowed_tools": [
    "string"
  ],
  "created_at": "2019-12-27T18:11:19.117Z",
  "harness": "harness",
  "model": "model",
  "name": "name",
  "system_prompt": "system_prompt",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "object": "agent_config",
  "persistent_workspace": true,
  "repos": [
    {
      "url": "x",
      "depth": 1,
      "path": "path"
    }
  ]
}