BoxLang 🚀 A New JVM Dynamic Language Learn More...

bxLens

v1.0.0-snapshot BoxLang Modules

See what your BoxLang application is really doing

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 BxLens trailer on bxlens.boxlang.io

Watch the trailer on bxlens.boxlang.io.

Two minutes to your first trace

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.

Configure it in 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.

The bar: the page you just loaded, explained

  • One waterfall of templates, functions, queries, HTTP calls and transactions on a single time axis. Click a line to open the file in your editor.
  • N+1 queries and slow SQL, with the rows, the time and the line of code that ran each statement.
  • Exceptions with the BoxLang location and the Java stack.
  • Your own signals: lensMessage(), lensMeasure(), lensDump() and lensPanel() add messages, timers and panels from your code.
  • ColdBox aware: the event, route, layout and view on every request, and a reinit button.
orders = lensMeasure( "load orders", () => orderService.list() );
lensPanel( "orm", "ORM" ).columns( [ "Entity", "ms" ] ).rows( rows ).badge( rows.len(), "none" );

The console: your whole server in one place

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 BxLens console overview

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.

Lensy, the Box Agent for your server

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.

Ask Lensy about your server

AI observability for BoxLang AI agents, models and 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.

  • Runs and traces: every agent run, nested sub-agents, model calls with their retries, tool and MCP calls, in one timeline.
  • Tokens and cost: input and output tokens per model and agent, and cost from prices you enter.
  • MCP servers: the ones you host, with calls, errors and what to check when they fail.
  • Needs attention: failing agents, rate limits, MCP errors and slow runs, against thresholds you set.
  • Private: prompts and answers are not stored unless you turn content capture on, and then they are redacted.

The full pages are part of BoxLang+ (the 7 day trial covers them). Free shows the run counters for the last hour.

Know before your users do

  • Alerts by email and to Slack, Microsoft Teams, Telegram or a signed webhook, with 15 rules from a deadlock to a datasource pool that ran dry.
  • Daily, weekly and monthly reports for your team.
  • Mail: see every message bx-mail sends, with a safe preview, the delivery attempts and the queue.
  • Many servers: one console for the fleet, with the pages of every server and shared volumes.

Alerts and channels

Private and safe by design

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.

Free, with BoxLang+ when you need more

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 tabYesYes, plus request cost
Console: requests, executors, datasources, logs, environmentYes (free registration)Yes
Errors and reportsLast hour, in memorySaved to disk, up to 15 days
Task, cache and heap dump actions, log downloadNoYes
Alerts, reports and channelsNoYes
Lensy and AI observabilityNoYes
Many servers in one consoleNoYes

Compare everything in Free and BoxLang+.

Requirements

BoxLang 1.19 or newer, Java 21, and MiniServer, CommandBox or a servlet container.

Documentation

Everything is at bxlens.boxlang.io: Getting started, the console, configuration, the BIFs, extending BxLens and running it in production.

Support and feedback

Bug reports and ideas are welcome at BLMODULES.

License

BxLens is a product of Ortus Solutions, Corp. License terms apply, see the BoxLang+ plans page and Licensing. Phosphor Icons are MIT licensed.

Ortus Sponsors

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

THE DAILY BREAD

"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

No collaborators yet.
     
  • {{ getFullDate("2026-10-15T15:36:42-05:00") }}
  • {{ getFullDate("2026-11-26T02:47:10-06:00") }}
  • 660
  • 480