# Test and Deploy Agents

This step ensures that your agent performs as expected before being fully deployed to handle tasks. This phase involves testing the agent with sample data, verifying its functionality, making necessary adjustments, and then deploying it for use. After deployment, you can monitor its performance to ensure it continues to operate effectively.

## **Step 1: Test the Agent** <a href="#step-1-test-the-agent" id="step-1-test-the-agent"></a>

Testing is critical to ensure your agent functions as expected before going live. To begin, navigate to the Test Agent page and follow the steps outlined below to thoroughly test your agent's performance.

1. **Upload a Sample Document**: Provide a sample document for the agent to process, simulating real-world conditions. This allows you to assess its ability to handle actual input data.
2. **Monitor Processing**: Review the reports generated during the test to ensure the agent performs its tasks correctly and efficiently.

<figure><img src="/files/2UyXsjvdDokPpDy01Pfc" alt=""><figcaption></figcaption></figure>

3. **Adjust Configurations if Needed**:
   * If the agent’s performance isn’t as expected, click ‘Configure’ to return to the Additional Settings page.
   * Make any necessary adjustments to input sources, output sources, or workflows.

<figure><img src="/files/5E2xIfgyAqMnYYcqplB8" alt=""><figcaption></figcaption></figure>

4. **Repeat Testing**: Continue testing and adjusting configurations until the agent functions flawlessly, ensuring it meets your operational requirements.

## **Step 2: Deploy the Agent** <a href="#step-2-deploy-the-agent" id="step-2-deploy-the-agent"></a>

Once the agent passes the testing phase, it is ready for deployment. To deploy the agent:

1. **Click ‘Deploy Agent’**: At the bottom-right corner of the Test Agent page, click the ‘Deploy Agent’&#x20;
2. **Redirect to Agent Dashboard Page:** After deployment, you will be redirected to the Agent Dashboard Page, where you can monitor the agent’s performance.

## **Post-Deployment Monitoring** <a href="#post-deployment-monitoring" id="post-deployment-monitoring"></a>

After deployment, continuous monitoring is crucial to ensure optimal performance:

1. **Access Uploaded Documents**: Navigate to the Agent Dashboard to review any uploaded documents and verify that they are processed as expected.
2. **Review Activity Logs and Reports**: Check the logs and generated reports to track the agent’s performance and detect any issues.

<figure><img src="/files/nie7MPw563zSAHA83dRd" alt=""><figcaption></figcaption></figure>

3. **Monitor the Agent’s Performance:** Navigate to the Performance Page to track key metrics. Regularly review these details to ensure the agent is processing tasks efficiently and handling live data effectively.

<figure><img src="/files/r3fmU3Lsq9A1GAJlVaYy" alt=""><figcaption></figcaption></figure>

By thoroughly testing and deploying the agent, you ensure its reliability and smooth integration into your workflow. Ongoing monitoring after deployment helps maintain performance and address issues proactively.


---

# Agent Instructions: 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:

```
GET https://docs.zbrain.ai/zbrain-documentation/zbrain-builder/zbrain-ai-agents/creating-custom-ai-agents/test-and-deploy-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
