Connect to Agentic Platform
Admin guide: send live agent, run, log and alert data from your platform into WiggiWatch
Current status: mock data
This dashboard currently renders sample data from src/lib/mockData.ts. The endpoints below describe the contract your agentic platform should follow. They must be implemented in a backend before live data appears.
Create an API key
Generate a key in Settings → API keys. Use a dedicated key per platform or environment so it can be rotated independently. Keep it server-side only, never in browser code.
AGENTWATCH_URL=https://YOUR_DASHBOARD_URL
AGENTWATCH_API_KEY=YOUR_API_KEY_HERE
AGENTWATCH_WEBHOOK_SECRET=YOUR_WEBHOOK_SECRET_HEREChoose your ingestion endpoints
Your platform pushes events to these endpoints. All requests require the Bearer token from step 1.
| Method | Path | Purpose |
|---|---|---|
| POST | /api/ingest/agents | Register or update an agent and its status |
| POST | /api/ingest/runs | Report task run start, progress and completion |
| POST | /api/ingest/logs | Send log lines (single or batched) |
| POST | /api/ingest/alerts | Raise or resolve alerts |
| GET | /api/stream | Server-Sent Events stream used by the dashboard |
curl -X POST https://YOUR_DASHBOARD_URL/api/ingest/runs \
-H "Authorization: Bearer YOUR_API_KEY" -H"Content-Type: application/json" \
-d '{"run_id":"run_8f21","agent_id":"agt_research_01","status":"running"}'async function reportRun(run: Record<string, unknown>) {
await fetch(process.env.AGENTWATCH_URL + '/api/ingest/runs', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.AGENTWATCH_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(run),
});
}Send data in the expected formats
Timestamps must be ISO 8601 in UTC. Costs are in USD. Unknown fields are ignored.
{
"agent_id": "agt_research_01",
"name": "Research Agent",
"role": "worker",
"parent_id": "agt_orchestrator",
"status": "running",
"model": "gpt-4o",
"updated_at": "2026-12-05T12:00:00Z"
}{
"run_id": "run_8f21",
"agent_id": "agt_research_01",
"task": "Summarise Q4 support tickets",
"status": "completed",
"started_at": "2026-12-05T11:58:00Z",
"ended_at": "2026-12-05T11:59:12Z",
"latency_ms": 72000,
"tokens_in": 4210,
"tokens_out": 980,
"cost_usd": 0.042,
"tool_calls": 6,
"error": null
}{
"logs": [
{
"ts": "2026-12-05T11:59:01Z",
"level": "error",
"agent_id": "agt_research_01",
"run_id": "run_8f21",
"message": "Tool call timed out: web_search"
}
]
}{
"alert_id": "alt_301",
"severity": "critical",
"agent_id": "agt_research_01",
"title": "Error rate above 5% for 10 minutes",
"state": "open"
}Allowed status values: running, idle, queued, completed, failed. Allowed level values: debug, info, warn, error.
Enable live streaming to the dashboard
The dashboard subscribes to a Server-Sent Events stream so cards, the Kanban board and the activity feed update without a refresh. Events emitted: agent.updated, run.updated, log.created, alert.updated.
const source = new EventSource('/api/stream?channels=agents,runs,logs,alerts');
source.addEventListener('run.updated', (event) => {
const run = JSON.parse((event as MessageEvent).data);
// merge run into dashboard state
});
source.onerror = () => {
// EventSource reconnects automatically; show a "reconnecting" badge
};If SSE is not possible in your environment, poll the same resources every 5 to 10 seconds as a fallback.
Secure the connection
- Serve everything over HTTPS and reject plain HTTP.
- Validate the Bearer token on every ingest request; return 401 for missing or invalid keys.
- Sign webhook payloads with an HMAC-SHA256 header and verify it using the webhook secret.
- Rate limit per key (for example 600 requests per minute) and return 429 with a Retry-After header.
- Rotate keys regularly and revoke any key that may have been exposed.
- Strip prompts, PII and secrets from log messages before sending.
Test the connection
Enter your platform base URL to validate its format, then send a test run using the cURL example above and watch the Live Dashboard.
This is a format check only. Live ingestion is available once a backend endpoint is connected.
Troubleshooting
- 401 Unauthorized: the API key is missing, expired or revoked.
- 422 Unprocessable: a required field such as agent_id or status is missing or invalid.
- Data not appearing: confirm the stream is connected and the workspace matches acme-platform-prod.
- Stale agents: send a heartbeat to /api/ingest/agents at least every 30 seconds.