Skip to main content
Quick summary
The SDK uses a delegate pattern to broadcast important events during a session’s lifecycle. By conforming to the SukiAmbientSessionDelegate protocol and implementing sukiAmbient(sessionEvent:for:), you receive real-time updates about session state changes.

Use a switch statement to handle specific events like .started, .paused, .suggestionsGenerated, .sessionTerminatedByPeer, or .convertedToOfflineSession to update your UI or handle errors accordingly.
The SDK uses a delegate pattern to broadcast important events that occur during a session’s lifecycle. By conforming to the SukiAmbientSessionDelegate protocol, you can receive real-time updates and respond to state changes in your application, such as updating your UI or handling errors. What will you learn? In this guide, you will learn how to:
  • Use the SukiAmbientSessionDelegate protocol.
  • Implement the sukiAmbient(sessionEvent:for:) method.
  • Handle the events that are relevant to your application using a switch statement.

How to implement the session delegate

1. Conform to the protocol

First, declare that your class conforms to the SukiAmbientSessionDelegate protocol. You must also pass an instance of this delegate class when you initialize the SDK.

2. Implement the delegate method

Next, implement the sukiAmbient(sessionEvent:for:) method. The SDK calls this method every time a new session event occurs, providing the event type and the associated sessionId. Use a switch statement within this method to handle the events that are relevant to your application.

Available session events

The SessionEvent enum provides the following cases, which are grouped by category for clarity.

Recording lifecycle

enum
Recording lifecycle events for ambient sessions.

Content generation

enum
Content generation events for note suggestions.

Offline mode & uploading

enum
Offline mode and audio upload events.

Audio interruptions

enum
Audio interruption events during recording.

All available session events cases

Below is the complete list of all available session events cases:

FAQs

Yes. Listen for sessionEvent callbacks. Each callback includes the sessionId for the ambient session that produced the event.
No, you cannot create a new case inside the SessionEvent enum. You must use the existing cases.
We have so many cases because we want to be able to handle all the possible events that can occur during a session.
Last modified on July 24, 2026