Prostir

Illustrative example

A formula and pricing calculator Agent with tested rules

When price, score, or eligibility depends on a fixed formula, chat should not improvise. This example uses a tested JavaScript tool and shows every assumption.

Before you read

What gets published

An illustrative 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 teams, 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 illustrative 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 a product you actually own

Create one Agent that stays under your control, can work as a prompt Agent or coordinate owned Agents as a Workflow Agent, and can be published privately on its own HTTPS address and MCP endpoint.

Solutions

Turn the useful demo into an owned Agent

Tell us the job, the people who should use it, and the knowledge or tools it needs. We will help you map the first honest Agent scope.