Turn on runtime logging for a space or a single agent — kept in a stored trail, and watched 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 — each line tagged with the level it was written at ([LOG], [INFO], [WARNING], [ERROR], [DEBUG]) — plus the run-time errors the platform raises for that agent. KeenAgents does not summarize or rewrite the text. Records are created and managed from the admin console, under System → Log Records (also reachable from System → Logs).
Every captured line is available two ways, independently: in a stored trail kept for 30 days, and as a live stream a partner site can subscribe to and watch in real time. You mark per record whether you intend to hand its stream to a partner.
System → Log Records → Create Log Record, 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. A new record starts Emitting. 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 as one you intend to hand to a partner. |
An agent-grained log requires an agent or A space-wide log must not name an agent.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:
Log not found.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. Mark the record Client-readable (your own record that a partner holds its token), 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 — a welcome frame, then 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 stream always names one agent: for a whole-space record you open one stream per agent slug in that space, all with the record's single token. A browser WebSocket cannot set request headers, so the token rides the query string. Right after the handshake you receive one welcome frame naming the channel; every line after that is a small JSON object:
the welcome frame, then a streamed line (illustrative)
{ "type": "welcome", "spaceId": "<spaceId>", "agentSlug": "checkout-agent" } { "spaceId": "<spaceId>", "agentSlug": "checkout-agent", "level": "info", "logMessage": "[INFO] Checkout step 3 completed for order #4821", "meta": { "correlationId": "…" } }
level is one of error, warn, info, debug; the message text carries the tag the script used ([LOG], [INFO], [WARNING], [ERROR], [DEBUG]). A frame with type: "closed" means the record was deleted — stop reconnecting.
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.logs permission can list, create, edit, pause and delete records and reveal stream tokens — so the read grant hands out stream access to bots as well as people.Keen Agents 2026
Documentation
Release 15