---
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

---

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