Skip to main content
This walkthrough kicks off an agent, polls its status, and fetches the final answer: the minimum end-to-end flow.

Prerequisites

  • A Nanonets workspace with at least one agent.
  • A workspace API key. See Authentication for how to mint one.
  • The agent’s UUID, visible in the dashboard URL when you open the agent.

1. Start a task

The response returns a task_id immediately; the agent runs asynchronously.
Response

2. Attach files (optional)

For agents that take documents as input, send multipart/form-data instead:
Multiple files are supported; pass files once per file.

3. Poll for the result

Lightweight status check:
When status becomes completed, fetch the answer:
Use /summary for production polling; it returns just the final result. Use /result during development to see the full reasoning trace.

4. Reply when the agent asks

If the agent needs more input mid-task, the status becomes waiting_for_input. Continue the conversation with:
The task resumes asynchronously; poll again until status is terminal.

Terminal vs non-terminal status