Skip to content

Create Agent Config

agent_configs.create(AgentConfigCreateParams**kwargs) -> AgentConfigCreateResponse
POST/v5/agent_configs

Create a reusable agent configuration (system prompt, harness, model, allowed tools) under the caller’s account.

The config is a template that a chat session or a non-chat trigger later turns into task params; creating one does not start any task. persistent_workspace opts tasks made from this config into a durable /workspace that survives sandbox death (off by default, and fixed once a task starts), and repos overrides which repositories provisioning clones into that workspace — omit it (null) to use the deployment default, or pass an empty list to clone nothing. A repos override is rejected with a 422 on the model-agnostic (litellm) harness unless persistent_workspace is also true, because non-persistent litellm tasks run in a pre-cloned warm-pool sandbox where the override would be ignored. allowed_tools may name MCP servers (Slack, Linear, GitHub, …) alongside harness tools, and granting an MCP server name authorizes every tool it exposes.

ParametersExpand Collapse
harness: Literal["claude-code", "codex", "litellm"]

Harness strategy. See Harness enum for supported values.

One of the following:
"claude-code"
"codex"
"litellm"
model: str
maxLength255
minLength1
name: str
maxLength255
minLength1
system_prompt: str
maxLength100000
minLength1
allowed_tools: Optional[List[Literal["Read", "Write", "Edit", 34 more]]]

Tools enabled for this config. See AllowedTool enum for the catalogue.

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: Optional[str]
maxLength2000
persistent_workspace: Optional[bool]

Give tasks a persistent /workspace that survives sandbox death. Fixed for a task’s life; defaults off.

repos: Optional[Iterable[RepoSpecParam]]

Per-config repo override. None uses the deployment default; an empty list clones nothing.

url: str
maxLength2048
minLength1
depth: Optional[int]
minimum1
path: Optional[str]
maxLength1024
ReturnsExpand Collapse
class AgentConfigCreateResponse: …
id: str
allowed_tools: List[str]
created_at: datetime
formatdate-time
harness: str
model: str
name: str
system_prompt: str
updated_at: datetime
formatdate-time
description: Optional[str]
object: Optional[Literal["agent_config"]]
persistent_workspace: Optional[bool]
repos: Optional[List[RepoSpec]]
url: str
maxLength2048
minLength1
depth: Optional[int]
minimum1
path: Optional[str]
maxLength1024

Create Agent Config

import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
agent_config = client.agent_configs.create(
    harness="claude-code",
    model="x",
    name="x",
    system_prompt="x",
)
print(agent_config.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"
    }
  ]
}