# Agent Configs

## 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.

### Parameters

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

  Harness strategy. See Harness enum for supported values.

  - `"claude-code"`

  - `"codex"`

  - `"litellm"`

- `model: str`

- `name: str`

- `system_prompt: str`

- `allowed_tools: Optional[List[Literal["Read", "Write", "Edit", 34 more]]]`

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

  - `"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]`

- `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`

  - `depth: Optional[int]`

  - `path: Optional[str]`

### Returns

- `class AgentConfigCreateResponse: …`

  - `id: str`

  - `allowed_tools: List[str]`

  - `created_at: datetime`

  - `harness: str`

  - `model: str`

  - `name: str`

  - `system_prompt: str`

  - `updated_at: datetime`

  - `description: Optional[str]`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

  - `persistent_workspace: Optional[bool]`

  - `repos: Optional[List[RepoSpec]]`

    - `url: str`

    - `depth: Optional[int]`

    - `path: Optional[str]`

### Example

```python
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)
```

#### Response

```json
{
  "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"
    }
  ]
}
```

## List Agent Configs

`agent_configs.list(AgentConfigListParams**kwargs)  -> SyncCursorPage[AgentConfigListResponse]`

**get** `/v5/agent_configs`

List agent configurations visible to the caller, with cursor-based pagination.

A user caller sees only the configs they created unless fine-grained access
control (FGAC) grants them access to others; a service-account caller sees
every config under the account. This returns the stored config records as-is —
use `{agent_config_id}/resolve` instead when you need a config projected into
the params a task would run with. Because deleting a config removes it outright
rather than archiving it, there are no archived configs to page through here.

### Parameters

- `ending_before: Optional[str]`

- `limit: Optional[int]`

- `sort_by: Optional[str]`

- `sort_order: Optional[SortOrder]`

  - `"asc"`

  - `"desc"`

- `starting_after: Optional[str]`

### Returns

- `class AgentConfigListResponse: …`

  - `id: str`

  - `allowed_tools: List[str]`

  - `created_at: datetime`

  - `harness: str`

  - `model: str`

  - `name: str`

  - `system_prompt: str`

  - `updated_at: datetime`

  - `description: Optional[str]`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

  - `persistent_workspace: Optional[bool]`

  - `repos: Optional[List[RepoSpec]]`

    - `url: str`

    - `depth: Optional[int]`

    - `path: Optional[str]`

### Example

```python
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
)
page = client.agent_configs.list()
page = page.items[0]
print(page.id)
```

#### Response

```json
{
  "has_more": true,
  "items": [
    {
      "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"
        }
      ]
    }
  ],
  "total": 0,
  "limit": 0,
  "object": "list"
}
```

## List MCP Tool Names

`agent_configs.list_mcp_tools()  -> AgentConfigListMcpToolsResponse`

**get** `/v5/agent_configs/mcp_tools`

Return the fixed set of tool names that route to MCP servers rather than harness-provided tools.

These are the subset of `allowed_tools` values (Slack, Linear, GitHub, ...)
the platform treats as MCP servers; the list is a static enum, not account
data, so it is identical for every caller. It is exposed mainly so the
generated SDK carries the `McpTool` type and the frontend can assert its own
MCP-versus-harness tool classifier against the backend to prevent drift. It
does not list configs or the tools actually granted to any particular config.

### Returns

- `List[Literal["Slack", "Linear", "GitHub", 21 more]]`

  - `"Slack"`

  - `"Linear"`

  - `"GitHub"`

  - `"Confluence"`

  - `"Notion"`

  - `"Datadog"`

  - `"PagerDuty"`

  - `"Salesforce"`

  - `"Figma"`

  - `"Granola"`

  - `"Jira"`

  - `"Gmail"`

  - `"GoogleCalendar"`

  - `"GoogleDrive"`

  - `"GoogleDocs"`

  - `"GoogleSheets"`

  - `"GoogleSlides"`

  - `"Snowflake"`

  - `"Redash"`

  - `"Tableau"`

  - `"Metabase"`

  - `"Gong"`

  - `"ZoomInfo"`

  - `"Clay"`

### Example

```python
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
)
response = client.agent_configs.list_mcp_tools()
print(response)
```

#### Response

```json
[
  "Slack"
]
```

## 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.

### Parameters

- `agent_config_id: str`

### Returns

- `class AgentConfigRetrieveResponse: …`

  - `id: str`

  - `allowed_tools: List[str]`

  - `created_at: datetime`

  - `harness: str`

  - `model: str`

  - `name: str`

  - `system_prompt: str`

  - `updated_at: datetime`

  - `description: Optional[str]`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

  - `persistent_workspace: Optional[bool]`

  - `repos: Optional[List[RepoSpec]]`

    - `url: str`

    - `depth: Optional[int]`

    - `path: Optional[str]`

### Example

```python
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)
```

#### Response

```json
{
  "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"
    }
  ]
}
```

## Update Agent Config

`agent_configs.update(stragent_config_id, AgentConfigUpdateParams**kwargs)  -> AgentConfigUpdateResponse`

**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.

### Parameters

- `agent_config_id: str`

- `task_id: Optional[str]`

  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: Optional[List[Literal["Read", "Write", "Edit", 34 more]]]`

  - `"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]`

- `harness: Optional[Literal["claude-code", "codex", "litellm"]]`

  Supported agent harness strategies.

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

  - `"claude-code"`

  - `"codex"`

  - `"litellm"`

- `model: Optional[str]`

- `name: Optional[str]`

- `persistent_workspace: Optional[bool]`

- `repos: Optional[Iterable[RepoSpecParam]]`

  - `url: str`

  - `depth: Optional[int]`

  - `path: Optional[str]`

- `system_prompt: Optional[str]`

### Returns

- `class AgentConfigUpdateResponse: …`

  - `id: str`

  - `allowed_tools: List[str]`

  - `created_at: datetime`

  - `harness: str`

  - `model: str`

  - `name: str`

  - `system_prompt: str`

  - `updated_at: datetime`

  - `description: Optional[str]`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

  - `persistent_workspace: Optional[bool]`

  - `repos: Optional[List[RepoSpec]]`

    - `url: str`

    - `depth: Optional[int]`

    - `path: Optional[str]`

### Example

```python
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.update(
    agent_config_id="agent_config_id",
)
print(agent_config.id)
```

#### Response

```json
{
  "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"
    }
  ]
}
```

## Delete Agent Config (hard delete)

`agent_configs.delete(stragent_config_id)  -> AgentConfigDeleteResponse`

**delete** `/v5/agent_configs/{agent_config_id}`

Permanently delete an agent config; this is a hard delete, not an archive, so the row is removed and cannot be restored.

Because a config is only a template, deleting it does not stop or alter any task
already created from it. A user caller can only delete a config they created
unless fine-grained access control grants access. The response echoes the
deleted id.

### Parameters

- `agent_config_id: str`

### Returns

- `class AgentConfigDeleteResponse: …`

  - `id: str`

  - `deleted: bool`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

### Example

```python
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.delete(
    "agent_config_id",
)
print(agent_config.id)
```

#### Response

```json
{
  "id": "id",
  "deleted": true,
  "object": "agent_config"
}
```

## Domain Types

### Repo Spec

- `class RepoSpec: …`

  A single repo the agent should clone into its workspace.

  Mirrors the per-entry shape the golden agent's `_validate_repos` accepts:
  `url` is required, the rest are optional passthrough hints. Sent verbatim
  as `task.params.repos` so provisioning clones these instead of the
  deployment-global default.

  - `url: str`

  - `depth: Optional[int]`

  - `path: Optional[str]`

### Agent Config Create Response

- `class AgentConfigCreateResponse: …`

  - `id: str`

  - `allowed_tools: List[str]`

  - `created_at: datetime`

  - `harness: str`

  - `model: str`

  - `name: str`

  - `system_prompt: str`

  - `updated_at: datetime`

  - `description: Optional[str]`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

  - `persistent_workspace: Optional[bool]`

  - `repos: Optional[List[RepoSpec]]`

    - `url: str`

    - `depth: Optional[int]`

    - `path: Optional[str]`

### Agent Config List Response

- `class AgentConfigListResponse: …`

  - `id: str`

  - `allowed_tools: List[str]`

  - `created_at: datetime`

  - `harness: str`

  - `model: str`

  - `name: str`

  - `system_prompt: str`

  - `updated_at: datetime`

  - `description: Optional[str]`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

  - `persistent_workspace: Optional[bool]`

  - `repos: Optional[List[RepoSpec]]`

    - `url: str`

    - `depth: Optional[int]`

    - `path: Optional[str]`

### Agent Config List Mcp Tools Response

- `List[Literal["Slack", "Linear", "GitHub", 21 more]]`

  - `"Slack"`

  - `"Linear"`

  - `"GitHub"`

  - `"Confluence"`

  - `"Notion"`

  - `"Datadog"`

  - `"PagerDuty"`

  - `"Salesforce"`

  - `"Figma"`

  - `"Granola"`

  - `"Jira"`

  - `"Gmail"`

  - `"GoogleCalendar"`

  - `"GoogleDrive"`

  - `"GoogleDocs"`

  - `"GoogleSheets"`

  - `"GoogleSlides"`

  - `"Snowflake"`

  - `"Redash"`

  - `"Tableau"`

  - `"Metabase"`

  - `"Gong"`

  - `"ZoomInfo"`

  - `"Clay"`

### Agent Config Retrieve Response

- `class AgentConfigRetrieveResponse: …`

  - `id: str`

  - `allowed_tools: List[str]`

  - `created_at: datetime`

  - `harness: str`

  - `model: str`

  - `name: str`

  - `system_prompt: str`

  - `updated_at: datetime`

  - `description: Optional[str]`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

  - `persistent_workspace: Optional[bool]`

  - `repos: Optional[List[RepoSpec]]`

    - `url: str`

    - `depth: Optional[int]`

    - `path: Optional[str]`

### Agent Config Update Response

- `class AgentConfigUpdateResponse: …`

  - `id: str`

  - `allowed_tools: List[str]`

  - `created_at: datetime`

  - `harness: str`

  - `model: str`

  - `name: str`

  - `system_prompt: str`

  - `updated_at: datetime`

  - `description: Optional[str]`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`

  - `persistent_workspace: Optional[bool]`

  - `repos: Optional[List[RepoSpec]]`

    - `url: str`

    - `depth: Optional[int]`

    - `path: Optional[str]`

### Agent Config Delete Response

- `class AgentConfigDeleteResponse: …`

  - `id: str`

  - `deleted: bool`

  - `object: Optional[Literal["agent_config"]]`

    - `"agent_config"`
