Skip to content

List Agent Configs

client.AgentConfigs.List(ctx, query) (*CursorPage[AgentConfigListResponse], error)
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.

ParametersExpand Collapse
query AgentConfigListParams
EndingBefore param.Field[string]Optional
Limit param.Field[int64]Optional
maximum10000
minimum1
SortBy param.Field[string]Optional
SortOrder param.Field[SortOrder]Optional
StartingAfter param.Field[string]Optional
ReturnsExpand Collapse
type AgentConfigListResponse struct{…}
ID string
AllowedTools []string
CreatedAt Time
formatdate-time
Harness string
Model string
Name string
SystemPrompt string
UpdatedAt Time
formatdate-time
Description stringOptional
Object AgentConfigListResponseObjectOptional
PersistentWorkspace boolOptional
Repos []RepoSpecOptional
URL string
maxLength2048
minLength1
Depth int64Optional
minimum1
Path stringOptional
maxLength1024

List Agent Configs

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"),
  )
  page, err := client.AgentConfigs.List(context.TODO(), sgpdev.AgentConfigListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "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"
}
Returns Examples
{
  "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"
}