Margin

io.trymargin/margin · v0.2.1 · agents-and-memory

Margin is healthy: it completed an MCP handshake in 411 ms and exposes 16 tools.

Tests a model or prompt change on your own evals and says if it holds, before your agent ships it.

Endpoint: https://trymargin.io/api/mcp?tools=core (streamable-http)

Repository · Website · JSON · Add to my inventory

Facts

Users (last 30 days)0
HandshakeHealthy
Auth neededNone
Tool count16
Latency411 ms
Last checked (UTC)2026-11-30T20:40:16.970Z

Health history

Checked (UTC)StatusLatencyError
2026-11-30T20:40:16.970ZHealthy411
2026-11-28T11:05:12.069ZHealthy406
2026-11-26T03:10:22.530ZHealthy994

Tools (16)

margin_jobsWhere YOUR project's money goes, per job: each model-calling step over the last 30 days with its calls, cost, live model and whether any eval has exercised it, plus how concentrated the spend is in the top 5/10/20 jobs. A job is labelled 'code and traffic', 'traffic only' or 'code only', never dropp
margin_optimizeWHAT TO TEST NEXT for YOUR project: every candidate change Margin can name, ranked, each labelled by its basis: measured (a face-off ran and gave a verdict), detected, prior, or untested. A listed move is a candidate, not a verdict; the verdict comes from the face-off. A 'pr' move is a setting a fac
margin_faceoff_statusYOUR project's latest measured run, every face-off queued against it with its status and verdict, and the post-merge watch on each change you registered (holding, slipped, or still waiting for graded outcomes). Pull requests open from the console only, because that click is your approval. Needs the
margin_test_moveAsk Margin to TEST one move on YOUR project: a cheaper model, an output cap or a host pin, exactly as a move listed by margin_optimize (pass its level, target and lever). Margin re-runs your own evals with the move applied, in its sandbox, on your latest measured run, and its promotion gate decides:
margin_test_modelAsk Margin to face off ONE model you name (an OpenRouter slug such as openai/gpt-4.1-mini, or a release from this week) against YOUR project's latest measured run, on your own evals, in Margin's sandbox. Optionally name one `agent` to swap only its calls. Refused, with the reason, when the catalogue
margin_delegate_keyHand a narrower agent key to another agent: a boss agent to a department agent, a department agent to one agent. Pass a spend limit (taken out of YOUR key's limit), an optional label, an optional list of agent files it may test (inside your own scope), whether it may hand out keys in turn, and how m
margin_my_keysYOUR agent key: its spend limit, how much is reserved, which agents it covers, and the keys it has handed out to other agents. Needs an agent key.
margin_fit_checkBefore spending anything: can YOUR eval set prove a model switch? Pass the export's text (a promptfoo results file, a Braintrust or LangSmith dataset export, or JSONL of {input or messages, expected, check}). Returns how many cases Margin can grade (exact label, contains, regex or a JSON field; LLM-
margin_replay_datasetReplay YOUR eval dataset against a candidate model, with no repo run: each case goes to `baseline` and `candidate` with the same messages (and the same structured-output schema, when the case has one), is graded by the case's own check, and the two are compared case by case by Margin's parity gate.
margin_check_experimentsDid this change help or hurt, and is it proven? Compares two experiments your team ALREADY ran and scored (Braintrust export or experiment id; or LangSmith, with source langsmith or an ls:<experiment id or name>; or two Inspect .json logs or MLflow results tables, with source inspect or mlflow): the
margin_report_outcomeAfter a change Margin gave a verdict on has shipped (or did not ship): record what happened. `verdict_id` is the one the replay or check returned; `outcome` is held, regressed or not_shipped; `note` says how you know (an incident, a metric, a rerun). This is what Margin's track record for your proje
margin_change_recordOne verdict as a change record you can attach to your customer's change notice: what changed, the decision, the cases and the gap with its 95% bound, each segment's reading, the cases that got worse, cost per case, a review of the case set itself (`case_review`: size against the gate floor, cases th
margin_verdict_receiptOne verdict as a receipt someone outside your team can check: an in-toto Statement in a DSSE envelope (`receipt`), signed by Margin with Ed25519 when `signed` is true, with the decoded `statement` beside it. It carries the decision, the bar, the paired counts and gap, candidates tried, cost per case
margin_track_recordMargin's verdicts for your project and how they turned out: how many said ship, do not ship or not enough evidence, and of the ship verdicts your team reported on, how many held. Unreported ones are pending, never counted as held. Free.
margin_draft_checksWhen the fit check says your cases cannot be graded (free-text answers, common for support, ops and finance agents): pass what the agent is for (`task`, with its rules written out, e.g. 'never offer a coupon') and up to 20 real outputs (`samples`). Margin drafts pass/fail checks, code checks first,
margin_pin_drift_checkWatch one setup for quality drift (a provider changing a model under its name, your retrieval or tools moving): pin your eval cases (`dataset`, the export's text) and a `model`, at a `cadence` of daily or weekly. Each run replays the cases and compares them with the last complete run by Margin's pai