Skip to main content

Choosing between the four answering calls

Every v2 answering call searches the agent’s memory using the message and recent thread history. The four calls differ along two choices: who writes the final reply and whether the turn is learned into memory.
  • Default path (Priors answers): use observe-and-respond when conversations should teach the agent (such as a sales agent per prospect or a team assistant). Use respond when the agent answers from fixed documents and must never learn from user questions (such as an inbound support line).
  • Bring your own model: use observe-and-recall or recall to retrieve raw dated memories and assemble your own prompt.
observe-and-respond and observe-and-recall learn from the message you send. On a shared public agent (like an inbound support line), use respond or recall so one user’s question never becomes a memory another user can retrieve.

Controlling learning

Learning is decided per call. Call respond or recall instead of observe-and-respond or observe-and-recall. The message still joins the thread for short-term follow-ups, but Priors writes no long-term memories from it (nor from the reply). There is no agent-wide switch: an agent that must never learn from users is one your code only ever calls with respond and recall.

Default path: observe-and-respond and respond

Use these calls when you want Priors to retrieve memories, synthesize a finished answer, and return file citations. Both endpoints run normally while a file is being uploaded or learned.
To answer without learning, send the exact same request (without learn_reply) to POST/v2/agents//threads//respond.

Request fields

Success response (200)

Streaming (stream: true)

When stream: true, Priors returns text/event-stream with server-sent events: A stream always ends with exactly one complete or one error event.

Bring your own model: observe-and-recall and recall

Use these calls when your product already runs its own language model, prompt, and tool loop. Priors runs retrieval and returns the memories the agent uses for the message, in the order its search found them. Each memory is the turn it was made from. No Priors answer model runs.
To recall without learning, send the same body to POST/v2/agents//threads//recall.

Request fields

Takes content, speaker, optional speaker_id, timestamp, metadata, and limit (maximum memories to return, default 20).

Success response (200)

An empty memories list means the agent has no related memory yet. That is a normal 200 success; your model answers from the user’s message alone. If your own model writes a reply that future turns should remember, send it back with POST…/observe and set speaker to your assistant’s name. See Walkthrough 2: bring your own model.

Turns that were not learned

Learning on observe-and-respond and observe-and-recall runs asynchronously after returning the response. To follow it, poll GET…/observe/ with the response’s observation_id. It reports processing, then committed, or failed with the reason. On failed, learning lists the not_learned_turns, the reason, a message, and the refunded_credits. Priors never learns those turns later. Resend that message with POST…/observe if you want it learned.

Errors on answering calls