Preview one contact's agent-written message, streaming the research
Have the sequence's agent write one contact's whole sequence as a preview, in one call the way the real first send writes it (each later step reads the drafts before it), researching the contact on the web the way the real first message would, and stream its work as Server-Sent Events. The result frame carries the step asked for; each of the contact's other agent-written steps on their path that comes back with words is saved as a sample of its own step, read through the sequence's agent examples. A step that only runs on a branch this contact does not take, or a contact already sent a message, gets the asked step alone. Nobody receives the preview and it costs no credits; it counts against the workspace's daily preview allowance once for each step it writes, where a preview that researches counts for more than one that does not. The agent researches only when its research switch is on, the contact has never been researched and the workspace has credits; otherwise it writes from the contact's row and what earlier research found. The same preview asked for again the same day is shown again at no further cost, unless fresh asks for another, which writes the whole sequence again from its first step.
The first frame is turn, carrying the preview_id a Stop is sent to; then a step frame for each thing the agent did (searching, reading pages, writing, checking), each with its measured duration; then one result frame with the asked step's message, the agent's confidence, the independent quality score, its reasoning and what the checks found.
Failures arrive as an error frame, because the stream has already answered 200: reason not_found when the sequence, the step or the contact is gone, limit when today's preview allowance is spent, stopped when the caller stopped it, ai_unavailable when the agent's model cannot be asked right now (nothing about the workspace; a retry does not help until it is back), and no reason for anything else.
Closing the connection does not stop the preview; the Stop route does.
Request
- Base URL: https://api.getoneprofile.ai (the document declares no server; this is the origin it was published from)
- URL: https://api.getoneprofile.ai/sequences/{sequence_id}/agent/preview/stream/
- Auth: HTTP bearer
Path parameters
Request body
Response
A stream of Server-Sent Events; the final result frame's data is the asked step's preview message.
Changes
No recorded changes to this operation across all 1 revision of this API.