Skip to main content
The quickest way to see what your agent sends back. This is the curl snippet from your agent’s page in the dashboard, which fills in the agent’s URL for you.

Before you begin

  • A deployed agent and its ID, from its page in the dashboard.
  • An API key in ONECORTEX_API_KEY.

Stream the reply

-N turns off curl’s output buffering, so each event prints as it arrives. Replace agt_... with your agent’s ID:
Terminal
For the quickstart’s echo agent:
Output
A stream that has started has already sent 200 OK, and cannot change it. If the run fails after that, the failure arrives in the stream as event: error. Handle it: a client that reads only text and done shows a failed run as an empty success.

Get one JSON response

Leave out "stream":true:
Terminal
Output
Pipe it through jq .result for the reply alone.

See the headers

Add -i to see the status and headers, including X-Request-Id to quote to support, and X-Onecortex-Session-Id to continue the conversation:
Terminal
Every field and header is on the invoke API.
Last modified on September 28, 2026