> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-lens.md).

# BxLens

BxLens is the debug bar and ops console for BoxLang. Trace requests, errors, queries, HTTP calls, mail and AI agents, and watch every server.

{% hint style="info" %}
BxLens is **freeware with limits**. The debug bar and the basics of the console are free for one server, in production too. [BoxLang+](https://boxlang.ortusbooks.com/boxlang-+-++/boxlang-plus.md) lifts the limits and adds history, alerts, many servers and AI. It needs BoxLang 1.19 or newer and Java 21.
{% endhint %}

**BxLens** shows what your BoxLang application and servers are doing. It has two surfaces:

* **The bar** is a strip docked on every HTML page. It shows what that one request did: templates, queries, HTTP calls, exceptions, timers and scopes.
* **The console** is a password protected page for a server: live requests, errors grouped into issues, queries, datasources, caches, logs, tasks, the JVM and threads. With BoxLang+ it also reads every server in a store folder and sends alerts by email, Slack, Teams or Telegram.

Both surfaces are off until you turn them on. An assistant named **Lensy** answers questions about the server in plain words and asks for approval before it changes anything.

{% embed url="<https://www.youtube.com/watch?v=m0MAC_JetTk>" %}

## 📦 Installation

```bash
# BoxLang binary
bx-module install bx-lens

# CommandBox
box install bx-lens
```

Then follow [Getting started](https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-lens/getting-started.md) to enable the bar and the console.

## ✨ Features

* A waterfall of templates, functions, queries and HTTP calls for every request
* Slow query and N+1 detection, including ORM SQL
* Errors grouped into issues that you resolve, ignore and annotate, with a stable reference
* Outgoing HTTP by host, with latency and failures
* The JVM: heap, garbage collection, threads and deadlocks
* Executors, scheduled tasks, datasources, caches and file watchers
* Mail viewer for `bx-mail`
* ColdBox events, views, modules and schedulers
* AI observability for BoxLang AI agents, models and MCP servers
* Alerts and reports, and a fleet view of many servers (BoxLang+)
* No external requests from the console, so it works on air gapped networks

## 📚 In these docs

| Page                                                                                                                    | What it covers                                                |
| ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [Getting started](https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-lens/getting-started.md)                       | Install, enable and open BxLens                               |
| [Licensing and registration](https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-lens/licensing-and-registration.md) | What is free, what needs BoxLang+, and the registration trial |
| [Built-in functions](https://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-lens/built-in-functions.md)                 | The `lens*` functions for your own code                       |
| [Observability](https://boxlang.ortusbooks.com/boxlang-framework/observability.md)                                      | How BxLens, BxMCP and the other tools fit together            |

The complete BxLens documentation is at [**bxlens.boxlang.io**](https://bxlens.boxlang.io).

{% content-ref url="/pages/EzEcU6oifVQJccVAX4AM" %}
[BxLens](https://boxlang.ortusbooks.com/boxlang-framework/observability/bxlens.md)
{% endcontent-ref %}


---

# 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://boxlang.ortusbooks.com/boxlang-+-++/modules/bx-lens.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.
