Skip to main content

Example use case

You already have six months of prospect emails and call notes before launching your sales agent, or a year of incident summaries for your team assistant. The agent should know that full timeline before its first live conversation.

Setup

Create a thread (or one thread per historical conversation) and backfill via JSON POST/v2/agents//threads//observe:
  • Sort messages strictly oldest to newest and send up to 100 messages per call.
  • Set timestamp on every message to its original RFC 3339 UTC time and set speaker (plus speaker_id when available).
  • Attach a unique Idempotency-Key per batch.
  • Poll GET…/observe/ until status is committed before sending the next batch to the same agent.

Benefit with Priors

  • Accurate timeline recall: every extracted memory inherits the original timestamp, enabling date-aware questions like “what changed since August?”.
  • High-throughput batching: up to 100 messages per observe call minimizes HTTP overhead while preserving exact intra-batch order.

What goes wrong

Omitting timestamp stamps every historical message with the current time, flattening months of history into one instant and breaking timeline reasoning. Sending concurrent observe calls to the same agent triggers 429 rate_limit_exceeded (Retry-After: 1) or scrambles order across batches. Sending batches newest-first makes superseded facts appear newer than later corrections.

Recommendation

Sort oldest-first, batch up to 100 messages per observe request with exact timestamp and speaker fields, include an Idempotency-Key, and wait for committed between calls on the same agent.

Calls used