---
title: "Preview Agent"
method: POST
path: "/api/agents/preview"
tags: ["agents"]
---

# Preview Agent

`POST /api/agents/preview`

Preview agent response without saving to database.

## Request body

- AgentPreviewRequest — Request model for agent preview.
  - `instructions` string, nullable — System instructions/prompt
  - `execution_mode` string, nullable — Execution mode: flash, balanced, think, or auto
  - `models` object, nullable — Model config: {general, small_fast, visual, compact}
  - `knowledge_bases` string[] — Knowledge base names
  - `skills` string[] — Skill names
  - `tool_categories` string[] — Tool category names
  - `message` string, required — User message to preview

## Response `200`

Successful Response

- AgentPreviewResponse — Response model for agent preview.
  - `response` string, required
  - `status` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-05-01** `c9eb29ec9a1b` — 1 info
  - the `execution_mode` request property default value changed from `react` to `balanced`

[Change history](https://skmtc.dev/xorbitsai/apis/xagent/changes/api/agents/preview/post.md)

---

[API](https://skmtc.dev/xorbitsai/apis/xagent.md) · [All operations](https://skmtc.dev/xorbitsai/apis/xagent/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xorbitsai/xagent/revisions/33e4ba4936ad/schema)
