Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Get agent

Retrieve a single currently registered agent.

GET/api/agent/{agentID}
Path parameters
agentIDstringrequired
Query parameters
locationobject | any
Responses
200Success
locationLocation.Inforequired
Show properties
directorystringrequired
workspaceIDobject
Show properties
object
projectobjectrequired
Show properties
idstringrequired
directorystringrequired
dataAgent.Inforequired
Show properties
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
stepsobject
Show properties
object
permissionsPermission.Rulesetrequired
Show properties
Array of Permission.Rule
actionstringrequired
resourcestringrequired
effectPermission.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
404AgentNotFoundError
_tagstringrequired
Allowed:AgentNotFoundError
agentIDstringrequired
messagestringrequired
Request
curl -X GET "/api/agent/string"
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": "string",
    "steps": {},
    "permissions": [
      {
        "action": "string",
        "resource": "string",
        "effect": "allow"
      }
    ]
  }
}