Handoff

Generate a cross-channel briefing for a human agent taking over a conversation.

A handoff briefing is a structured snapshot of everything ConvoMem knows about a customer: their full conversation journey, key memories, sentiment trend, open-issue detection, and an AI-written narrative. Designed to be injected directly into a human agent's context the moment they take over.

Get a briefing

const handoff = await client.getHandoff({ email: '[email protected]' })
 
if (handoff.found) {
  console.log('Narrative:', handoff.narrative)
  console.log('Key memories:', handoff.keyMemories)
  console.log('Sentiment:', handoff.sentimentTrend.direction)
  console.log('Open issue:', handoff.openIssue.isOpen)
}

Options

OptionTypeDefaultDescription
freshbooleanfalseBypass the 10-minute cache to get the latest state
narrativebooleantrueSet to false to skip the LLM-written summary — faster, structured-data only
const handoff = await client.getHandoff(
  { customerId: 'cust_uuid_123' },
  { fresh: true, narrative: true },
)

Response fields

FieldTypeDescription
foundbooleanfalse if the customer doesn't exist or has no history
customerCustomerFull customer profile
journeyConversationSummary[]Recent conversation sessions, newest first
keyMemoriesMemory[]Top memories ranked by importance and recency
sentimentTrendobject{ direction: "positive" | "neutral" | "negative" | "stable", current: number }
openIssueobject{ isOpen: boolean, summary?: string } — unresolved issue detection
narrativestring | nullAI-written paragraph summarizing the customer's history
narrativeSourcestring"generated", "cached", or "skipped"

Injecting into a human agent

agent-context.ts
const handoff = await client.getHandoff(
  { customerId: escalatedCustomerId },
  { fresh: true },
)
 
const briefing = `
## Customer briefing
 
${handoff.narrative ?? 'No prior history.'}
 
### Key facts
${handoff.keyMemories.map((m) => `- ${m.content}`).join('\n')}
 
### Sentiment
${handoff.sentimentTrend.direction} (score: ${handoff.sentimentTrend.current})
 
### Open issue
${handoff.openIssue.isOpen ? handoff.openIssue.summary : 'None'}
`.trim()

By customer ID (path-based route)

For direct ID access, the SDK routes to the path-based endpoint:

// With customerId → GET /api/v1/customers/:id/handoff
const handoff = await client.getHandoff({ customerId: 'cust_uuid_123' })
 
// Without customerId → GET /api/v1/customers/handoff?email=…
const handoff = await client.getHandoff({ email: '[email protected]' })

What's next

  • Customers — manage the profiles behind briefings
  • Conversations — manage and escalate sessions
  • Embed — browser widget for customer-facing agent panels

SDK: TypeScript · Python · Rust