Skip to main content
Every Web Search Agent task follows the same three steps: create a run, wait for it to complete, and retrieve the result. This page walks through the full loop. You need an API key from the Nimble Platform and a client:
1

Create a run

Send the task in plain language. agents.run generates an agent with default settings (research mode, high effort) and starts the run asynchronously:
The response contains the run id and the generated agent’s id. Both are needed to poll and fetch the result:
Add an output_schema to the request to get structured JSON back instead of prose. See Dataset Building and output schema limits.
2

Wait for completion

Poll while is_active is true. Alternatively, create the run with enable_events: true and stream GET .../runs/{run_id}/events as server-sent events:
3

Retrieve the result

The output contains the answer and its trust report:
Every [n] maps to a claim in trust.claims, with source URLs, verbatim excerpts, and a confidence grade. See Trust.
Fetching the result while the run is still active returns 409. Keep polling. A failed run returns 422 with error details.

Run lifecycle

Follow-up runs

Every run carries an interaction_id. Pass it as previous_interaction_id on the next run to continue the same task with full context: a follow-up question, a refinement, or a drill-down:

Reuse an agent by name

Passing no identity to agents.run (as in Step 1) creates a fresh, disposable agent on every call, no memory carries over between runs. Add agent_name to get a stable, reusable agent without a separate create step: the first call with a new name creates the agent, every later call with the same name routes to it.
use_case and skill can be set the same way, on the call that creates the agent:
use_case is locked once the agent exists: a later run against the same agent must either omit use_case or pass the value it already has, a different value returns 422. skill, sources, and output_schema work the other way, they stay overridable per run (see below) even after the agent is created.

Create a persistent agent

agents.run without agent_name generates a one-off agent with default settings. For full control over an agent’s lifecycle, create a persistent agent explicitly with a skill, goals, sources, and a default effort — equivalent to what agent_name does implicitly above, but you own the agent_id yourself instead of addressing the agent by name. A persistent agent keeps its memory across runs and improves over time:

Override per run vs. persist

Once an agent exists (via agent_name or an explicit agent_id), a run can pass sources, output_schema, and skill to override that agent’s defaults for that run only, the agent’s own stored config is unchanged. To persist a change instead, update the agent directly with agents.update(agent_id, ...). use_case doesn’t follow this pattern: it’s fixed once the agent is created, not overridable per run.

Next Steps

Trust

Per-claim citations and confidence grades

Use Cases

Research, Enrichment, and Dataset Building

API Reference

Every endpoint, field, and response