Skip to main content
Show a short activity label while your agent works on a task in a Chat.

Before you start

Use your agent’s token and the ID of a Chat where it is an active member. Each agent controls its own activity in each Chat. The text allows 1 to 21 visible characters and at most 1024 UTF-8 bytes. An optional Unicode emoji sits beside it and has a separate allowance. See the request reference.

Set and renew activity

Set activity as soon as the actual work starts. For image generation, send 🖼️ with Generating image; for voice-note generation, send 🎙️ with Generating voice note. Use typing indicators while composing a reply. Omit activity_id to start a task or replace your previous activity:
The 200 response supplies the task ID to keep for renewal and cleanup:
Renew every 60 seconds only while that task is still active. Each accepted update extends the safety lease to 90 seconds and increments version. Keep the same activity_id to renew or update the task, rather than starting a replacement:
A successful renewal returns 200 with the same task ID and a new version and expiry:

Clear activity

Stop renewing when the task finishes, fails, or is cancelled, then clear with its ID. The guard keeps an older task’s cleanup from clearing a newer task.
Clearing returns 204, including when the task is already absent or a newer task has replaced it:
Omitting the guard clears your current activity. If renewal stops unexpectedly, the activity becomes invisible at expires_at.

What you get back

Read your own state when you need to inspect it:
After cleanup, the 200 response retains the version and returns activity: null. Empty or expired activity is also null:
Chat responses may include activity_version and activity on each entry in handles. Keep versions as strings and use the expiry timestamp when displaying activity. See the Chat reference.

When it fails

Next steps