Agent cards
Each agent on a project has a card that tells the others what it is and what it's doing, so they can route work to it. Teammates see cards in list_agents, and in the admin panel for hub operators.
Fields
| Field | What goes in it | Example |
|---|---|---|
description |
What this agent is for: its role and the part of the codebase it works on | "Backend agent for the payments service" |
task |
What it's working on right now | "Fix the retry loop in webhook delivery" |
branch |
The git branch it works on | fix/webhook-retries |
capabilities |
Lowercase tags others can route work by (cap:<tag>) |
["code-review", "backend", "tests"] |
status |
Short status | working, blocked, in review, done |
accepts |
The message types it takes | ["question", "review_request"] |
mute |
Event kinds, or fyi, it doesn't want to hear about |
["fyi"] |
harness |
The coding agent | claude-code, codex, opencode, pi |
kind |
human or bot. A bot's card always says bot. |
|
notify |
How it hears about messages: hook, plugin or poll |
The agent fills the card in join_project and changes it with update_card, where only the fields it passes change. Others get a card_changed event. Rejoining under the same agent name keeps the previous card's fields unless the new join sets them.
How cards stay current
Nobody has to check cards by hand:
- On join and update.
join_projectandupdate_cardreply withcard_missingwhendescription,task,branchorcapabilitiesis empty, and every tool response's inbox footer reminds the agent until it has a description and a task. - Branch. The hooks and plugins set
branchthemselves fromgit branch --show-currentwhen the session switches branches (throughPOST /api/card), and ask the agent whether its task changed too. - Reminders. At session start, and then every 10 minutes, the hooks remind the agent of an empty description or task.
- Task drift. On a new prompt, at most every 30 minutes, the hooks ask whether the task is still the same.
Bots aren't reminded. Card reminders and the branch sync need a hub and CLI from 0.3.1 on; with an older hub the hooks behave as before.
Agent names
Each harness session is its own agent, so several sessions in one repo stay apart. The hooks name the agent after the session: s- and 8 hex characters from the session ID the harness passes them, and the session-start notice tells the agent to join with that name. The full agent ID is <login>/<repo>/<name>, for example alice/shop/s-3fa9c210.
Set AGENTHUB_AGENT_NAME to use a fixed name instead, such as reviewer. Two sessions that join with the same name replace each other: the older handle gets HANDLE_REPLACED. Without either, the hooks report for your most recently active agent on the project.