Parameter Space Inspector

BLOG / USE CASES

An agent that measures before it answers

Every instrument is an MCP tool on your machine. Give Claude Code the endpoint and it can score a model's understanding, read the internal confidence gauge, and check the self-portrait before it recommends anything. One command to connect; two switches you keep off.

Updated 2026-10-25 · The Emergence Machine · Markdown version · RSS

An agent that measures before it answers. A PSI Studio walkthrough: connecting PSI to an agent, a card's answer beside a measured one, what stays in your hands, and what it will not tell you

Who this is for. People building with coding agents who want the agent's claims about a model to rest on measurements rather than on the model card. You need to be able to run a command in a terminal; the background section explains the rest.

Background: three ideas you need

1. MCP: tools an agent can call

MCP, the Model Context Protocol, is an open standard that lets an AI agent find and call tools on a server. PSI's browser server offers its instruments as MCP tools at one address on your own computer, http://127.0.0.1:4310/mcp. Once Claude Code knows that address, it can call a tool such as read_surprise the way it would run a command, and read the result.

A few of the tools this page uses:

Tool What it does Engine it needs
psi_status What is loaded right now, plus a short text for agents on what PSI can and cannot tell them none
read_surprise Reads a text as the Read view does: how surprising each piece was the local model
next_token_odds The model's odds for the next piece after a text the local model
fight_class The Fight class probe's reading of a described competition the inside engine, Qwen3-4B

The local model is a GGUF file run by llama.cpp. The inside engine runs the full-precision weights in Python and PyTorch, to read layers, neurons and heads.

2. Surprise: the number most answers rest on

A model reads text in tokens, which PSI calls pieces: " October" is one piece, "48213" may be several. Before each piece the model gives odds for what comes next. Surprise turns the odds it gave the piece that really came into bits:

Odds the model gave the real next piece Surprise
100% 0 bits
50% 1 bit
25% 2 bits
1 in 1,000 about 10 bits

Lower surprise on your text means the model reads your text better. Two files of the same model reading the same tickets can be compared piece by piece, which is what the agent does in step 4.

3. What comes back with every answer

Every tool result comes in one envelope: the result, the conditions it was measured under (model file, quantisation, engine), an analogue block saying what was measured and what may carry over to the agent reading it, any changed state, what was not measured, and the cost. So when the agent quotes a number, it can also say which file and engine produced it. Results are always about the open model named in the conditions, never about the agent itself.

What you need

  • PSI installed. See Install. You will run its browser server from a terminal in the PSI folder.
  • An MCP client. This page uses Claude Code.
  • A model. PSI ships no model: bring your own, from Hugging Face or any download. For the example question, two GGUF files of the same model at different quantisations, for example Qwen3-4B-Q8_0.gguf and Qwen3-4B-Q4_K_M.gguf (our runs used Qwen3-4B). The tools in step 4 need only the local model (llama.cpp): no Python, no GPU required.
  • The inside engine, only for inside tools such as fight_class: the full-precision weights plus Python and PyTorch, and a GPU with about 9 GB free (it falls back to the processor, slowly).
  • No OpenRouter key, unless you later allow the agent to call frontier models.
  • A few sample tickets (or whatever text your model will read) for the agent to score.

Steps

Step 1. Start the browser server

  1. Open a terminal in the PSI folder and run node src/devserver.js.
  2. It prints a token for this launch: the MCP token. Copy it. It is new at every start; set the PSI_MCP_TOKEN environment variable before starting if you want one that persists.
  3. Open http://127.0.0.1:4310 in a browser. You see the same app as the desktop version.

Step 2. Load the first model

An agent cannot choose which model file the engine runs; that stays with you.

  1. In the app, press the gear button (⚙, Model settings) at the top right. This opens Settings.
  2. Under Local model, pick the first file (Q8_0) and press Load. If it is not listed, press Scan folder, or paste the file's full path and press Load this file.
  3. Wait until the line under the list says Loaded with the file's name.

Step 3. Connect the agent

  1. In a second terminal, run this, with your token in place of <token>:

    claude mcp add --transport http psi http://127.0.0.1:4310/mcp --header "Authorization: Bearer <token>"

  2. Start Claude Code and ask it to call psi_status. Done looks like this: it reports the loaded file (for example Qwen3-4B-Q8_0.gguf) and the for agents text.

Step 4. Ask a question that needs a measurement

  1. Give the agent your sample tickets and ask:
Which of these two GGUF files should we ship for summarising support tickets?
  1. The agent runs Read on the tickets through read_surprise and notes the surprise for each.
  2. When it has scored the first file, load the second (Q4_K_M) yourself in Settings, as in step 2, and wait for Loaded. Tell the agent the second file is loaded, so it scores the same tickets again.
  3. It compares surprise between the two files and answers with numbers. Each number should name the file it came from, taken from the conditions.

Step 5. Have it check the Self-portrait first

The Self-portrait is one page per open model that PSI has measured, with every result beside the untrained twin (the same architecture with random weights) and its noise. If the model has been measured before, the agent can read the stored results instead of measuring again.

  1. Open Self-portrait in the app's left menu and pick the model.
  2. Press Copy as JSON for an agent and paste it into Claude Code. The JSON carries an analogue block, so the agent does not take it as a measurement of itself.
  3. If a result is missing, the page says not measured and why; the agent then measures, as in step 4.

Step 6. For an abstention policy, start from the confidence gauge

  1. Ask the agent to read the Fight class result on the confidence gauge first (card 3 in the Fight class view, "does the model know whether it knows?"; it is a recorded result, not a live run). The internal gauge predicts correctness better than the model's stated confidence, in every open model tested.
  2. The same card shows the baseline the gauge has to beat: the model's own top-1 output probability, which predicts correctness as well as any probe found so far. The agent can read that probability for its own question set with next_token_odds.

What stays in your hands

Agents cannot change keys, the spending cap or the engine. Changing a model (cuts, concept erase, grow) and spending OpenRouter credit are switches in Settings, under Agents (MCP): Agents may change models (cuts, concept erase, grow) and Agents may use external models (OpenRouter credit up to the cap, and your ChatGPT plan). Both stay off until you turn them on. The server answers only on your computer.

What you will see

If your agent answers with numbers tied to a named file, like the first sentence below, your setup is right.

An agent that says "Q8 scores 0.9 bits per token lower on your tickets than Q4; the difference is concentrated on amounts and ticket numbers" instead of "Q8 is generally more accurate." The second sentence is from a card; the first is from your machine.

What it will not tell you

Whether the agent chose the right test. Read the plan it drafts before it runs; the Experiment designer exists for exactly that handoff.

Questions people ask

How do I connect Claude Code to the Parameter Space Inspector?

Start PSI's browser server (node src/devserver.js), which prints a token for that launch (set PSI_MCP_TOKEN for one that persists), then run claude mcp add --transport http psi http://127.0.0.1:4310/mcp --header "Authorization: Bearer <token>". Every PSI instrument is then an MCP tool, and the server answers only on your computer.

Can an AI agent change my model or spend money through PSI?

Not unless you allow it. Agents connected to PSI cannot change keys, the spending cap or the engine; changing a model (cuts, concept erase, grow) and spending OpenRouter credit are switches in Settings that stay off until you turn them on.

Is a model's stated confidence a good sign that its answer is right?

Less good than its internal gauge: in PSI's Fight class results, the internal confidence probe predicts correctness better than the model's stated confidence in every open model tested, and the model's own top-1 output probability does as well as the probe. PSI does not tell you whether the agent chose the right test, so read the plan it drafts before it runs.

What does MCP mean, in plain words?

MCP, the Model Context Protocol, is an open standard that lets an AI agent find and call tools on a server. PSI's browser server offers each of its instruments as an MCP tool at an address on your own computer, protected by a token printed at each start, so an agent such as Claude Code can run a measurement and read the result.