Skip to main content
Every Gateway session gets a stable, shareable address like chat/<agentId>/<slug>-<shortId> so a link works across reconnects and never leaks the raw UUID.

Quick Start

1

Build a shareable URL

Turn a runtime session key into a stable URL segment.
2

Parse a path back into a SessionRef

Recover the reference a resolver looks up.

How It Works

A client sends a friendly path; the gateway’s session.resolve maps it back to a concrete session id.

User interaction flow

A user copies a chat URL from their laptop and pastes it on their phone. The mobile client calls session.resolve with the friendly path; the gateway returns the concrete session id and the same conversation reopens — no raw UUID ever changed hands.

The four addressing forms

Pick the form that matches how much the URL should reveal.

Configuration Options

These are pure functions and constants — no config class. All seven symbols import from one place:

Common Patterns

Dashboard deep-link — build a shareable URL from an agent plus its session key.
Cross-device reconnect — parse an incoming path, then ask the gateway to resolve it.
File-like key round-trip — keys that look like assets survive losslessly via the escape hatch.

Best Practices

The !<key> form exposes the whole key in the URL. Let build_session_path derive a short id whenever the key has a UUID tail so the raw key stays hidden.
Short ids only need to be unique within one agent’s namespace — agent_id scopes the lookup, and a resolver disambiguates the rare clash.
Reserved sentinels are friendly named sessions, not short-id lookups. A resolver maps them to a well-known session such as the agent’s main conversation.
Always percent-escape via build_session_path and let parse_session_path decode. An id containing / (e.g. team/assistant) round-trips correctly only when it goes through the grammar.
This ships the pure grammar plus the session.resolve method contract (scope: read). The concrete store-backed resolver, the praisonai gateway session resolve/url CLI, and dashboard URL building are wrapper follow-ups — not part of this change.

Session Portability

Back up, migrate, and restore gateway sessions

Session Sharing

Multi-observer read-only and co-driven sessions

Operator Scopes

Least-privilege RBAC — where session.resolve sits

Session Protocol

The pluggable store contract behind sessions