---
title: "Get an agent"
method: GET
path: "/agents/{id}"
tags: ["Agents"]
---

# Get an agent

`GET /agents/{id}`

## Request

- Base URL: `https://app.pencil.ink/api/v1`
- URL: `https://app.pencil.ink/api/v1/agents/{id}`
- Auth: HTTP bearer

Looks up by the public `agentId` string, scoped to the key's org.

## Response `200`

The agent profile.

- object
  - `data` Agent
    - `id` string: Convex document id.
    - `agentId` string: Public agent id string.
    - `name` string
    - `role` string
    - `responsibilities` string[]
    - `status` string, nullable
    - `avatarUrl` string, nullable
    - `agentType` string, nullable
    - `isHeadAgent` boolean
    - `autonomyEnabled` boolean
    - `runner` string: Defaults to `claude_code`.
    - `currentTask` string, nullable
    - `lastActiveAt` integer, nullable: Epoch ms.
    - `createdAt` integer: Epoch ms.

## Other responses

- `401`: Missing or invalid API key (`unauthorized`).
- `404`: Resource not found in this org (`not_found`).

---

[API](https://skmtc.dev/pencil/apis/pencil-public-api.md) · [All operations](https://skmtc.dev/pencil/apis/pencil-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pencil/apis/pencil-public-api/revisions/2b842698b76d?raw)
