---
title: "Test conversation with an AI Agent, without a chat room (v2)"
method: POST
path: "/v2/agents/{idOrAddress}/try"
tags: ["Agents"]
---

# Test conversation with an AI Agent, without a chat room (v2)

`POST /v2/agents/{idOrAddress}/try`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v2/agents/{idOrAddress}/try`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

One turn of a test chat: the agent answers `text` with its
instructions, Memory and knowledge, given the conversation so far in
`history`. No room, no XMPP, nothing is stored; the client keeps the
history and sends it back on the next turn.

Open to the owner, and to anyone for an `unlisted` or `public` agent
(so it can be tried before cloning). A private agent of another owner
reads as 404. Supports `User JWT` and `B2B Server JWT`. Requires the
`ai` license feature. Replies can take tens of seconds.

## Path parameters

- `idOrAddress` string, required

## Request body

- object
  - `text` string, required
  - `history` object[]
    - `role` 'user' | 'assistant', required
    - `content` string, required

## Response `200`

```
{ ok: true, reply: string, sources: object[], ragDocsUsed: number, model: string|null }
```

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: The edition has no `ai` feature (`LICENSE_FEATURE_NOT_INCLUDED`).
- `404`: ``` { error: 'Agent not found', code: 'AGENT_NOT_FOUND' } ```
- `422`: ``` { error: string, code: 'VALIDATION_ERROR' } ```
- `500`: Internal Server Error
- `502`: ``` { error: 'The agent could not answer', code: 'AI_SERVICE_ERROR' } ```
- `503`: ``` { error: 'AI service is not configured', code: 'AI_SERVICE_UNAVAILABLE' } ```

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
