---
title: "List agents"
method: GET
path: "/agent"
---

# List agents

`GET /agent`

Get a list of all available AI agents in the OpenCode system.

## Query parameters

- `directory` string
- `workspace` string

## Response `200`

List of agents

- Agent[]
  - `name` string, required
  - `description` string
  - `mode` 'subagent' | 'primary' | 'all', required
  - `native` boolean
  - `hidden` boolean
  - `topP` number
  - `temperature` number
  - `color` string
  - `permission` PermissionRule[], required
    - `permission` string, required
    - `pattern` string, required
    - `action` 'allow' | 'deny' | 'ask', required
  - `model` object
    - `modelID` string, required
    - `providerID` string, required
  - `variant` string
  - `prompt` string
  - `options` object, required
  - `steps` number
  - `subAgents` string[], nullable
  - `skills` string[], nullable

---

[API](https://skmtc.net/kaaass/apis/opencode.md) · [All operations](https://skmtc.net/kaaass/apis/opencode/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kaaass/opencode/revisions/8bb9a15bd144/schema)
