In this article
Persist the run ID before collecting progress, then use terminal output and grounding to decide what the application can consume.
Acceptance starts a run
A research dashboard may ask Exa Agent to assemble a structured supplier list. The caller should distinguish acceptance of that work from availability of the list. Save the returned run identity with the local job before showing progress; losing that association can lead a reconnecting client to submit duplicate work instead of resuming observation.
Preserve the original request
The create-run reference includes the query, output schema, and budget fields. Store those choices with the job identity. They explain what the run was asked to produce and which limits applied, while the final output explains what was actually returned. Keep caller abandonment separate from any provider-side lifecycle action.
Interpret status explicitly
The get-run reference exposes queued, running, completed, failed, and cancelled. A worker should keep pending states pending and route terminal states to different handlers. Do not translate a failed run into an empty successful supplier list; that would conceal an execution error as a factual finding.
After a caller timeout, retain the run ID and query its state before deciding whether new research is needed. A local connection failure does not establish that remote execution stopped. This is particularly important when the research job has a meaningful budget or several waiting consumers.
Correlate progress by identity
The Agent guide documents streaming events and callId relationships. It warns that some descriptions arrive asynchronously. Group observations using their explicit identities rather than arrival order; otherwise a delayed explanation can be attached to the wrong source or tool call in the dashboard.
Treat live source additions as progress previews. The same guide identifies terminal output.grounding as the authoritative grounding output. Preserve previews for user visibility, but reconcile the final evidence view from the completed run instead of accumulating every preview into a presumed final citation list.
Validate the terminal artifact
Check that the returned structured output fits the application’s schema and that required findings have suitable grounding. Completed execution is not a guarantee that every supplier meets the caller’s business criteria. Keep unknown criteria visible for review.
The existing guides to task contracts and terminal stream handling supply complementary boundary checks. Exercise reconnects and delayed events with stored examples; this verifies the consumer without claiming a new live provider benchmark.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.