Skip to content

Incident Coordination

Alga provides structured communication channels for coordinating incident response: a coordination message stream, typed coordination tasks for agent work, public status updates, and optional Slack incident channels.

Coordination Messages

The coordination stream is a real-time message feed within each incident (IncidentCoordinationMessage). Each message records an actor, a body, and metadata, and can be threaded and linked to investigations or tasks.

Message Kinds

KindPurpose
chatDefault conversational message (the default when kind is omitted)
systemSystem-generated message
decisionA key decision made during the incident
actionAn action taken or planned
agent_replyA reply posted by an agent
investigation_summaryA summarized investigation result
status_updateA public status update (see Status Updates)

Message Fields

FieldDescription
kindMessage kind (defaults to chat)
actor_type / actor_id / actor_display_nameWho posted the message (system, user, or agent)
bodyMessage text (required)
internalInternal-only flag (not for external stakeholders)
sourceOrigin of the message (defaults to alga)
parent_message_idParent message for threading
linked_investigation_idInvestigation this message relates to
linked_coordination_task_idCoordination task this message relates to
slack_channel_id / slack_message_ts / slack_thread_tsSlack mirroring references
provider_message_idExternal provider message identifier

API Endpoints

MethodPathPermissionDescription
GET/api/v1/incidents/{id}/coordination/messagesincidents:readList coordination messages
POST/api/v1/incidents/{id}/coordination/messagesincidents:writeAdd coordination message
sh
curl -X POST http://localhost:8080/api/v1/incidents/{id}/coordination/messages \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "decision",
    "body": "Decided to failover to us-east-2 region.",
    "internal": false
  }'

Coordination Tasks

Coordination tasks (CoordinationTask) are typed, persisted work units that structure agent collaboration. A commander dispatches tasks; responder/communicator agents claim and complete them. Tasks form parent/child trees.

Task Kinds

investigate, communicate, verify, mitigate, synthesize (defaults to investigate).

Task Lifecycle

pending → assigned → in_progress → complete
                                 → failed
                                 → cancelled
StatusMeaning
pendingCreated, not yet claimed
assignedClaimed by an agent
in_progressActively being worked
completeFinished with a result
failedFailed (with failure_reason)
cancelledCancelled

Task Fields

FieldDescription
kindTask kind (defaults to investigate)
assignee_roleTarget role (defaults to responder)
assignee_agent_id / assignee_agent_nameAssigned agent
goalWhat the task must achieve (required)
input_contextStructured input (JSON)
result / result_schemaStructured output and its schema
linked_investigation_idInvestigation spawned by this task
priorityNumeric priority
due_atOptional deadline
dispatch_attemptsNumber of dispatch attempts
parent_task_idParent task for sub-task trees

API Endpoints

MethodPathPermissionDescription
GET/api/v1/incidents/{id}/coordination/tasksincidents:readList coordination tasks (filter by status, assignee_role)
POST/api/v1/incidents/{id}/coordination/tasksincidents:writeCreate a coordination task
PATCH/api/v1/incidents/{id}/coordination/tasksincidents:writeUpdate a task's status
sh
curl -X POST http://localhost:8080/api/v1/incidents/{id}/coordination/tasks \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "investigate",
    "assignee_role": "responder",
    "goal": "Determine whether the database connection pool is exhausted"
  }'

Status Updates

Status updates are public coordination messages (kind status_update) that track the response phase for stakeholders. Each is recorded on the incident timeline.

Status Levels

LevelMeaning
investigatingTeam is actively looking into the issue
identifiedRoot cause has been found
mitigatedContainment/fix is in place
monitoringFix deployed, watching for recovery
resolvedIncident resolved, service confirmed healthy

API Endpoints

MethodPathPermissionDescription
GET/api/v1/incidents/{id}/status-updatesincidents:readList status updates (newest first)
POST/api/v1/incidents/{id}/status-updatesincidents:commandCreate status update
sh
curl -X POST http://localhost:8080/api/v1/incidents/{id}/status-updates \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status_level": "identified",
    "body": "Root cause: connection pool leak in auth-service v2.3.1"
  }'

Slack Incident Channels

Incidents can get a dedicated Slack channel for teams that primarily operate in Slack. When linked, coordination messages and status updates are posted to the channel, and replies are synced back to the coordination stream.

API Endpoints

MethodPathPermissionDescription
POST/api/v1/incidents/{id}/slack-channelincidents:commandCreate dedicated Slack channel
DELETE/api/v1/incidents/{id}/slack-channelincidents:commandDelete/unlink Slack channel

Configuration

These system-config keys control incident channel behavior:

KeyDescriptionDefault
slack_incident_channels_enabledEnable per-incident Slack channelsfalse
slack_incident_channel_visibilityChannel visibility (public or private)private
slack_incident_channel_trigger_statusIncident status that triggers channel creation (active or detected)active
slack_incident_channel_archive_on_closeArchive the channel when the incident closestrue

Investigation Thread

Each incident also has a technical investigation thread separate from the coordination stream, used for agent findings, analysis, and technical discussion.

MethodPathPermissionDescription
GET/api/v1/incidents/{incident_id}/threadincidents:readGet investigation thread
POST/api/v1/incidents/{incident_id}/thread/messagesincidents:writeAdd message to thread

See Also

Released under the MIT License.