Overview
A trace holds everything an agent did in a session: what it was asked, the commands it ran, the files it changed, what it spent, and what the threat rules flagged. The full event list shows all of it at once. A lens shows one trace from one angle: every file the agent changed with its diffs, or the run as an itemized bill. Lenses are tabs on a session’s page in the local dashboard (beacon endpoint dashboard), next to Full session. Click + to
add one; the dashboard remembers which lenses you opened and keeps the selected one in the
page URL, so a link opens straight to it.
Beacon ships five lenses, and you can add your own. A lens is one HTML file, so any coding
agent can write one.
Built-in lenses
How a lens runs
A lens is untrusted code looking at sensitive data, so the dashboard runs it on a short leash:- No network. The lens runs in a sandboxed frame under a Content Security Policy with
connect-src 'none'. It cannot fetch, open a socket, load a remote image or font, or navigate its frame anywhere else. A lens that tries to navigate is closed. - No dashboard access. The frame has an opaque origin. It cannot read the dashboard’s pages, storage or API.
- One delivery of data. The trace arrives once, through
window.beacon.getTrace(), over a private message channel. It is computed from the local log when the page loads and is never refreshed. - Failure is contained. If a lens throws before it renders, never asks for its trace, or has not rendered after ten seconds, the dashboard closes it and shows the full session with a notice.
beacon token-usage counts it. A lens
sees whatever content the local log retained, after Beacon’s redaction: prompts, command
output and diffs when retention is full. It can show that on screen and nowhere else.
Forwarding privacy modes control what leaves the machine;
they do not reduce what a local lens receives.
Make your own lens
The fastest way is to ask your coding agent. Thebeacon-lens-create skill in Beacon’s
Agent Skills plugin walks it through the whole loop. Without the
skill, give it this:
- Read the spec. It defines the manifest every lens carries, the data, the sandbox and the style tokens that match the dashboard.
- Look at real data. Design for the fields your sessions actually carry, and for sessions that lack them.
- Lint. Errors stop a lens from running. Warnings name the line where the lens does
something the sandbox will block, such as
fetch,innerHTMLor a script loaded from a CDN. - Preview.
beacon lenses previewserves the dashboard with the file added and prints the session page to open. The file is read again on every reload. - Install.
beacon lenses addcopies the file into the lens store (~/.beacon/endpoint/lenses), where every session page offers it. To update a lens, bump theversionin its manifest and add it again.
beacon lenses for every command and flag, and the
lens specification
for the format.
What a lens file looks like
Limits
- A lens is one file of at most 16 MiB, with everything inline.
- A lens sees one trace. A view across several sessions is not supported yet.
- Lenses are local. The store is per user on this machine, and there is no hosted gallery or sharing; to share a lens, share the file.
- Very large traces are cut to fit: the lens receives the longest prefix of events that fits, and the data says it was truncated.