Skip to main content
This guide takes you from nothing to a pricing agent of your own. Margin Check holds a company’s price list, costs, discount policy and current contracts, and answers two questions about any deal: what it does to gross margin, and who has to approve it. You can ask it from your terminal, or from your coding agent while you work on the code that builds quotes, with nothing to attach. Orca is where it runs. Tokens cost OpenRouter’s price plus their fee, with no markup from us, and the harness underneath is built to spend fewer of them. A sandbox starts only when a session needs one (Margin Check doesn’t), a model call that hits a hiccup is retried for you, and every session shows exactly what it cost. Each step below builds on the one before, and you can stop after any of them.
No account yet? Sign up first. New accounts start with free credit and no card, and every step on this page runs on it.

What it knows

  • A made-up company’s pricing. Larkspur Analytics sells dashboards per seat on three plans, Starter, Team and Enterprise, with add-ons, premium support and an onboarding package. Margin Check holds its prices, its cost to serve each item, nine discount rules numbered R1 to R9, and seven current contracts. All of it is sample data, and step 2 shows it in full.
  • All of it in the agent’s instructions. Nothing is stored in files, so every chat has the data, including one your coding agent starts through Orca’s MCP server, where nothing can be attached. To use your own pricing, you edit the instructions: see make it yours.
  • Every figure with its working. Without a sandbox, Margin Check works out each figure step by step in a table, with the formula and the numbers in it, so you can check every one. Given a sandbox with --sandbox, it computes them with Python. Language models can slip on arithmetic, so read the working before you rely on a figure, or use --sandbox for the ones that matter.
  • Today’s date only when you give it. For a question like “which contracts end in the next 60 days”, put today’s date in the question. Without a sandbox to read the clock, Margin Check asks for the date rather than guess it.

What you’ll do

  1. Install the CLI and sign in.
  2. Copy Margin Check with one command, or build it from code.
  3. Use it: ask about a deal, then make it yours.
  4. Let your coding agent drive.
  5. Run it from your own code.
  6. See what it cost, and clean up.
You need a terminal on macOS or Linux. Python or Node is only needed to build Margin Check from code (step 2) and in step 5. Margin Check needs no sandbox, so it uses no machine time: you pay only for its model tokens, from your credit.

Or hand this page to your coding agent

If you work in Claude Code, Codex, or Cursor, it can do the typing while you watch. Paste this prompt:
The commands below work in bash, zsh, and fish, on macOS and Linux. Where the shells differ, a block has a tab for each.

1. Install the CLI and sign in

The script installs a single orca binary to ~/.local/bin. If your shell then says orca: command not found, add that folder to your PATH as the script suggests, and open a new terminal. On Windows, download the binary from the releases page. An older CLI updates itself with orca update.
It prints a one-time code and a link to the Orca dashboard. Open the link, sign in, check that the code matches, and choose Approve. The CLI then prints “Logged in to Orca as” your role and organization. It works the same over SSH and inside a coding agent, which relays the code and the link to you. Check your credit:
balance is your Orca credit. The amount new accounts start with is on the pricing page.

2. Copy Margin Check

Margin Check is a model, a reasoning effort, and its instructions, which hold the whole sample company: prices, costs, rules and contracts, then how to compute and how to answer. It lists no tools. This is all of it:
The instructions are the whole program: Orca runs each conversation and keeps every message, and the model follows the rules. reasoning gives the model room to work through every rule before it writes the verdict. The model name also says who pays: orca/openrouter/<id> runs on your Orca credit. See models and provider keys. Get Margin Check into your account whichever way you like:
Margin Check is shared as a kit, a link anyone can copy an agent from.
1

Copy it into your account

Or open Margin Check’s kit page and choose Copy.
2

See your agent

It shows the same definition as the code above.
Either way, Margin Check is now in your account. Its code is in orca-kits on GitHub.

3. Use it

Ask Margin Check about a deal:
Brightline Logistics is one of the sample contracts: 80 Team seats at 15 percent off for 12 months, with SSO and the audit log. Margin Check keeps whatever the question doesn’t change, works out the figures, and checks the deal against every rule. A real run on 2026-10-16 answered:
That answer cost less than a cent. It reads in four parts:
  • The verdict, in the first line. Needing the CFO is not a refusal: a deal is not allowed only when its margin is under 70 percent (R3) or its seats are outside the plan’s limits (R5).
  • The working table, a row for each figure, with its formula and the numbers in it.
  • The rules that decided it, by number. Here three apply, and R8 makes the highest of them the approver.
  • A counter-offer: the largest discount the rep could approve alone, and the largest a sales manager could, each with its margin and how it was found.
Ask about the contracts, too. Give today’s date with any question that depends on it:
To have a conversation, run orca chat margin-check with no question, then ask follow-ups such as “And at 20 percent off?” in the same session. Ctrl-C leaves the chat and prints session session_...; orca chat margin-check --session session_... picks it up again.
For figures you’ll act on, add --sandbox: Margin Check then writes a Python script for every figure, runs it, and copies the numbers from its output. A sandbox uses machine time, so delete the session when you’re done with orca sessions delete session_... --yes. A real run with --sandbox on the question above used one minute of machine time.

Make it yours

Everything Margin Check knows is in its instructions, so putting in your own pricing is an edit. Open it on the Agents page, choose Edit agent, and replace Larkspur’s tables and rules with yours. Or edit margin_check_agent.py, delete the old agent with orca agents delete margin-check --yes, and run the file again.
  • Keep the shape: the price list, the cost to serve, how to compute, the numbered rules, and the contracts. Answers cite rules by their numbers.
  • Change “How to compute” with your pricing, such as how your add-ons are discounted.
  • The counter-offer’s formula uses 0.22, which is 1 minus the 75 percent margin floor of R3 minus the 3 percent payment processing. If you change either, change 0.22 to match.
  • Anyone who can read the agent can read your pricing. If you publish your own version as a kit, its instructions go with it.

4. Let your coding agent drive

Give your coding agent Orca’s tools, and you can ask Margin Check without leaving your editor. orca mcp serve is an MCP server with one tool per CLI action, so your coding agent can copy kits, chat with agents, and read your usage and wallet. It uses the login you already have.
Install the Orca plugin. It registers the MCP server and adds a skill that knows the CLI:
Or add only the MCP server:
Start a new session of your coding agent so it loads the server. Its chat tool sends Margin Check a message and returns the reply, with nothing to attach, since the pricing is in Margin Check’s instructions. Then ask it things like:
  • “I’m changing the renewal logic in our quote builder. Ask Margin Check what renewing Brightline at 100 Team seats for 24 months at 25 percent off does to margin, and who approves it, and check our code picks the same approver.”
  • “Ask Margin Check the largest discount a sales manager could approve on a 36-month Enterprise deal for 200 seats with the audit log.”
  • “Ask Margin Check which contracts end in the next 60 days. Today is 2026-10-16.”
  • “How much Orca credit do I have left, and what did Margin Check cost today?”
Your coding agent acts as you with these tools: it can create, delete, and spend. See use Orca from coding agents for every tool.

5. Run it from your own code

Everything so far went through the CLI, which calls the same API your application will. Your code uses the official openai package with an Orca API key. If you built Margin Check from code in step 2 in this terminal, you already have both: skip to the program. Install the openai package. It needs Python 3.10 or later, or Node 22.18 or later. Check your version first, and update it if it’s older:
Then make a key, in the terminal you’ll run the program from. This keeps it there as ORCA_API_KEY without printing it. A new terminal won’t have it, so run this again there.
This program finds Margin Check, opens a session with no sandbox, streams the answer to the question you give it, and deletes the session:
A real run of the Python program printed:
Net 60 needs a sales manager (R6), so the rep has no counter-offer at those terms. Margin Check lives on Orca, so your code only asks the question and reads the answer. Build with the API explains each call.

6. See what it cost, and clean up

Every call is recorded with what it cost, down to the session:
orca sessions get session_... shows one session’s cost, tokens, and machine time.
  • Model tokens are paid from your Orca credit, since Margin Check’s model starts with orca/. Each answer on this page cost less than a cent.
  • Margin Check uses no machine time, unless you give it a sandbox with --sandbox. Sandboxes use machine time from your plan and need a small balance of credit, your plan’s minimum balance.
The numbers for each plan are on the pricing page. See usage and wallet for the rest. Keep Margin Check if you like it. To remove everything this page made instead, delete Margin Check’s sessions, then Margin Check, then the key. Deleting an agent does not delete its sessions.
Then revoke the key named margin-check with orca keys revoke <its id> --yes, and close the terminal: its ORCA_API_KEY still holds the revoked key.

Where to go next

Scout

Another kit: a research assistant that searches the web and answers with its sources.

Cram Coach

Another kit: a textbook chapter and your exam date in, a study plan, Anki cards, and a practice test out.

Build your own agent

Every call explained, from creating an agent to streaming its answers.

Share your own agent

Publish an agent as a kit and send the link to anyone.