Skip to main content
A customer starts on a voice call, continues over chat, and follows up by email - often across different agents and even different devices. Treated as isolated exchanges, each hop starts cold: the new agent has no idea what was already said. Moss instead keeps a single continuous thread, so every interaction picks up where the last one left off. The thread is a session keyed by a shared name - a conversation ID, customer ID, or ticket number. One agent pushes its session to the cloud; the next agent opens a session with the same name and resumes with all prior context, with no re-embedding and no cold start.
Sessions are available in the Python, Swift, Elixir, and C SDKs today. JavaScript (Node) session support is coming.

How it works

A shared name is the rendezvous point. Anything pushed under that name is available to any agent, channel, or device that opens a session with it:
  • session(shared_id) auto-loads the cloud index with that name, pulling in everything prior agents accumulated.
  • push_index() writes the session back to the cloud under the same name.

Example

Agent A - voice channel. Builds context during the call, then hands off:
from moss import DocumentInfo, MossClient

client = MossClient(MOSS_PROJECT_ID, MOSS_PROJECT_KEY)

session = await client.session(index_name="conv-123")
await session.add_docs([
    DocumentInfo(id="turn-1", text="Customer reported a duplicate $49.99 charge."),
    DocumentInfo(id="turn-2", text="Agent confirmed a refund in 3-5 business days."),
])
await session.push_index()   # hand off
Agent B - chat channel, later (or another device). Resumes with everything Agent A had:
session = await client.session(index_name="conv-123")
print(f"Resumed with {session.doc_count} turns of prior context")

# Ground the next reply in the full cross-channel history.
results = await session.query("status of the refund", QueryOptions(top_k=3))
for doc in results.docs:
    print(f"{doc.id} score={doc.score:.3f} {doc.text}")

# Continue the conversation and hand off again.
await session.add_docs([
    DocumentInfo(id="turn-3", text="Customer confirmed the refund posted to their statement."),
])
await session.push_index()

Use cases

  • Omni-channel support - voice, chat, and email become one continuous thread instead of three disconnected transcripts. The customer never has to repeat themselves.
  • Agent escalation - a frontline bot hands a specialist (or a human) the full conversation history so they arrive with context already loaded, not a cold start.
  • Multi-device continuity - a customer switches from phone to desktop mid-session and the conversation continues seamlessly.

A unified thread

The pattern generalizes: anchor every interaction to a persistent, named context and the conversation behaves as one timeline rather than a series of restarts. Each agent reads the accumulated context, adds its own turns, and hands the enriched thread to whoever comes next.

Sessions guide

Create, resume, and persist sessions.

Live-call context

Short-term + long-term context in one call.