> ## Documentation Index
> Fetch the complete documentation index at: https://www.botgauge.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Black box and grey box testing

> Black-box testing sees messages only. Grey-box adds tool calls, traces, and backend state through the BotGauge wrapper. Compare them and set up the wrapper.

| | Black box | Grey box |
| - | - | - |
| What BotGauge sees | Messages and replies only | Also tool calls, traces, and backend state. It can place test content in documents, tool results, or memory. |
| Setup | Just the endpoint | Add the BotGauge wrapper, and optionally a verifier |
| Rules tested | Fewer. Rules needing inside access are listed as skipped, with the reason. | All applicable rules |
| Strength of findings | Based on what the agent says | Can be confirmed by hard evidence, so severity can be higher |

Start with black box and add grey box when you want more. BotGauge counts a run as grey box only when the inside access has actually been proven to work during the connection test. Declaring a verifier is not enough on its own. If you choose black box explicitly, inside access is ignored.

## What the wrapper is

The wrapper is a small endpoint you add to your agent. BotGauge sends it a turn message, and it answers with the agent's reply plus extra observations.

| Piece | What it does |
| - | - |
| Turn endpoint | Receives a `botgauge.turn/1` message (`{protocol, session_id, message}`) and returns a `botgauge.observation/1`: the reply, optional `events` such as tool calls, and `plant_receipts`. |
| Tools endpoint | Lists the tools your agent has and, if you set it, whether each is read-only. A tool with no declared action is treated as possibly writing, to stay safe. |
| Planting | In grey-box tests, BotGauge can place content in retrieval, tool output, or memory. It carries a unique marker called a canary. If the agent's reply shows it used the marker, BotGauge knows the planted content influenced it. |

## Set it up

**1. Choose the wrapper preset**

In the connection form, choose the BotGauge wrapper preset, or copy the setup prompt BotGauge provides and give it to your coding assistant. It generates the wrapper for your stack.

**2. Declare channels and a verifier**

Declare which channels you support (retrieval, tool output, memory, system) and any trace or verifier.

**3. Test the connection**

Run **Test connection**. The result shows which capabilities are connected, declared, failed, or not configured.

**4. Rerun recon**

[Rerun recon](https://www.botgauge.com/docs/red-teaming/recon.md) so the profile includes the new visibility.

## What grey box unlocks

* Rules that need to see tool calls, such as no duplicate actions and arguments matching the request
* Indirect-injection tests that plant instructions in documents or tool output
* Higher-severity, hard-evidence confirmation
* Backend checks through a verifier, for example confirming that a refund was or wasn't created

Unlock deeper testingSet up the BotGauge wrapper for tool calls and backend checks in [BotGauge](https://cloud.botgauge.com).

[Add the wrapper →](https://cloud.botgauge.com)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.