Create Agent Config
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.
Create Agent Config
package main
import (
"context"
"fmt"
"github.com/scaleapi/sgp-dev-go"
"github.com/scaleapi/sgp-dev-go/option"
)
func main() {
client := sgpdev.NewClient(
option.WithAPIKey("My API Key"),
option.WithAccountID("My Account ID"),
)
agentConfig, err := client.AgentConfigs.New(context.TODO(), sgpdev.AgentConfigNewParams{
Harness: sgpdev.AgentConfigNewParamsHarnessClaudeCode,
Model: "x",
Name: "x",
SystemPrompt: "x",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", 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"
}
]
}