---
name: agentcomment
description: Read and reply to Agent Comment review threads on a site. Use when the user asks to check comments, review overlay notes, or implement pinned UI/copy feedback.
---

# Agent Comment

Comments live on the Agent Comment server. Nothing is pushed to you. Pull open threads, make the change, reply, resolve.

## Auth

```
AGENTCOMMENT_URL   default https://go.agentcomment.app
AGENTCOMMENT_API_KEY   sk_ac_live_…  (secret key from the dashboard)
```

Header: `Authorization: Bearer $AGENTCOMMENT_API_KEY`

The project slug is the site folder name unless the user names a different one (`t1d-site`, `demo`, …).

## List open threads

```bash
curl -sS -H "Authorization: Bearer $AGENTCOMMENT_API_KEY" \
  "$AGENTCOMMENT_URL/v1/projects/{slug}/comments?status=open"
```

Across every project:

```bash
curl -sS -H "Authorization: Bearer $AGENTCOMMENT_API_KEY" \
  "$AGENTCOMMENT_URL/v1/comments?status=open"
```

Each thread has:

- `id` — use this in reply/resolve URLs
- `locator` — human description of the element (`h1 in the header that currently says "…"`)
- `snapshot` / `quote` — page text at comment time
- `selector` — best-effort CSS, may rot after a redesign
- `page_url`, `page_path`
- `messages[]` — `author_role` is `user` or `agent`

Treat `locator` + `snapshot`/`quote` + the latest **user** message as the task.

## Reply and resolve

After you make the change:

```bash
curl -sS -X POST -H "Authorization: Bearer $AGENTCOMMENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Changed the hero to …"}' \
  "$AGENTCOMMENT_URL/v1/comments/{id}/messages"

curl -sS -X POST -H "Authorization: Bearer $AGENTCOMMENT_API_KEY" \
  "$AGENTCOMMENT_URL/v1/comments/{id}/resolve"
```

If you cannot find the element, reply with why and **leave the thread open**.

Unresolve:

```bash
curl -sS -X POST -H "Authorization: Bearer $AGENTCOMMENT_API_KEY" \
  "$AGENTCOMMENT_URL/v1/comments/{id}/unresolve"
```

## Start a thread (rare)

```bash
curl -sS -X POST -H "Authorization: Bearer $AGENTCOMMENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page_url":"http://t1d-site.test/","locator":"header h1","body":"…"}' \
  "$AGENTCOMMENT_URL/v1/projects/{slug}/comments"
```

Secret keys post as `author_role=agent`. Do not use a `pk_` key; that is the overlay.
