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-respondwhen conversations should teach the agent (such as a sales agent per prospect or a team assistant). Userespondwhen 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-recallorrecallto retrieve raw dated memories and assemble your own prompt.
Controlling learning
Learning is decided per call. Callrespond 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.
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.
/v2/agents//threads//recall.
Request fields
Takescontent, 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 onobserve-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.