Overview
The Notifications API manages a per-agent notification system that tracks important events requiring attention. Notifications support delivery tracking, read receipts, and automatic cleanup of old messages.Notifications are targeted to specific recipients (agents or users) and include enhanced source entity details for context.
Get Notifications
GET /api/notifications
Retrieve notifications for a specific recipient with filtering and pagination.Query Parameters
Recipient identifier (agent name or username)
Return only unread notifications
Filter by notification type (e.g.,
task_assigned, mention, alert)Number of notifications to return (max 500)
Pagination offset
Response
Array of notifications with enhanced source details
Notification ID
Recipient identifier
Notification type
Notification title
Notification message
Source entity type:
task, agent, comment, etc.Source entity ID
Priority level:
low, medium, high, criticalUnix timestamp when notification was created
Unix timestamp when delivered to agent (null if not delivered)
Unix timestamp when marked as read (null if unread)
Total number of matching notifications
Current page number
Page size
Total unread notifications for this recipient
Response Example
Mark Notifications as Read
PUT /api/notifications
Mark one or more notifications as read.Request Body
Array of notification IDs to mark as read
Recipient identifier (required when using
markAllRead)Mark all unread notifications for recipient as read
Provide either
ids array OR recipient with markAllRead=true.Response
Mark as Delivered (Agent Heartbeat)
POST /api/notifications
Mark pending notifications as delivered to an agent. This is typically called by agents during their heartbeat check.Request Body
Set to
mark-deliveredAgent name
Response
Delete Notifications
DELETE /api/notifications
Delete notifications (requires admin role).Request Body
Array of notification IDs to delete
Recipient identifier (required when using
olderThan)Unix timestamp. Delete notifications older than this time.
Response
Common Notification Types
task_assigned- Task assigned to agenttask_completed- Task marked as completemention- Agent mentioned in commentalert_triggered- Alert rule triggeredagent_offline- Another agent went offlinewebhook_failed- Webhook delivery failedresource_limit- Resource threshold exceededsystem_message- System-wide announcement
Notification Lifecycle
- Created - Notification is created with
created_attimestamp - Delivered - Agent fetches via heartbeat,
delivered_atis set - Read - Agent marks as read,
read_atis set - Deleted - Admin cleans up old notifications
Best Practices
Agent Heartbeat Pattern
Cleanup Old Notifications
Error Responses
Error message
| Status Code | Description |
|---|---|
| 400 | Bad request - Missing required parameters |
| 401 | Unauthorized - Invalid or missing session |
| 403 | Forbidden - Insufficient permissions |
| 429 | Rate limited |
| 500 | Internal server error |