CMLabs · Psyclone AIOS

12. PsyProbe

Point any browser at your running system and watch every node, space, component and message live — no instrumentation, no interference.

Overview

PsyProbe is served on the system's main port — open http://localhost:10000/ (it goes to /v2/), log in, and you get a live view of every node, process, component and connection, with the last 10 minutes of numbers, the last 3 minutes of messages, logs, alerts, a console and the system's recordings. Roles decide what you see and may change: admin (everything), operator (sees all, tests triggers, no settings), monitoring (numbers and alerts), user (apps only); developers are admins in development mode.

PsyProbe 1.x (the jQuery pages, time.xml and the /api/... calls) was removed on 16 Nov 2026: its pages open PsyProbe 2 and its API calls answer 410 Gone with the PsyProbe 2 call that replaces them (System Guide, chapter 3, has the table).

What the app shows

WhereWhat it shows
Graph (2D / 3D)Nodes and processes as boxes, components inside, connections as arrows whose width follows bytes per second; colour = the chosen metric (CPU, messages, bytes, queue). Collapse a box to add its traffic up; Follow keeps the busiest part in view.
TreeThe same, By deployment (node > process) or By function (the psySpec's group="A/B")
ComponentsOne dense row per component: rates in/out, totals since start, queue, cycles, CPU, memory, triggers, a one-minute sparkline (1 / 10 / 30 s averages)
SubscriptionsEvery trigger and post by message type, with the active and inactive contexts
Logs, Console, Alerts, AdminAll log lines with filters; the console commands; firing alerts with Acknowledge; accounts, API keys, the audit log and system actions
RecordingsWhen the system records (Mimir's Recorder): every recording, opened in the system's recording view
Inspector (select anything)Overview (1 / 10 / 30 s table), Performance (10-minute charts, then links to older recordings), Activity (messages of the last 3 minutes, masked content), Parameters, Triggers (with test buttons), Data (private data), Logs, Control, and the component's own views

Changing parameters

The Parameters tab lists every parameter of the selected component with a control that fits it: a slider with a number box for a ranged number, a number box for an open one, buttons or a menu for a list, a text box for a string. Changes apply at once (Enter or leaving the box; a click for list entries) and are audited; the server checks the value first and says what is wrong (“150 is outside 0..100”). A parameter that differs from its default is highlighted with ↺ to restore it; give it a description and a unit in the psySpec and the editor shows them. Operators see the values read-only; secret-looking values stay masked unless an admin ticks show secrets.

<module name="Tuner">
  <parameter name="Gain" type="Integer" value="[0:100:5]=50" description="How loud the reply is" unit="%" />  <!-- slider 0..100 in steps of 5 -->
  <parameter name="Mode" type="String" value="['fast';'slow';'auto']=slow" /> <!-- three buttons -->
  <parameter name="Label" type="String" value="hello" />                   <!-- a text box -->
</module>

Scripts use the same API: GET /api/v2/systems/local/components/<id>/parameters and the parameters.set / parameters.reset actions.

Your own data on screen

  1. A view — a small web page declared in the psySpec (<view>), shown as an inspector tab or a header page, reading anything below through the probe SDK as the logged-in user (below).
  2. Private data — api->setPrivateData("MyData", buf, len, "application/json") appears in the Data tab and at GET /api/v2/systems/local/components/<id>/data/MyData.
  3. RequestStore catalog — GET /api/v2/systems/local/query?from=RequestStore&query=FrameCounter (see Catalogs).
  4. Custom subsite — a directory mapped with <psyprobe><alias name="site" location="/dir"/> is served at /site/ without login.

Setting up and using PsyProbe 2

PsyProbe 2 brings accounts and roles, HTTPS with a built-in certificate authority (or a free Let's Encrypt certificate), a permission-checked REST API and the app at /v2/. To use it from other machines:

  1. Start a node with an SSL build and a TLS port: <psyprobe tlsport="10443" />.
  2. Open https://<host>:10443/v2/. The first time, the page asks for the setup code printed in the Psyclone log (also in probe/setup-code.txt next to the psySpec) and creates the first admin account.
  3. Trust the system's own CA once: download it from /v2/probe-ca.pem (the login page shows its SHA-256 fingerprint) and add it to the browser or OS, or pass it to curl: curl --cacert probe/certs/probe-ca.pem https://localhost:10443/api/v2/auth/session.

Roles: developer (same as admin in development mode; local logins only in deployed mode), admin, operator, monitoring and user. Scripts, monitoring tools and AI agents use machine accounts with API keys (Authorization: Bearer psy_<id>_<secret>). Every operation, its permission and its parameters are listed, for the logged-in account, at /api/v2/docs.md (generated from html/probe/probe-api.xml).

# an admin creates a monitoring key (session cookie + CSRF token from the login reply)
curl --cacert probe/certs/probe-ca.pem -b jar -H "X-Psy-CSRF: $CSRF" -H "Content-Type: application/json" \
     -d '{"id":"grafana","kind":"machine","role":"monitoring"}' https://localhost:10443/api/v2/accounts
curl --cacert probe/certs/probe-ca.pem -b jar -H "X-Psy-CSRF: $CSRF" -H "Content-Type: application/json" \
     -d '{"label":"dashboards"}' https://localhost:10443/api/v2/accounts/grafana/keys     # {"key":"psy_..."} shown once
curl --cacert probe/certs/probe-ca.pem -H "Authorization: Bearer psy_..." https://localhost:10443/api/v2/health

The application

/v2/ is the PsyProbe 2 application: after login, a graph of the system (nodes and processes as boxes, components inside, connections as arrows whose width follows the bytes per second); colour shows the chosen metric (CPU, messages, bytes or queue) on one scale from grey (idle) to red. Double-click a box, or use the tree on the left, to collapse a node or process into one item; edges are added up to it. Follow keeps the busiest part expanded and in view. Selecting anything opens the inspector: overview, 10-minute charts, the messages of the last 3 minutes (live), triggers and posts, private data and logs. Components lists every component densely, grouped by node: rates (1 s, 10 s or 30 s averages), totals since start, queue, cycles, CPU, memory, active triggers and a sparkline; the inspector's overview has the same numbers as v1's Performance tab, Subscriptions shows who triggers on which type and the contexts, Logs is the live log. Simple swaps the graph for lists and slows updates to 10 s, for small screens and bad connections; on a phone the tree is a drawer and the inspector a bottom sheet. Other nodes of the system are shown with their own numbers (gathered every 3 s while someone is watching).

Several systems, 3D and function groups

Federated systems (System Guide, chapter 3) show up next to your own: a dashed box per system in the graph, a ⧉ entry in the tree and a group in the Components view. Click one of their components and the inspector, its test buttons, its Control tab and the console (pick the system next to the prompt) work on that system, with the rights it gives you. A system that stops answering turns grey and says unreachable; its last state stays on screen.

3D (next to Follow) shows the same system as a slowly turning cloud: drag to turn it, scroll to zoom, click a sphere to inspect it. By function (above the tree) groups components by the group you give them in the psySpec instead of by node and process:

<module name="Turn" group="Dialogue/TurnTaking"> ... </module>
<module name="Filler" group="Dialogue/Voice"> ... </module>
<whiteboard name="Recorder" group="Storage"> ... </whiteboard>

Components without a group are listed under (no group).

Recordings

The history in PsyProbe covers the last 10 minutes. A system that records itself (Mimir's Recorder) names that component in <psyprobe recordings="Recorder" recordingview="Live timeline">; PsyProbe then has a Recordings page (start, length, messages, size, devices, what was recorded) and, under every history chart, “Older than 10 minutes” links to the latest recordings. Recordings that a restart leaves behind (a few status messages, no device) are hidden unless you tick show all. Open shows the recording in the named view — for Mimir, the conversation timeline with every turn, transcript, decision and sentence — without its audio. System Guide, chapter 3, has the provider's three queries.

Your own views and apps

A component can bring its own view into PsyProbe: a small web page that shows what only it knows (a map, a timeline, a chart). Declare it in the psySpec and it appears as a tab in the component's inspector (placement="component", the default inside a component) or as a button in the header that fills the main area (placement="page"):

<module name="Ping">
  <crank name="PingCrank" function="Simple"/> ...
  <view name="Demo" path="views/demo/" />      <!-- html/views/demo/index.html -->
</module>

The page runs in a sandboxed frame: it has no cookies and cannot call the API or open sockets itself. It loads /v2/psyprobe-view.js and asks PsyProbe for what it needs, as the user who is logged in:

<div>view for <b id="entity"></b> - components: <b id="comps"></b> - model frames: <b id="frames">0</b></div>
<script src="/v2/psyprobe-view.js"></script>
<script src="view.js"></script>

// view.js
(async function () {
  const s = await probe.ready;                         // { account, role, simple, entity: "comp:3", view }
  document.getElementById("entity").textContent = s.entity || "(page)";
  const m = await probe.get("systems/local/model");     // any read under systems/local/
  document.getElementById("comps").textContent = m.entities.filter((e) => e.kind !== "connection").length;
  let n = 0;
  probe.subscribe("model", {}, () => { document.getElementById("frames").textContent = ++n; });
  const ch = probe.channel("chat");                    // a socket to an app's service (<app channel=>)
  ch.onopen = () => ch.send("hello");
  ch.onmessage = (data) => console.log("service said", data);
  probe.resize(140);                                   // height of the inspector tab
})();
CallWhat it does
probe.ready, probe.session()Account, role, Simple layout, the entity the view is shown for
probe.get(path, params)A REST read: systems/local/... (model, history, messages, components, logs, alerts...), views, docs.md
probe.post(path, body)systems/local/actions/<action> (PsyProbe asks the user to confirm destructive ones) and systems/local/alerts/<id>/ack
probe.subscribe(topic, params, cb)Live topics model metrics entity logs messages alerts; returns a function that stops it
probe.channel(app)A socket to the service of <app name=app channel=...>: onopen, onmessage, onclose, send(), close()
probe.navigate(id), probe.toast(text), probe.resize(px)Open a component (id or name) in the inspector, show a short note, set the tab height

An application is a whole page for users, for example the Mimir conversation page: <psyprobe><app name="mimir" title="Mimir" root="/opt/mimir/web/static" channel="Web"/></psyprobe> serves it at /apps/mimir/ after the PsyProbe login, on its own page, with its WebSocket going to the Web service through PsyProbe (System Guide, chapter 3). A user account lands in its app directly; admins find the apps in the header.

Operating the system

The inspector's Triggers tab has a test button on every trigger and post (delivers an empty message, or fires the post), and the Parameters tab changes parameters (above), and the Control tab stops, starts or restarts the component (a stopped one receives nothing and is marked stopped in the Components view) and sends it a message. Alerts (the ⚠ badge) lists firing alerts with Acknowledge; add your own rules as <alert name="asr_backlog" entity="ASR" metric="queue" above="50" for="5"/> inside <psyprobe>. Console runs the Telnet console's commands (read-only ones for operators). Admin holds accounts, API keys, the audit log and the system actions (switch context, inject a message, reload the spec, restart, shut down); anything destructive asks Are you sure? first. Monitoring tools read /metrics with an API key (System Guide, chapter 3).

Live updates

A logged-in client (or an API key) asks for a one-time ticket, opens a WebSocket to the same server and subscribes to what it shows. Psyclone samples every component, node and connection once a second, keeps 10 minutes of history and the headers (plus a masked summary of the first 4 KB) of recent messages for 3 minutes, and sends only what changed: a Mimir-size system costs tens of bytes per second per client, and the sampler about half a millisecond per second.

POST /api/v2/live/ticket                     -> {"ticket":"...","expiresIn":60}
WebSocket to the same host and port, first message:
  {"op":"hello","ticket":"...","encoding":"json","rate":3000}      (encoding "packed" = binary DataMessages, deflate for big payloads)
  {"op":"sub","id":1,"topic":"model"}                               -> snap (all entities), then delta {add, remove}
  {"op":"sub","id":2,"topic":"metrics"}                             -> delta {i:[entity index...], m:[[cpu‰, msg/s x10 in, out, B/s in, out, queue, runs/s x10, status]...]}
  {"op":"sub","id":3,"topic":"messages","entity":"comp:4"}          -> event {messages:[...]} as they arrive
  {"op":"sub","id":4,"topic":"logs"}  {"op":"ping"} every 30 s
GET /api/v2/systems/local/history?entity=comp:4&seconds=600&step=5   (columnar 1-s samples)
GET /api/v2/systems/local/messages?entity=comp:4&limit=50
Source. PsyProbe 2 is an ordinary web application in Psyclone/probe-ui/ (Svelte, TypeScript, Vite), built into html/probe/; see the System Guide, The PsyProbe 2 source and building it.
Psyclone AIOS · CMLabs