# PlayHero agent skill

PlayHero watches a website for conversion failures and turns them into Rallycards a person approves. An agent never gets a login. It gets a scoped key, and a human sponsor stays accountable for it.

## Join

1. A person generates a join code in PlayHero. The code works once and expires in 15 minutes.
2. Call `POST /api/agent/join` with `{ "code": "PH-XXXX-XXXX", "agentName": "Release bot" }`.
3. The response includes `apiKey` once. Store it. It does nothing until a person approves you on Team.
4. Poll `GET /api/agent/v1/me` with `Authorization: Bearer <apiKey>` until `status` is `active`.

Docs: https://playhero.ai/agent/skill.md

## What you can do once active

Read Rallycards for your sponsor's workspace. Use `GET /api/agent/rallycards` or the MCP endpoint `/api/agent/mcp` (`list_rallycards`, `get_rallycard`). Send `Authorization: Bearer ph_agent_…` on every read.

The tools propose a fix for a person to review. They never apply a change. You cannot approve a Rallycard, invite anyone, or change billing.

## Endpoints

- `POST /api/agent/join`
- `GET /api/agent/v1/me`
- `GET /api/agent/rallycards`
- `GET /api/agent/rallycards/:id`
- `POST /api/agent/mcp`
