---
title: "Test an Agent with YAML configuration"
method: POST
path: "/v1/agents/test"
tags: ["Agent Operations"]
---

# Test an Agent with YAML configuration

`POST /v1/agents/test`

Test an agent by providing a YAML configuration (as a file or string) along with a message. The agent processes the message and returns a response without creating a persistent agent.

## Response `200`

Successful Response

- AgentResponse
  - `request_metadata` ResponseMeta
    - `request_id` string, nullable — Unique request identifier for tracing and support.
  - `response` object[], required
  - `usage` UsageStats, required
    - `credits_charged` CreditUsage[]
      - `agent_name` string, required
      - `number_of_runs` integer, required
      - `credit_consumed` integer, required
    - `total_credits_charged` integer
  - `additional_metadata` AdditionalMetadata, required
    - `thread_id` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/svahnar/apis/svahnar-apis.md) · [All operations](https://skmtc.net/svahnar/apis/svahnar-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/svahnar/svahnar-apis/revisions/02cca47c900a/schema)
