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--sandboxfor 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
- Install the CLI and sign in.
- Copy Margin Check with one command, or build it from code.
- Use it: ask about a deal, then make it yours.
- Let your coding agent drive.
- Run it from your own code.
- See what it cost, and clean up.
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:1. Install the CLI and sign in
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.
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: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:
- Copy it (one command)
- Build it from code
Margin Check is shared as a kit, a link anyone can copy an agent from.Or open Margin Check’s kit page and choose Copy.It shows the same definition as the code above.
1
Copy it into your account
2
See your agent
3. Use it
Ask Margin Check about a deal:- 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.
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.
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 editmargin_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.
- Claude Code
- Cursor
- Codex
Install the Orca plugin. It registers the MCP server and adds a skill that knows the CLI:Or add only the MCP server:
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?”
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 officialopenai 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:
ORCA_API_KEY without printing it. A new terminal won’t have it, so run this again there.
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.
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.