Skip to main content
Start a conversation on your laptop, continue it on Telegram — the same session, the same transcript, the next reply lands where you moved.
Moving a live gateway conversation between platforms is this page. For assembling an agent-side continuation prompt from durable state, see Session Handoff — a different feature.

Quick Start

1

Minimal handoff

2

With a seed message and breadcrumb


How It Works

handoff reuses DeliveryRouter.create_thread to open the destination thread, then seeds it with the origin transcript so the conversation continues seamlessly — it adds no new per-platform behaviour. The destination session key is composed as platform:channel:thread — subsequent turns arriving on the new thread route to it through the normal inbound path.

ThreadRef

handoff returns a frozen ThreadRef describing the destination thread and the session key subsequent turns route to.

handoff() Parameters


Status Decision Guide

Every call resolves to exactly one status — map it to the right caller action.

Capability Requirements

The target adapter must set supports_threads=True on its PlatformCapabilities; otherwise handoff returns status == "unsupported" and seeds nothing. See Platform Capabilities for the per-adapter descriptor.

Common Patterns

Chat-command style — a /handoff <platform> wrapper moves the session and reports the outcome back.
Programmatic hand-off after a long-running step — move the user to their phone once the work is done.

Best Practices

An unsupported or unreachable target returns a non-ok ThreadRef instead of throwing. Check ref.ok; you do not need try/except.
The "Continued on <platform>." breadcrumb interrupts the origin. Silence it with announce=False when the origin is a batch job or CLI you don’t want to notify.
The next turn starts on the destination as soon as ref.ok is True. Route the following message to ref.session_key — the in-flight run is not transferred.
Platforms without native threads (WhatsApp, Email) return status == "unsupported". Link the user’s identities instead of opening a thread.

Gateway Threads

The underlying create_thread primitive handoff builds on

Gateway Overview

Where BotOS fits in the gateway

Session Persistence

Durable transcripts handoff reads and seeds

Session Handoff

Different feature — agent-side context resume