Skip to content

Preview the final agent shape with capabilities applied

POST
/v1/agents/preview

Returns the merged system prompt and all tools that would be available to the agent. This is useful for previewing what the agent will look like before saving.

Request to preview the final agent shape with capabilities applied

object
capabilities

Capabilities to apply with per-agent configuration.

Array<object>

Per-agent capability configuration

Associates a capability with an agent, including optional per-agent configuration. The config field allows the same capability to behave differently per-agent.

object
config

Per-agent configuration for this capability (capability-specific)

ref
required

Reference to the capability ID

string
Example
[
{
"config": {},
"ref": "current_time"
},
{
"config": {},
"ref": "test_math"
}
]
system_prompt
required

The base system prompt (before capability additions)

string
Example
You are a helpful customer support agent.

Agent preview generated

Response showing the final agent shape after applying capabilities

object
system_prompt
required

The full system prompt with capability additions prepended

string
tools
required

All tool definitions from capabilities

Array<object>
object

Internal server error

Standard error response for API endpoints.

object
error
required

Error message describing what went wrong.

string