Notifications

The runtime publishes notifications on every meaningful transition: agent lifecycle, task progress, coordination events, and derived signals like repeated failures or approaching iteration limits. Subscribe to the stream to observe agent execution from outside.

See Agent notifications for how to subscribe.

This page is a catalog of all notification types. Two distinct families exist:

  • Autonomous agent notifications: the Notification sealed interface and its records, emitted by an agent instance and observed by subscribing to its notification stream.

  • Task entity notifications: the TaskNotification sealed interface in akka.javasdk.agent.task, published by the task entities themselves.

Each link below points at the JavaDoc for the exact field set.

Autonomous agent notifications

Every autonomous agent notification implements the Notification sealed interface and exactly one capability-grouped marker sub-interface. Pattern-match on a marker to handle a whole family generically.

Lifecycle

Notification.LifecycleNotification: agent activation, iteration boundaries, and suspend/resume/stop transitions.

Notification Description

Notification.Activated

Agent transitioned from idle to processing.

Notification.Deactivated

No more work, back to idle.

Notification.IterationStarted

Model call beginning.

Notification.IterationCompleted

Iteration completed successfully, with token usage.

Notification.IterationFailed

Iteration failed, optionally tied to a task and iteration number.

Notification.Suspended

Agent suspended, with the source of the suspend.

Notification.Resumed

Agent resumed, with the source of the resume.

Notification.Stopped

Agent stopped, distinguishing operator terminate from auto-stop on queue drain.

Task

Notification.TaskNotification: assignment, start, completion, failure, cancellation, and dependency events.

Notification Description

Notification.TaskAssigned

A task was accepted or queued, fires before the agent starts working on it.

Notification.TaskStarted

Agent started working on a task.

Notification.TaskResultRejected

Result rejected by a task rule.

Notification.TaskCompleted

Task completed successfully.

Notification.TaskFailed

Task failed during execution, either by the model’s decision or because the iteration limit was reached.

Notification.TaskCancelled

Task terminated before execution began, for example by a dependency failure or orphan cleanup.

Notification.TaskDependencyWait

Task is blocked waiting for dependencies.

Notification.DependencyResolved

A specific dependency resolved, with success or failure.

Handoff

Notification.HandoffNotification: source-side and target-side of cross-agent handoffs.

Notification Description

Notification.HandoffStarted

Source side. This agent handed off a task to a target.

Notification.HandoffReceived

Target side. This agent received a handed-off task from a source.

Delegation

Notification.DelegationNotification: orchestrator-side and worker-side of subtask delegation.

Notification Description

Notification.DelegationStarted

Orchestrator side. A batch of subtasks was dispatched to one or more workers.

Notification.DelegationResolved

Orchestrator side. Aggregate resolution of a delegation batch.

Notification.WorkerTaskReceived

Worker side. This agent accepted a delegated subtask.

Notification.WorkerTaskCompleted

Worker side. Delegated subtask finished.

Team

Notification.TeamNotification: team formation, member lifecycle, and disbanding.

Notification Description

Notification.TeamCreated

Lead side. A new team was formed.

Notification.TeamMemberReady

Lead side. A member’s setup chain completed.

Notification.TeamMemberSetupFailed

Lead side. A member’s setup chain failed.

Notification.TeamMemberStopped

Lead side. A member has stopped.

Notification.TeamDisbanded

Lead side. Team disbanded.

Notification.TeamJoined

Member side. This agent joined a team.

Conversation

Notification.ConversationNotification: conversation creation, turns, and participation lifecycle.

Notification Description

Notification.ConversationCreated

Moderator side. A new conversation was created with a set of participants.

Notification.ConversationParticipantReady

Moderator side. A participant’s setup completed.

Notification.ConversationParticipantSetupFailed

Moderator side. A participant’s setup failed.

Notification.ConversationEnded

Moderator side. The conversation ended.

Notification.ConversationTurnReceived

Moderator side. A turn was received from a participant.

Notification.ConversationJoined

Participant side. This agent joined a conversation.

Notification.ParticipantTurnSubmitted

Participant side. This agent submitted its turn.

Messaging

Notification.MessagingNotification: contact introductions and message delivery.

Notification Description

Notification.MessageReceived

A message was received from another agent.

Notification.ContactAdded

A new contact was introduced.

Struggle

Notification.StruggleNotification: derived signals for repeated failures, stuck dependencies, and approaching limits. The runtime tracks counters and emits these once per detection. Notifications are deduplicated until the underlying counter resets, for example on task termination or successful recovery. Thresholds are configurable in reference.conf under akka.runtime.autonomous-agent.struggle.

Notification Description

Notification.TaskStruggleDetected

Repeated iteration failures or repeated rule rejections on the same task.

Notification.TaskDependencyStuck

A task has been waiting on dependencies past the configured threshold; re-fires periodically.

Notification.TaskApproachingMaxIterations

A task has reached the configured fraction (default 80%) of its max iterations.

Notification.RepeatedIterationFailure

Repeated iteration failures in flows not tied to a specific task (pre-task setup, request-based delegation).

Task entity notifications

akka.javasdk.agent.task.TaskNotification is published by the task entity itself on every terminal transition. This is the persistent, entity-level event used by the runtime for TaskClient.resultAsync and similar deliver-on-completion APIs.

Non-terminal transitions (created, assigned, started, reassigned) do not publish a notification. They are observable through event-sourced history or by reading the task snapshot.

Notification Description

TaskNotification.Completed

Task completed successfully, carrying the JSON-encoded result.

TaskNotification.ResultRejected

A task rule rejected the result.

TaskNotification.Failed

Task failed.

TaskNotification.Cancelled

Task was cancelled.