Skip to main content
Blocks fits cleanly into multi-step workflows where one stage needs an AI agent to do work and a later stage needs to consume the result. A workflow can create a session, wait for the assistant’s final_message, and then continue with the next action in your system.

Typical workflow shape

  1. A workflow step decides work should be delegated to Blocks.
  2. It creates a session with POST /rest/v1/sessions.
  3. It stores the returned session_id and _links.final_message.href.
  4. It polls or schedules a follow-up check for the final assistant message.
  5. It uses that result to continue the workflow.

Example uses

  • Create a Jira or Linear issue after Blocks produces a scoped implementation plan
  • Run a review or triage step, then route based on the final recommendation
  • Generate a technical summary that another workflow step posts to Slack or email
  • Start a coding task, then trigger downstream automation when the final answer is ready

Example

Why this works well

  • The session ID gives every workflow run a durable reference
  • final_message provides a clean handoff point for downstream systems
  • Follow-up messages let later workflow steps continue the same session when needed
For the API details behind this pattern, start with Quick Start and Send Messages.