If you are using Unique Urchin, please refer to this version of the documentation.
This documentation is outdated and only viable if you are on Victorious Vicuna release (January 2026), if you already
are on Wise Wolf release (February 2026) or later please refer to this documentation.
Motivation
The Agent API, powering the new Agent Mode, allows you to engage in conversations leveraging multi-tool reasoning capabilities. It is now the recommended way to interact with Paradigm tools.Terminology
Turn
A single interaction between a user and the model, comprising a user query, multi-steps reasoning, tool calls and the model’s final answer.Thread
A conversation comprising a sequence of turns.Parts
A component of the conversation turn’s answer, it can be of typereasoning, tool_call or text (final answer to the user).
The parts in an agent message within a turn are structured in the following sequence:
- a
reasoningpart explaining the reasoning about wether the agent will choose tyo use a tool or return the final answer. - a
tool_callpart containing information about the tool called as well as the tool’s raw result. - repeat the 2 first steps until the agent choose to return the final answer or the reasoning budget is reached.
- a
textpart containing the final answer.
Message
A set of parts corresponding to, within a turn, either the agent answer or the user query. A turn is thus primarily composed of a list of 2 messages: the user query and the agent answer.Source
A source used by a tool to generate the turn’s final answer, it can either of typeweb or document.
Artifact
A file generated by a tool, attached to a turn.Quickstart
You can initialize a new conversation thread using the POST /api/v3/threads/turns endpoint.chat_settings_id: the ID of the Chat Settings attached to your company (optional, defaults to the one attached to your company).ml_model: the name of the ML model to use. (optional, default to your company’s default model).query: the user query.
Response example
Response example
- a reasoning part explaining the reasoning behind the answer.
- a text part containing the final answer.
text and consitute the final answer
and that the agent answer is always the second and last message.
You can access the agent final answer like this:
thread_id like this:
Recipes
For the following recipes, you can either use:- the POST /api/v3/threads/turns endpoint to create a turn a new conversation thread.
- the POST /api/v3/threads/:id/turns endpoint to create a turn in an existing conversation thread, thus benefiting from the context already there if needed.
Scoping a workspace/document
You can scope a query within a list of Worspkaces and/or Files (documents) using theworkspaces_ids and/or
file_ids parameters in the payload. For instance, using the POST /api/v3/threads/turns endpoint:
Using a specific tool
Call the POST /api/v3/threads/turns endpoint, while specifying the tool name to use in the payload like this:document_searchdocument_analysiscode_execution
Note that since the tool was forced to a specific value, this turn won’t contain a reasoning part.
Using a specific MCP server
If you want to restrict tool routing to the tools provided by a specific MCP server, call the the POST /api/v3/threads/turns endpoint, while specifying the MCP server name in the payload like this:websearch-linkup attached to the company
linked to the API key used.
Extending the system prompt
You can extend the system prompt during one query and pass specific instructions using thesystem_prompt_suffix
parameter of the payload. For instance, using the POST /api/v3/threads/turns endpoint:
Requesting structured output
You can request structured output from the agent by specifying theresponse_format parameter in the payload.
For instance, using the POST /api/v3/threads/turns endpoint:
response_format, please consult the Guided JSON documentation.
Generating artifacts
Some tools likecode_execution can generate artifacts that can be downloaded afterwards. For instance, when using
the POST /api/v3/threads/turns endpoint:
- a
tool_callpart in which you can find the generated artifacts. - a
textpart containing the final answer.
id: the ID of the artifact.thumbnail_base64: a base64 encoded 256x256 webp thumbnail of the artifact if the artifact is an image.
Background mode
For heavy query that needs to be handled asynchronously, you can use the POST /api/v3/threads/turns endpoint with thebackground parameter set to true. For instance:
status field
is set to running:
Response example
Response example
status field is set to completed.
When the thread is back in its completed status, you can fetch its turns using
the GET /api/v3/threads/:id/turns endpoint.