Activity
Log what your agent is doing and show processing state
Overview
Activity events appear in the user's activity feed in the Nod app. Use them to show what your agent is doing — files edited, commands run, searches made.
/api/agent/eventsLog an activity entry via REST.
typerequiredtitlerequiredtexttask_run_idPOST /api/agent/events
X-Nod-Agent-Id: agt_abc123
X-Nod-Secret: nod_abc123...
{
"type": "alert",
"title": "Deployment completed",
"text": "v2.4.1 deployed to staging"
}{
"type": "alert",
"title": "Running tests",
"text": "npm test -- --coverage",
"task_run_id": "run_abc123"
}WebSocket frameLog activity via WebSocket.
{
"type": "alert",
"title": "Editing src/index.ts",
"text": "/Users/alice/project/src/index.ts",
"task_run_id": "run_abc123"
}Processing indicators
Show users when your agent is actively working. The Nod app displays a "Thinking..." bubble in the chat. While the indicator is active, any alert events your agent logs will update the bubble text in real time. Available via both REST and WebSocket.
/api/agent/eventsControl the processing indicator via REST. Use processing_start when your agent begins working, and processing_stop when it finishes. The indicator auto-clears after 30 seconds if processing_stop is never received.
typerequiredconversation_idstatus_textprocessing_start when your agent begins a task, and processing_stop when it finishes. If your agent crashes and processing_stop is never sent, the indicator auto-clears after 30 seconds.POST /api/agent/events
X-Nod-Agent-Id: agt_abc123
X-Nod-Secret: nod_abc123...
{
"type": "processing_start",
"conversation_id": "conv_abc123"
}{
"type": "processing_start",
"conversation_id": "conv_abc123",
"status_text": "Searching the web..."
}{
"type": "processing_stop",
"conversation_id": "conv_abc123"
}WebSocket frameFor WebSocket-connected agents, send heartbeat and idle frames instead. The heartbeat-based approach gives real-time status updates since agents send it every ~1 second.
conversation_idstatus_textagent_heartbeat every ~1 second while working. Change status_text as the activity changes — the app updates instantly. Send agent_idle when done.{
"type": "agent_heartbeat",
"conversation_id": "conv_abc123"
}{
"type": "agent_heartbeat",
"conversation_id": "conv_abc123",
"status_text": "Searching the web..."
}{
"type": "agent_idle",
"conversation_id": "conv_abc123"
}Event types
| Type | Description |
|---|---|
| decision_created | A new request was created |
| decision_resolved | A request was approved/rejected/responded to |
| agent_message | Agent sent a message |
| agent_action | Agent performed an action (alert) |
| system | System event (agent connected, etc.) |