The Custom Agents API lets you run an assistant you can configure in the UI.
Users can create a custom AI agent by providing a description of the desired functionality using natural language. The system supports both conversational inputs and advanced prompting techniques to define the agent’s behavior.
The platform automatically populates the Agents section with all of the agents you’ve created. This is where you can retrieve each agent’s ID:
Paste the ID in the Small excerpt of streaming events:
Enteprise Settings
To maintain enterprise security, enable Zero Data Retention on your enterprise account. Manage this setting at you.com/settings/privacy. When enabled, the platform does not retain your data and does not use customer data for model training.Get Your Custom Agent ID
Visit you.com/agents and create a new custom agent with your personalized parameters:

agent
parameter to call it via API.Streaming Example (SSE)
Tools
web_search
: Lets the agent ground answers with fresh web results and citations
The system returns a 403 error if your agent requests a tool that it or the tenant is not authorized to use. Make sure to synchronize the agent’s allowlist with the tools it requests. Providing an empty array disables tools for the current run.
Limitations
Custom Agents configured with Advanced Reasoning or Research modes are not supported via the API.
Files attached to a Custom Agent are not accessible when the agent is invoked via the API.
Errors
Errors are returned as a structured JSON object withstatus
, code
, title
, and detail
fields:HTTP | Code | When it happens |
---|---|---|
400 | bad_request | Invalid request body (e.g., tools must be an array of objects) |
401 | unauthorized | Missing or invalid Authorization header (use a valid <API_KEY> ) |
403 | forbidden | You are not allowed to run this agent or the requested tool |
404 | agent_not_found , agent_not_supported_yet | The agent ID does not exist (or was deleted), or the agent uses an unsupported model/feature |
Authorizations
API key. Example: Authorization: Bearer $API_KEY
Body
application/json
ID (v4) of your Custom Agent from you.com/agents
.
Example:
"your_agent_ID"
User input prompt for the inference request.
Example:
"Summarize today's top AI research headlines and cite sources."
When true
, responses stream over SSE (text/event-stream). When false
, returns JSON (application/json).
Allowed tools for this run (must also be enabled for the agent). Currently supports web_search
. See Web Search Tool for more details