> For the complete documentation index, see [llms.txt](https://docs.beye.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.beye.ai/product-docs/calculators.md).

# Calculators

Deep analysis in one go

## Calculators

Turn repeatable analysis into agentic workflows you can run on demand.

A calculator is an agentic workflow you build by conversation. Describe the inputs you want and the calculation you need. The Analytics Harness builds the form, writes the calculation in SQL and Python and lays out the results. From then on, you fill in the form and select **Run**.

Use calculators for advanced analysis your team runs again and again, such as:

* **Anomaly detection**, for example flagging potentially fraudulent transactions
* **Suggested order calculations**
* **Forecasting**
* **Demand and supply planning**

### Create a Calculator

1. Open **Calculators** from the left rail.
2. Select **Add calculator**.
3. Enter a **Title**, choose the **Dataverse** the calculator works on, and select **Create calculator**.

<figure><img src="https://3313864313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzL3krDaq8tE17VN9J3mX%2Fuploads%2FuVx3oeB7SoKry8rkzBUM%2Fcalculators-empty.png?alt=media&amp;token=836afc1d-8fbb-4f1a-b905-d4c11cb0bf9f" alt=""><figcaption></figcaption></figure>

*Calculators, before any have been added.*

<figure><img src="https://3313864313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzL3krDaq8tE17VN9J3mX%2Fuploads%2Feow9e1RKIlvgjwwo5m1d%2Fadd-calculator.png?alt=media&amp;token=32a05de6-2c5b-4c9a-83f1-6691a3ceeb6d" alt=""><figcaption></figcaption></figure>

*Name your calculator and choose its dataverse.*

### Build It by Conversation

Your new calculator opens with a conversation on the left and the calculator on the right. Until it is built, its status reads **Still being built** and it cannot run yet.

<figure><img src="https://3313864313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzL3krDaq8tE17VN9J3mX%2Fuploads%2FbOkdGxE0czW67CE8hAoX%2Fcalculator-being-built.png?alt=media&amp;token=423f3edb-d2ea-4039-8edc-e926963c2cf5" alt=""><figcaption></figcaption></figure>

*A new calculator, ready for you to describe the form and the calculation.*

Describe the form and the calculation you want. Be clear about the inputs, the logic and the outputs. For example:

> Build an anomaly detection agent that highlights potentially fraudulent transactions. Build 3 summary KPI cards, one with a short markdown summary, a chart describing the transactions in question, a summary table and a PDF export, all in a single tab.

The harness works in the open while it builds. It looks up your dataverse metadata, queries the data, updates the form, writes the calculation and tests it with code, and each step appears in the conversation. When the calculator is ready, the status changes to **Ready to run**.

### Run a Calculator

<figure><img src="https://3313864313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzL3krDaq8tE17VN9J3mX%2Fuploads%2FobLOnTBDNpuObVDzFb3x%2Fcalculator-ready-to-run.png?alt=media&amp;token=d6b037fd-af39-4a8c-b21e-11bbb41a7bfa" alt=""><figcaption></figcaption></figure>

*A finished anomaly detection calculator. The form is on the right, and the conversation that built it is on the left.*

1. Fill in the form. Required fields are marked with an asterisk, and optional fields are labeled **(optional)**. In the anomaly detection example, the form asks for:
   * **Transaction period** (required): the date range to score.
   * **Merchant categories** (optional): leave empty to score every category.
   * **Detection sensitivity** (required): the minimum anomaly score needed to flag a transaction. The Balanced setting flags a score of 4 or higher.
   * **Minimum amount (USD)** (optional): ignore transactions below this amount.
   * **Rows in summary table** (optional): how many of the highest scoring transactions to list.
2. Select **Run**.
3. Review the results below the form. The **Ran with** row shows the revision and the exact inputs used, so every result traces back to how it was produced.

Select **Previous runs** to look back at earlier runs. Select **Hide conversation** to give the calculator the full width of the screen.

In the Calculators sidebar, each calculator shows its dataverse, its latest revision and how many times it has run in the last 30 days.

### Revisions and History

Every change to a calculator creates a new revision, shown as r1, r2 and so on next to its status.

Open **Revision history** to see every change to the calculator's form, script and layout, newest first. Each entry shows who made the change, what changed and how many lines changed. Select **Show diff** to see the exact change.

<figure><img src="https://3313864313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzL3krDaq8tE17VN9J3mX%2Fuploads%2FbTY2MuP6iZ9BdrIdOnVt%2Fcalculator-revision-history.png?alt=media&amp;token=20016750-6e6f-4d46-85cc-e8568899626f" alt=""><figcaption></figcaption></figure>

*Revision history shows every change to the form, script and layout.*

### Keep Improving It

To change a calculator, ask in the same conversation. Add an input, adjust the logic or add a chart, and the harness updates the calculator and records a new revision.

### Find and Filter Calculators

* Use **Search calculators** to find a calculator by name.
* Use the **All dataverses** menu to see the calculators for one dataverse.
* Calculators that have been shared with you also appear in the sidebar.

### Tips for Writing a Calculator Prompt

* **Name every input**, and say whether each one is required.
* **Describe the calculation in business terms**, including thresholds, such as the score that should flag a transaction.
* **List the outputs you want**, such as KPI cards, a chart, a summary table or a PDF export.
* **Say how to lay it out**, for example all in a single tab.
* **Test, then refine.** Run it with real inputs, then ask for changes in the same conversation.
