Turn on runtime logging for a space or a single agent — read it from the stored trail, or watch it live as your agents run.
Runtime logging you switch on where you need it, scoped to a space or one agent.
A Log Record turns on runtime logging for a scope of your choosing: a whole Space — capturing every agent's runtime lines in it — or a single Agent. What gets captured is what that agent's scripts write while a run is in progress; KeenAgents does not summarize or rewrite it. Records are created and managed from the admin console, on the Logs → Log Records page.
Every captured line is available two ways, independently: as a stored trail you browse after the fact, and as a live stream a partner site can subscribe to and watch in real time. You choose per record whether the live stream is partner-readable at all.
Logs → Log Records → Create Log, in the admin console.
Give the log a name, choose whether it captures a whole space or one agent, and pick the target. Choosing Single agent reveals the agent picker and requires an agent; Whole space hides it and captures the space. You can keep at most one record per exact target — a second record for the same space, or the same agent, is refused with "A log already exists for this space/agent".
| Field | Required | Limit / values | Notes |
|---|---|---|---|
| Title | yes | up to 150 characters | How the record appears in the list. |
| Description | no | up to 500 characters | What this log captures and why. |
| Scope | yes | Whole space · Single agent | Fixed at creation. |
| Space | yes | one of your spaces | The space to capture, or the agent's space. |
| Agent | only for Single agent | one agent in the chosen space | Hidden for a whole-space log; picking a new space clears it. |
| Client Read | no | on / off (default off) | Marks the record partner-readable. |
The Log Records board and each record's detail page.
The board lists your records — optionally filtered to one space — with each record's scope (an agent slug, or a Space-wide tag), its Status (Emitting / Paused), and its Client Read state (Client-readable / Private). From a record's detail page you can:
Access is role-gated: viewing records (and revealing a stream token) requires the logs permission; creating, editing, pausing and deleting require logs write permission. Without write, the record page is read-only and its Save and Delete controls do not appear.
Two independent paths — after the fact, and live.
How a partner site watches an agent's runtime logs in real time.
Live monitoring lets you give a partner or developer real-time visibility into their agent's runs without any server access. Turn on Client Read for the record, reveal its stream token in the console, and hand that token to the partner — the same out-of-band way the certificate material is delivered. Their site then opens a WebSocket to the record's stream, presenting the token, and receives the runtime log lines as they happen.
Subscribe to a record's live stream (your KeenAgents host is provided at onboarding)
wss://<your-keenagents-host>/monitor/stream/<spaceId>/<agentSlug>?token=<stream_token> → 101 Switching Protocols // token accepted — runtime log lines stream in → 401 Unauthorized (socket closed) // missing or unknown token — nothing ever opens
The space id and agent slug identify the channel — the same values a site already reads when it fetches its spaces and their agents. A browser WebSocket cannot set request headers, so the token rides the query string. Each line arrives as a small JSON object:
a streamed line (illustrative)
{ "level": "log-info", "message": "Checkout step 3 completed for order #4821", "metadata": { "agentId": "checkout-agent", "…": "…" } }
401 and no socket is ever established — an unauthorized caller never sees an open stream.closed notice and closes — treat a close as the end of that log, and stop reconnecting to it.logs permission — the same as viewing the record — so anyone who can see a record can hand out its stream. Keep tokens for Private records to yourself.Keen Agents 2026
Documentation
Release 15