Preview an unsaved Single Agent Definition
const url = 'https://api.agentaab.com/api/app/example/single-agent/preview/';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"definition":{"kind":"single_agent","version":1,"interaction_mode":"completion","instructions":{"system":"example","user_template":"example"},"model":{"provider":"example","model":"example","credential_ref":"example","api_base":"https://example.com","temperature":1,"top_p":1,"frequency_penalty":1,"presence_penalty":1},"tools":[{"id":"example","kind":"mcp","version":"example","tool_name":"example","endpoint":"https://example.com","credential_ref":"example","credential_mode":"bearer"}],"input_schema":{},"output_schema":{},"limits":{"timeout_ms":1,"max_output_tokens":1,"max_tool_calls":1},"configuration":{}},"inputs":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.agentaab.com/api/app/example/single-agent/preview/ \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "definition": { "kind": "single_agent", "version": 1, "interaction_mode": "completion", "instructions": { "system": "example", "user_template": "example" }, "model": { "provider": "example", "model": "example", "credential_ref": "example", "api_base": "https://example.com", "temperature": 1, "top_p": 1, "frequency_penalty": 1, "presence_penalty": 1 }, "tools": [ { "id": "example", "kind": "mcp", "version": "example", "tool_name": "example", "endpoint": "https://example.com", "credential_ref": "example", "credential_mode": "bearer" } ], "input_schema": {}, "output_schema": {}, "limits": { "timeout_ms": 1, "max_output_tokens": 1, "max_tool_calls": 1 }, "configuration": {} }, "inputs": {} }'Execute the submitted Definition and structured inputs without persisting the Draft or changing the active Capability Release. The response contains only a sanitized result and trace summary.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Complete authoritative editable Definition for one Single Agent. Raw secret-like fields and values are rejected recursively.
object
object
object
Optional absolute HTTPS provider endpoint without userinfo or secret query parameters.
A pinned Tool identity and optional server-managed credential reference. Raw credential values are forbidden.
object
Exact absolute HTTPS endpoint. Required for MCP Tools.
Name of a server-side Worker secret binding, never a credential value.
JSON Schema with an object root.
object
JSON Schema with an object root.
object
object
object
object
Responses
Section titled “Responses”The unsaved Definition executed successfully with source single_agent_unsaved_preview.
object
object
object
Example
{ "source": "single_agent_unsaved_preview", "trace": { "status": "succeeded", "interaction_mode": "completion" }}The Definition or structured inputs are invalid.
object
object
Examplegenerated
{ "error": "example", "code": "example", "draft_revision": "example", "issues": [ { "code": "example", "path": "example", "message": "example" } ]}The bounded Preview payload or inputs are too large.
object
object
Examplegenerated
{ "error": "example", "code": "example", "draft_revision": "example", "issues": [ { "code": "example", "path": "example", "message": "example" } ]}Provider execution failed; the response remains sanitized.
object
object
object
Example
{ "source": "single_agent_unsaved_preview", "trace": { "status": "succeeded", "interaction_mode": "completion" }}The referenced credential or Preview runtime is unavailable.
object
object
object
Example
{ "source": "single_agent_unsaved_preview", "trace": { "status": "succeeded", "interaction_mode": "completion" }}