Install the plugin
SetSQWISH_API_KEY to a key from the console first.
- Claude Code
- Other agents
- Ask your agent
/mcp to check that onehot is connected.Keep it up to date
The skill follows the API. An old copy can lead your agent to send fields the API no longer takes. Claude Code leaves auto-update off for marketplaces that Anthropic doesn’t run, so turn it on once: type/plugin, open Marketplaces, choose sqwish, then Enable auto-update.
To update by hand, run claude plugin update onehot@sqwish. In other agents, run npx skills update onehot.
Example prompts
Say “using the OneHot skill” so any agent loads it. In Claude Code you can also run/onehot:onehot.
Find fragile code
Find fragile code
Using the OneHot skill, find where this project classifies text with string matching,
regular expressions or by parsing a language model’s reply, and propose OneHot decisions
to replace them.
Build a feature
Build a feature
Using the OneHot skill, route incoming support tickets to billing, technical or other, and
send a ticket to a person when no team gets at least 0.6.
Tune the wording
Tune the wording
Using the OneHot skill, lint my decisions, then try them on the labelled examples in
tickets.jsonl and tell me which wording and threshold work best.Train your own model
Train your own model
Using the OneHot skill, quote a fine-tune on
tickets.jsonl, start it if it costs under
$5, and report the gate as it is.What OneHot’s MCP does
MCP is a way for an assistant to call tools. You give it one address. It reads the tools that address offers and calls one when the task needs it. OneHot’s server offers decision tools. Ask which tickets need a refund, and how sure the model is, and the agent can calldecide on each one. The answer is a probability for every outcome you allowed. The model does not write a reply, so it cannot invent an outcome that is not on your list.
A person can score text from the chat. A coding agent can check a decision, quote it and run it while it works. The key, the errors and the charges are the same as on the HTTP API. The calls spend credit from the account that owns the key.
Connect through MCP
The plugin connects Claude Code for you. Connect by hand for Codex and Cursor, or to use the tools without the skill. Connect one way only, or the agent sees every tool twice. Each tool is one call to the HTTP API, with the same key and the same errors. A key with inference access can decide, read models and families, and uselint_decision and list_recipes. Its calls to the other tools get 403 key_scope.
The endpoint accepts POST only and returns 405 to a GET.
The tools use your account. They can spend credit, including by keeping a model warm. Approve those calls in the client.
- Claude Code
- Codex
- Cursor
Run this once. To share the server with your team, add Then type
--scope project, which writes .mcp.json. Then write the header as 'Authorization: Bearer ${SQWISH_API_KEY}', in single quotes and with braces, so the file holds ${SQWISH_API_KEY} and not the key./mcp in Claude Code and check that onehot is connected.SQWISH_API_KEY.
To test the connection, ask the agent to list models. It should call list_models and report which are available.
The tools
Start withlist_recipes for a complete request. Use lint_decision to check the wording and estimate_decide for the quote. Then call decide.
The tools take text only. To ask about pictures, have the agent write code that calls the API (Images).
A fine-tune’s model joins its family only when its gate passes. A family that is switched on then moves to it (how a family moves).
- Decide
- Improve
- Families and models
decide, create_family and continue_family spend credit. So do keep_family_warm and keep_model_warm, where keep warm is billed. Switching, rolling back and deleting change what answers your calls. The tools that switch, keep warm, roll back or delete tell the agent to ask you first.Claude Code tool-call hook
POST /v1/hooks/claude-code is a separate check on Claude Code PreToolUse payloads. It returns allow, ask or deny. Each check is a decision, charged like any other. The default, mode=guard, never grants permission. mode=auto can allow, which skips Claude Code’s permission prompt. If the model isn’t sure, or scoring fails after the request is accepted, the hook asks the person.
To turn it on, add this to .claude/settings.json in your project, or to ~/.claude/settings.json for every project. Then set SQWISH_API_KEY before you start Claude Code. Keep the timeout short. If the hook does not answer in time, Claude Code asks you as it normally would. mode is a query parameter: for mode=auto, add ?mode=auto to the hook’s URL.
Files an agent can read
Two files on the API host tell an agent how to use OneHot. Fetching them needs no account.openapi.json
The machine-readable contract: routes, bodies, and responses. It matches the API reference tab.
llms.txt
A short guide to authentication, decisions, and the workflows around them. It links to the OpenAPI document.
Common problems
The agent doesn't use the skill
The agent doesn't use the skill
Run
/onehot:onehot in Claude Code, or say “using the OneHot skill”. Check that the skill
is installed for your agent, then restart it./mcp says onehot failed
/mcp says onehot failed
Start the agent from a shell where
SQWISH_API_KEY is set. api_key_required means the
agent sent no key. Signing in to the console doesn’t count. invalid_api_key means the
key is wrong or revoked. Make another one in the console.The agent invents request or response fields
The agent invents request or response fields
The skill is out of date. Update it and try again.
Answers don't match what you expect
Answers don't match what you expect
Describe each outcome more precisely, and give a way out such as “other”. Pick thresholds
on examples whose answers you know.
lint_decision flags the common mistakes.Questions
Where does an agent find the OpenAPI document?
Where does an agent find the OpenAPI document?
At
https://api.sqwish.ai/openapi.json. Fetching it needs no key. llms.txt on the same
host is the short guide, and it links to that file.Which key does MCP use?
Which key does MCP use?
The same API key as the HTTP API, sent as
Authorization: Bearer. Create it in the console.Will the agent change production on its own?
Will the agent change production on its own?
Only when you approve a tool that changes what answers: a switch, a rollback or a delete.
If the gate passes, a family it starts or continues for you moves to the trained model by
itself. Any family that is switched on does the same.
What if /mcp does not respond?
What if /mcp does not respond?
Use
https://api.sqwish.ai/mcp. The endpoint accepts POST only, with
Authorization: Bearer and an API key from the console. If the client cannot connect,
call the HTTP API from the OpenAPI document directly.