---
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

## Changes

- **2025-10-16** `a1c0e134c4c8` — 1 info
  - endpoint added
- **2025-10-16** `6f2ef131e921` — 1 breaking
  - api path removed without deprecation
- **2025-10-14** `7cebd838e704` — 1 info
  - endpoint added
- **2025-08-05** `f3a20bfa8bea` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/humanlayer/apis/humanlayer-daemon-rest-api/changes/agents/discover/post.md)

---

[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)
