Prostir

Build idea

A formula and pricing calculator Agent with tested rules

A calculator agent can use a tested formula for a defined pricing or arithmetic job. Describe the inputs and result in Builder, verify the supported tool and test edge cases. This example does not make an untested calculation reliable.

Before you read

What gets published

An worked Agent setup that gathers missing inputs, calls one approved JavaScript tool, and returns the calculated result with assumptions and review limits.

Best for

Consultants, agencies, operations companies, and SaaS owners who already have a reviewed formula or spreadsheet rule.

Where the work happens

Illustrative Agent · Tested JavaScript · Formula rules · Visible assumptions

01

Where chat-only calculation breaks down

  • The formula is correct in a spreadsheet, but customers keep asking someone to run it for them.
  • A conversational answer can skip a required input, round differently, or invent a rule that was never approved.
  • Rates, tax treatment, and professional judgment can change, so the owner still needs an explicit review boundary.
02

Build the rule before the conversation

Treat the calculator as an owned function with a narrow input contract, not as a prompt that happens to contain arithmetic.

  1. 01
    Write the formula specification.

    Name every input, unit, default, rounding rule, allowed range, and source date.

  2. 02
    Create one JavaScript tool.

    Return a structured result and reject missing, malformed, or out-of-range arguments.

  3. 03
    Save passing and failing test cases.

    Cover ordinary values, boundaries, missing fields, rounding, and an expected runtime failure before attachment.

  4. 04
    Attach it to the Agent and review the explanation.

    The Agent asks for missing facts, calls the approved tool, and explains the result without changing the formula.

03

The small review pack

Keep the rule, executable source, examples, and refusal boundary together so a reviewer can trace the answer.

  • docformula-spec.mdOwned formula, input definitions, units, rounding, and the date each rate was reviewed.
  • codecalculator.jsThe bounded JavaScript function that performs the approved calculation.
  • datatest-cases.jsonSaved inputs with exact expected outputs plus invalid and boundary cases.
  • docreview-boundaries.mdCases that need a person, a refreshed rate, tax advice, or another authoritative system.
04

What one tested run looks like

Illustrative pricing example; the numbers and formula are not a Prostir price quote.

Illustrative pricing example; the numbers and formula are not a Prostir price quote.

Prostir Studio

Quote 42 seats for 12 months at €19 per seat each month, with a 12% discount and tax excluded.

I have the seat count, term, rate, discount, currency, and tax treatment. I’ll run the approved pricing rule rather than calculate it in the chat.

pricing_calculator · approved input

{"seats":42,"months":12,"monthlyRate":19,"discountPercent":12,"taxIncluded":false,"locale":"en"}

€8,426.88 before tax. Assumptions: 42 × €19 × 12, then a 12% discount; no tax or additional fees included.

05

What the owner still owns

  • This is an worked configuration, not a live customer result or a promise that every formula fits.
  • The creator owns the formula, source rates, legal or accounting review, and the decision to publish a changed version.
  • Saved tests prove only the cases they cover; new boundaries and stale data must fail visibly and be reviewed.
  • Regulated advice, authoritative quotes, live inventory, or cross-system decisions need their own verified source and approval path.

Solutions

AI agent builder for the way your business works

An agent with a clear job, your business context and a working path for the people who need it. You can test the agent with real requests, inspect its sources and allowed actions, and refine it in Builder before inviting others.

Solutions

Your next agent starts with your work.

Pick one customer question or routine task and build an agent for it with your own knowledge. Start your 7-day Creator trial, no card needed.

Image preview