This page covers Local agent mode, which is available today.
How local agent mode works
A small program called the bridge runs on your machine. The Pluto web app sends it your chat messages over loopback; the bridge runs your agent CLI, and the agent looks up experiment data through the Pluto MCP server using your API key.- Inference runs on your machine, under your own Claude or ChatGPT subscription. Chat costs nothing extra and uses no Trainy model quota.
- Conversations never pass through Trainy’s servers. Only the data lookups your agent makes reach Pluto, as ordinary authenticated API calls.
Requirements
- Node.js 20.10 or newer
- Claude Code (
claude) or Codex, installed and signed in - A Pluto API key — Settings > Developers > API Keys at pluto.trainy.ai
Setup
Step 1: Start the bridge
In the Pluto UI, open Chat and set the backend selector to Local agent. The page shows the exact command to run, pinned to a version:Step 2: Pair the browser
Click Connect agent, enter that port and token, and save. The dot next to the button turns green once the health check succeeds. The token is stored at~/.config/pluto-bridge/token and reused, so restarting the bridge does not break the pairing. You only pair again if you rotate the token with --rotate-token.
Step 3: Ask
Pick a project from the selector and ask away:“Compare train/loss across my last three runs — which one converged fastest?”
“Run MMP-42 failed at step 12000. What do the logs say?”
“Are there any loss spikes in the runs tagged baseline?”
Multi-turn context uses your agent’s own session resume, so follow-up questions keep the thread.
What the agent can reach
The agent gets an explicit allowlist of read-only Pluto tools — projects, runs, metrics, logs, files, statistics, comparisons and dashboards. The full tool list is on the MCP Integration page. Pass--allow-writes to additionally let it add or remove tags, edit notes, and create, edit or restore dashboards:
Options
Self-hosted Pluto
A self-hosted deployment serves the UI and the MCP from your own domains, so name both:Security
- Loopback only. The bridge listens on
127.0.0.1, so other machines cannot reach it. - Pairing token. Every request must carry the token, and the token file is readable only by you (
0600). - Origin allowlist. Browsers may call the bridge only from
https://pluto.trainy.aiplus any origins you add with--origin. Someone who sees your token still cannot use it from another website. - Read-only is enforced by the agent, not by a prompt. Claude Code runs with
--strict-mcp-configand the write tools in--disallowedTools, which beats your own allow rules; Codex runs with--ignore-user-config,enabled_toolslimited to the granted tools, and shell commands in theread-onlysandbox. Text sitting in run data cannot talk the model past that boundary. - Your API key stays out of the process list. The agent reads
PLUTO_API_KEYfrom its environment, never from a command-line argument. - No runtime dependencies and no install scripts in the published package.
Because Codex runs with
--ignore-user-config, settings in your ~/.codex/config.toml — model choice among them — do not apply to bridge chats. Sign-in still comes from CODEX_HOME.Troubleshooting
The bridge logs 'Refused a request from <origin>'
The bridge logs 'Refused a request from <origin>'
The browser origin is not on the allowlist. Restart the bridge with
--origin <that origin> — needed for any self-hosted Pluto, and for http://localhost:3000 during local development.'Lost contact with the local agent bridge'
'Lost contact with the local agent bridge'
The bridge stopped answering — usually the terminal was closed or the machine slept. Your conversation is still on screen; restart the same command and it reconnects automatically, because the pairing token persists.
'Chat is not enabled' when the backend is Server model
'Chat is not enabled' when the backend is Server model
Your organization is not in the private preview for the hosted model. Switch the selector to Local agent, which works regardless, or contact us.
The agent answers without looking anything up
The agent answers without looking anything up
Check that the terminal running the bridge shows
Agent: claude (or codex) and no MCP errors. If the agent CLI is not signed in, it fails before reaching the Pluto tools — run claude or codex once on its own first.Feedback
Chat and the bridge are experimental. We’d love to hear how they behave on real experiments:- Discord: Join our community
- Email: support@trainy.ai