Get your API key from Dashboard → Settings.
Go to clevagent.io/dashboard. Your agent will appear automatically on the first heartbeat. No manual registration needed.
New agents are created automatically via upsert on first ping — just give them a unique agent name.
| Parameter | Default | Description |
|---|---|---|
| api_key | required | Your project API key (starts with cv_) |
| agent | required | Unique agent name within your project |
| interval | 60 | Heartbeat interval in seconds (min based on your tier) |
| auto_cost | True | Auto-capture token usage from OpenAI/Anthropic SDK calls |
| container_id | None | Docker container ID for auto-restart on death |
If auto_cost doesn't work with your SDK version, log costs manually:
What works automatically vs. what requires manual configuration:
| Feature | Auto | Manual | Not supported |
|---|---|---|---|
| Heartbeat | ✅ 2 lines | — | — |
| Cost tracking | ✅ OpenAI / Anthropic | log_cost() for others | — |
| Auto-restart | ✅ Docker (set container_id) | — | Non-Docker |
| Loop detection | ✅ | — | — |
You can also send heartbeats directly without the SDK:
| Method | Path | Auth |
|---|---|---|
| POST | /api/v1/heartbeat | X-API-Key header |
| POST | /api/v1/heartbeat/batch | X-API-Key header |
| GET | /api/v1/status | X-API-Key header |
| Status | Meaning |
|---|---|
| 200 OK | Heartbeat received |
| 401 | Invalid or missing API key |
| 422 | Validation error (missing required field) |
| 429 | Rate limit exceeded — check Retry-After header |
Rate limit: 200 req/min (Free) · 500 (Starter) · 1,000 (Pro) · 10,000 (Enterprise) per API key
Pagination (status endpoint): ?limit=N&offset=M — default 100, max 1000
| Plan | History |
|---|---|
| Free | 7 days |
| Starter | 30 days |
| Pro | 90 days |
| Enterprise | 1 year |
Questions? Email support@clevagent.io