Skip to content

Get Agent Config

agent_configs.retrieve(stragent_config_id) -> AgentConfigRetrieveResponse
GET/v5/agent_configs/{agent_config_id}

Fetch a single stored agent configuration by id, including its persistent_workspace flag and any repos override.

This returns the saved record as-is and does not compute task params; use {agent_config_id}/resolve when you need the config projected into the params a task would run with. A user caller can only read a config they created unless fine-grained access control grants access, while a service account can read any config under the account; a missing or out-of-scope id returns a 404.

ParametersExpand Collapse
agent_config_id: str
ReturnsExpand Collapse
class AgentConfigRetrieveResponse: …
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

Get 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.retrieve(
    "agent_config_id",
)
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"
    }
  ]
}