Skip to main content
POST
/
v1
/
agents
/
runs
cURL
curl --request POST \
  --url https://api.you.com/v1/agents/runs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "agent": "advanced",
  "input": "You are a biologist studying the impacts of microplastics. Explain what microplastics are to a group of engineers, explain the impacts of microplastics on the body, and what the common source and dosage of microplastics are. High-light what a safe dosage might be and how to achieve it"
}'
{
  "output": [
    {
      "type": "chat_node.answer",
      "text": "What Engineers Need to Know. **Key Takeaway:**   Microplastics are tiny plastic particles that are pervasive in the environment and can enter the human body through various [...]",
      "content": "You are a biologist studying the impacts of microplastics. Explain what microplastics are to a group of engineers, explain the impacts of microplastics on the body, and what the common source and dosage of microplastics are. High-light what a safe dosage might be and how to achieve it",
      "agent": "advanced"
    }
  ]
}

Description

This endpoint engages advanced agents that use tools, multi-turn reasoning, and planning to solve complex queries. The agents break down each query into a workflow, execute the steps iteratively, and reflect on the findings before generating a final response.

Authorizations

Authorization
string
header
required

The unique API Key required to authorize API access. Learn how to get yours in the “Get your API key” section of the documentation.

Body

application/json
agent
string
default:advanced
required

The agent mode that will be used to execute your request. This parameter must be set as 'advanced'.

input
string
required

The input for the agent. This can be a query or a prompt.

Example:

"You are a biologist studying the impacts of microplastics. Explain what microplastics are to a group of engineers, explain the impacts of microplastics on the body, and what the common source and dosage of microplastics are. High-light what a safe dosage might be and how to achieve it"

stream
boolean
default:true

When set to "true", it will enable SSE (server side events) response. This is useful if you want to stream the response to your applications (e.g., with chatbots). Currently, only "true" is supported.

tools
object[]

Add tools the system can call to expand its capabilities, providing more precise answers to the input query. See Research Tool and Compute Tool for more details.

verbosity
enum<string>
default:medium

Controls the level of detail provided by the agent's response. Choosing high maps to a long-form report while medium maps to a medium verbosity report that captures most details but less comprehensive

Available options:
medium,
high
workflow_config
object

Manages the parameters that control how the agent orchestrates and executes the workflow to answer your query. Adjust its settings to balance between response quality, thoroughness, and speed.

Response

Inference response in application/json or text/event-stream format.

output
object[]