BoxLang 🚀 A New JVM Dynamic Language Learn More...
BxLens is the free debug bar and ops console for BoxLang. Find the slow query, the N+1 loop, the failing call, the starved thread and the runaway AI agent in seconds, with built in AI observability for BoxLang AI. Everything stays on your server: no cloud, no agent to install, no data sent anywhere.
Documentation | Walkthroughs | Free and BoxLang+ | BoxLang+ plans
Watch the trailer on bxlens.boxlang.io.
install-bx-module bx-lens # or: box install bx-lens
Turn on the bar in boxlang.json, restart, and open any
page from the same machine:
{ "modules": { "bxLens": { "settings": { "bar": { "enabled": true } } } } }
A strip appears at the bottom of every HTML page. Click it to open the timeline of the request you just made. BxLens is off by default and answers only to the local machine until you say otherwise.
boxlang.json
Everything lives under modules.bxLens.settings. Every
setting has a default, so add only what you need. The password for the
console can also be set in the console itself the first time you open it.
The bar and the console
{
"modules": {
"bxLens": {
"settings": {
"bar": { "enabled": true },
"console": { "enabled": true }
}
}
}
}
The console is at /~bxlens/index.bxm. Use
"password":
"${env.BXLENS_PASSWORD}" or a bxsecret:
value (boxlang generatesecret "your password")
to set it from config. Both the bar and the console answer to the
local machine only until you change access.
Turn on AI observability
"collectors": { "aiobs": { "enabled": true } }
Optional: "content": "preview" keeps
a redacted preview of prompts and answers, "attach":
false stops BxLens from attaching its recorder to your agents,
and "failurePct",
"rateLimits" and
"slowFactor" tune what needs attention.
Turn on Lensy, the Box Agent (BoxLang+; a local Ollama model by default, or OpenAI, Claude, Gemini and more)
"ai": { "enabled": true, "provider": "ollama", "model": "llama3.2", "baseUrl": "http://localhost:11434" }
Set the API key for a hosted provider in the console (Settings, Security) and it is kept encrypted. It never goes in the file.
Watch bx-mail
"collectors": { "mail": { "enabled": true } }
Many servers in one console (BoxLang+). The same file on each server, with its own name:
"store": { "dir": "/mnt/shared/lens-store" },
"secrets": { "dir": "/mnt/shared/lens-secrets" },
"server": { "name": "web-a" }
Every setting is described in the Configuration reference, with a guide for several servers and running in production.
lensMessage(),
lensMeasure(), lensDump() and
lensPanel() add messages, timers and panels from your code.orders = lensMeasure( "load orders", () => orderService.list() );
lensPanel( "orm", "ORM" ).columns( [ "Entity", "ms" ] ).rows( rows ).badge( rows.len(), "none" );
Live requests and what is running right now, errors grouped by cause, p50, p95 and p99 reports, query and HTTP statistics, datasources with a connection test, caches, logs with a live tail, executors, scheduled tasks, heap and threads. Light and dark, keyboard friendly, and air gapped: the console makes no calls to other sites.
The first time you open the console it asks you to set the admin password right there, and stores it hashed. Secrets such as API keys live in an encrypted Secret Store, never in plain text.
Ask in plain words: what got slow after the deploy? Lensy reads the same data you see, explains it, and can act on your server after you approve each step. It runs on BoxLang AI and can use your own MCP servers.
BxLens is the LLM and AI agent observability for
BoxLang. It traces every BoxLang AI (bx-ai) run with no
code change: agents, tool calls, MCP servers, models, tokens,
estimated cost, rate limits and errors, with a step by step
trace of each run, how each agent is composed, and a failing tool
called out by name.
The full pages are part of BoxLang+ (the 7 day trial covers them). Free shows the run counters for the last hour.
Everything is collected in memory by Java code inside your server. Passwords and keys are redacted from what you see, the console has an admin and a read only role, an audit log, and a read only mode. A server with no console password stays locked until you set one. See Security and the privacy notice.
BxLens is free for one server, in production too. BoxLang+ lifts the limits and adds history, actions, many servers, alerts and AI. Registering a server for the console is free. A development or testing server also gets a 7 day trial of BoxLang+.
| Free | BoxLang+ | |
|---|---|---|
| The bar, every tab | Yes | Yes, plus request cost |
| Console: requests, executors, datasources, logs, environment | Yes (free registration) | Yes |
| Errors and reports | Last hour, in memory | Saved to disk, up to 15 days |
| Task, cache and heap dump actions, log download | No | Yes |
| Alerts, reports and channels | No | Yes |
| Lensy and AI observability | No | Yes |
| Many servers in one console | No | Yes |
Compare everything in Free and BoxLang+.
BoxLang 1.19 or newer, Java 21, and MiniServer, CommandBox or a servlet container.
Everything is at bxlens.boxlang.io: Getting started, the console, configuration, the BIFs, extending BxLens and running it in production.
Bug reports and ideas are welcome at BLMODULES.
BxLens is a product of Ortus Solutions, Corp. License terms apply, see the BoxLang+ plans page and Licensing. Phosphor Icons are MIT licensed.
BoxLang is a professional open-source project and it is completely funded by the community and Ortus Solutions, Corp. Ortus Patreons get many benefits like a cfcasts account, a FORGEBOX Pro account and so much more. If you are interested in becoming a sponsor, please visit our patronage page: https://patreon.com/ortussolutions
"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12
$
box install bx-lens