# AIFocus agent reporting instructions

Install this instruction in every local AI agent that works on your projects. The goal is simple: whenever an agent starts, pauses, gets blocked, or finishes work, it reports back to the always-open AIFocus dashboard.

## Dashboard credentials

- Dashboard code: DEMO-FOCUS
- API key: aif_demo_key
- REST endpoint: https://aifocus.11i.sh/api/v1/projects
- MCP endpoint: https://aifocus.11i.sh/api/mcp

Treat the API key like a secret. Do not commit it to git or paste it into public logs.

## Required agent behaviour

At the start of any non-trivial task, send a status update with `status: "working"`.

When waiting on a long command, another agent, or human context, send `status: "waiting"` or `status: "blocked"`.

When the task is complete and verified, send `status: "done"`. This is how the always-open screen shows that an agent finished and needs attention.

Use the current project or repo name as `project`. Use the agent name or tool name as `source`.

## REST update command

```bash
curl -X POST https://aifocus.11i.sh/api/v1/projects \
  -H "Content-Type: application/json" \
  -H "X-AIFOCUS-Key: aif_demo_key" \
  -d '{
    "dashboardCode": "DEMO-FOCUS",
    "project": "<project or repo name>",
    "workingOn": "<what the agent is doing right now>",
    "whatsNext": "<next action or decision needed>",
    "notes": "<short context, blocker, PR, test result, or handoff>",
    "status": "working",
    "source": "<agent name>"
  }'
```

Allowed statuses: `working`, `waiting`, `next`, `blocked`, `done`.

## MCP tool contract

Call `tools/call` on https://aifocus.11i.sh/api/mcp with tool `update_project` and the same fields:

```json
{
  "dashboardCode": "DEMO-FOCUS",
  "apiKey": "aif_demo_key",
  "project": "<project or repo name>",
  "workingOn": "<what the agent is doing right now>",
  "whatsNext": "<next action or decision needed>",
  "notes": "<short context, blocker, PR, test result, or handoff>",
  "status": "working",
  "source": "<agent name>"
}
```

## Future behaviour

AIFocus will later expose new tasks from tools such as Linear. For now, agents should only report status into AIFocus and continue taking tasks from their normal source.
