Working with an AI, from idea to analysis
A measurement has a few stages: you form a hypothesis, decide what to measure, write the procedure that measures it, record the data and analyze it. LabOrchestra gives an AI two different ways in, and it helps to know which does what, so that you do not have to carry the conversation from one tool to another.
Two ways in
Section titled “Two ways in”| What it can do | Where it runs | |
|---|---|---|
| MCP (AI access) | Operate and inspect the running lab: read states, history, logs and recordings, and with the mode Control call actions, start procedures and recordings, take notes. It cannot create or change files. | Any client that supports MCP: Claude Desktop, Claude Code, others. On your laptop or on the lab PC. |
| Files of the workspace | Write and change code: devices, procedures, widgets, scripts, analysis. | A coding assistant that can edit files in the workspace folder, such as Claude Code, or an editor with an assistant. |
MCP has no tool to write files on purpose: a token that may write code could run anything on the lab computer, which the mode Control does not allow. Code is written where files are, in the workspace folder.
One conversation in the workspace
Section titled “One conversation in the workspace”The simplest way is to work with Claude Code in the workspace folder. There it has both: it edits files, and it is connected to the running lab through MCP (laborchestra mcp install or Set up Claude Code on the Devices page sets this up). So the whole path can be one conversation:
- Hypothesis and plan. Discuss what you expect and what to measure. It can look at the lab as it is now: which devices exist, their states and limits, earlier recordings and the history of a pressure or a temperature.
- The procedure. It writes
procedures/<name>.pyfrom the guide for procedures, which LabOrchestra put into the workspace for it. Parameters become the form on the Procedures page. - A trial run. It starts the procedure, waits for the result (
wait_for_run), and reads logs and errors. A failure comes back with the traceback, so it can fix the file and run again. Devices that are not safe to move without you are written down inAGENTS.md; list them there. - The recording. The procedure records; each recording has the parameters, the device configuration and the state changes in it.
- The analysis. It writes a script that reads the recording with
laborchestra.load_recording(path)and plots or fits it, in the same folder, under version control. - Back to the hypothesis. The result is in the conversation, next to the code that made it. Change the parameters, or the idea, and go on.
You decide when something runs on hardware: use the mode Read-only while an assistant is only planning, and Control only when you are at the instrument.
When to use Claude Desktop
Section titled “When to use Claude Desktop”Claude Desktop (or any client with MCP only) is a good place to talk about the lab: ask what a device is doing, why a run failed, what was measured last week, to explain a spectrum or to compare two recordings. With the mode Control it can also start a procedure that already exists, wait for it and read the result.
What it cannot do is write the procedure: it hands the code over in its answer, and you save it into procedures/. If that happens often, move the conversation to Claude Code in the workspace.
What carries over between tools
Section titled “What carries over between tools”Conversations are not shared between clients: Claude Desktop does not know what you told Claude Code. Whatever should last goes into files:
AGENTS.mdin the workspace: what is special about your lab (which instrument must never be moved unasked, naming, safe ranges). Every new session of a coding assistant reads it.- Notes:
add_notewrites a note into the lab notebook, andget_notesreads it, from every client. Use it for “what we tried and why”. - Recordings and run records: each has its parameters, procedure, source hash and who started it. They are the ground truth about what happened.
- The code itself: procedures and analysis scripts in the workspace are in git, with the commit messages for the reasoning.
See also
Section titled “See also”- AI access: modes, tokens, connecting a client.
- Procedures and Scripts.
- MCP tools.
Something wrong or missing on this page? Open a GitHub issue or use the form (no account needed).