> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/mba/api-ref/operate/run-an-agent-test.md).

# Run an agent test

Send a test message to the AI agent and receive a response. Messages are processed through the full agent pipeline without requiring a consumer phone number.

```json
{"openapi":"3.1.0","info":{"title":"Business Agent API","version":"1.51.5"},"tags":[{"name":"Operate","description":"Endpoints for evaluating and operating the agent (eval jobs, events, and tests)"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"operate.BizAIOmniChannelAgentTestRequest":{"description":"Send a test message to the AI agent","properties":{"conversation_id":{"description":"Identifier for multi-turn test conversations. Provide the conversation_id from a previous response to continue that conversation.","type":"string"},"user_msg":{"description":"The text content of the test message to send to the AI agent","type":"string"}},"required":["user_msg"],"type":"object"},"operate.BizAIOmniChannelAgentTestResponse":{"description":"The AI agent response and test conversation metadata","properties":{"agent_response":{"description":"The AI agent response text","type":"string"},"conversation_id":{"description":"The test conversation identifier. Use this in subsequent requests for multi-turn conversations.","type":"string"},"handoff_reason":{"description":"If the agent hands off to a human, this contains the reason","type":"string"},"message_id":{"description":"Unique identifier for this message exchange","type":"string"},"no_response_reason":{"description":"If the agent did not generate a response, this contains the reason (e.g. ELIGIBILITY_CHECK_FAILED)","type":"string"},"product_variant_ids":{"description":"The variant IDs of the products referenced in the agent response","items":{"type":"string"},"type":"array","uniqueItems":false},"quick_replies":{"description":"Suggested quick reply messages generated by the AI agent","items":{"type":"string"},"type":"array","uniqueItems":false},"timestamp":{"description":"Unix timestamp when the response was generated","type":"integer"}},"required":["agent_response","conversation_id","message_id"],"type":"object"},"operate.StandardError":{"description":"Standard error response for Meta Business Agent endpoints","properties":{"detail":{"description":"Human-readable explanation of the error","type":"string"},"status":{"description":"HTTP status code","type":"integer"},"title":{"description":"Short, human-readable summary of the problem","type":"string"},"type":{"description":"A URI reference identifying the problem type","type":"string"}},"type":"object"}}},"paths":{"/agent_test":{"post":{"description":"Send a test message to the AI agent and receive a response. Messages are processed through the full agent pipeline without requiring a consumer phone number.","operationId":"post-agent-test","parameters":[{"description":"Meta Business Agent API version","in":"header","name":"X-API-Version","schema":{"enum":["2.0.0"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.BizAIOmniChannelAgentTestRequest","summary":"requestBody","description":"Test message to send"}}},"description":"Test message to send","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.BizAIOmniChannelAgentTestResponse"}}},"description":"Response containing the AI agent response and test conversation metadata"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Unauthorized"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/operate.StandardError"}}},"description":"Server error"}},"summary":"Run an agent test","tags":["Operate"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/mba/api-ref/operate/run-an-agent-test.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
