---
title: "Discover available agents"
method: POST
path: "/agents/discover"
tags: ["Agents"]
---

# Discover available agents

`POST /agents/discover`

Discovers agent definitions from .claude/agents directories

## Request body

- object
  - `workingDir` string, required — Session working directory for local agent discovery

## Response `200`

Successfully discovered agents

- object
  - `agents` Agent[], required
    - `name` string, required — Agent name from YAML frontmatter
    - `mentionText` string, required — Text to use for mentions
    - `source` 'local' | 'global', required — Whether agent is from local or global directory
    - `description` string — Optional description from YAML frontmatter

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.dev/humanlayer/apis/humanlayer-daemon-rest-api.md) · [All operations](https://skmtc.dev/humanlayer/apis/humanlayer-daemon-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/humanlayer/humanlayer-daemon-rest-api/revisions/02da8cb8aa12/schema)
