Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

List agents

Retrieve currently registered agents.

GET/api/agent
Query parameters
locationobject | any
Responses
200Success
locationLocation.Inforequired
Show properties
directorystringrequired
workspaceIDobject
Show properties
object
projectobjectrequired
Show properties
idstringrequired
directorystringrequired
dataAgent.Info[]required
Show properties
Array of Agent.Info
idstringrequired
namestringrequired
modelModel.Ref
Show properties
idstringrequired
providerIDstringrequired
variantstring
requestProvider.Requestrequired
Show properties
settingsProvider.Settingsrequired
headersobjectrequired
bodyobjectrequired
systemstring
descriptionstring
modestringrequired
Allowed:subagentprimaryall
hiddenbooleanrequired
colorAgent.Color
Show properties
Any of:
object
object
string
string
stepsobject
Show properties
object
permissionsPermissionV2.Rulesetrequired
Show properties
Array of PermissionV2.Rule
actionstringrequired
resourcestringrequired
effectPermissionV2.Effectrequired
Allowed:allowdenyask
400InvalidRequestError
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
401UnauthorizedError
_tagstringrequired
Allowed:UnauthorizedError
messagestringrequired
Request
curl -X GET "/api/agent"
Response
{
  "location": {
    "directory": "string",
    "workspaceID": {},
    "project": {
      "id": "string",
      "directory": "string"
    }
  },
  "data": [
    {
      "id": "string",
      "name": "string",
      "model": {
        "id": "string",
        "providerID": "string",
        "variant": "string"
      },
      "request": {
        "settings": {},
        "headers": {},
        "body": {}
      },
      "system": "string",
      "description": "string",
      "mode": "subagent",
      "hidden": true,
      "color": {},
      "steps": {},
      "permissions": [
        {
          "action": "string",
          "resource": "string",
          "effect": "allow"
        }
      ]
    }
  ]
}