> For the complete documentation index, see [llms.txt](https://mind-expression-docs.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mind-expression-docs.gitbook.io/home/how-to-guides/test-and-debug.md).

# Test and debug

## Test and debug

While building a Subject, you can always access Sandbox and test the Subject in real-time. Start a test session in Sandbox and you can check the AI action details by clicking on each AI message. Observe the AI actions and debug your Subject accordingly. To learn more about Sandbox, see [Concepts: Sandbox](https://me-dev.mind.ai/docs/concepts/sandbox).

### Start and reset test sessions

{% embed url="<https://mind-expression.s3.ap-northeast-2.amazonaws.com/dev/static/docs/media/how-to-guides/03-start_and_end_testing.mp4>" %}

Start a test session simply by entering a customer input message. The AI will answer the message correspondingly. When you are done testing the session and ready to start a new one, you can click **Reset** at the top right in the panel.

### Check AI action details

AI Action details consist of two parts: How AI Reasons and Conversation Model. To check AI Action Details, simply click an AI message in Sandbox.

* **How AI Reasons**

  How AI Reasons shows the customer input message and how AI interprets it.
* **Conversation Model**

  The conversation Model shows the current Component of the message and the Component path, webhook details for the webhook involved actions, how AI responds, and reference information if applicable.
* ### Fallback and escalation error

  Messages with fallback or an escalation error are displayed with a red error icon. If a fallback occurs, you can see the reason for the fallback in the AI Action Details. For escalation errors, you can see the webhook request and response details and report the error to the Mind team if needed.
* ### Debug during Sandbox test

  You can make changes to the Subject during the Sandbox test. Since newly made changes are not applied to your current test, you need to reset Sandbox and start a new session after debugging.
* ### Test session termination

  #### Session Termination

  If the conversation meets the Subject's goal or cannot proceed further, the session will terminate.

  #### Session Timeout

  If there is no customer input message for 3 mins after an AI response, the session will expire.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mind-expression-docs.gitbook.io/home/how-to-guides/test-and-debug.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
