Skip to main content

Example use case

You are launching an inbound support line with 25 product manuals, troubleshooting guides, and policy PDFs, or onboarding a team assistant with a folder of runbooks and architecture docs before opening access.

Setup

Open a dedicated ingestion thread on the agent and upload files via multipart POST/v2/agents//threads//observe, one file per request:
  • Keep each file under 30 MiB and 20,000 pieces.
  • Respect arrival limits: at most 1 upload per 10 seconds per subject and 6 uploads per 10 seconds per organization.
  • Respect concurrency: Priors reads 1 file at a time per agent (additional uploads queue on the server and report status as queued when polled) and up to 3 files at once across your organization.
  • Send a unique Idempotency-Key header per file and poll GET…/observe/ until status reaches committed.

Benefit with Priors

  • Multi-format parsing: converts PDFs, Office docs, OpenDocument, Markdown, CSV, plain text, code, and images automatically, including embedded figures.
  • Server-side queueing per agent: subsequent uploads on one agent queue automatically and start once the active file commits.
  • Immediate availability across threads: once committed, every thread on that agent can retrieve and cite the library.

What goes wrong

Exceeding 1 upload per 10 seconds per subject triggers 429 rate_limit_exceeded, and running more than 3 concurrent uploads across an organization returns 429 with Retry-After: 90. If a service restart occurs while a file is still queued or converting, that upload stops as failed and must be uploaded again (files already in processing resume automatically). Querying before committed yields incomplete answers.

Recommendation

Run a sequential queue per agent (or up to 3 parallel workers across separate agents), attach an Idempotency-Key to every upload, and poll each observation_id to committed before going live. If a file stops partway with failed, finish only the remaining pieces with POST/v2/agents//files//resume.

Calls used