Skip to content
Get started

How Curva works

Use with an AI tool

Curva sits between your app and a language model. You give it some data and typed questions, and you get back typed answers with a probability on each one, so your code can act on them.

A model is good at reading messy input. It’s harder to build on directly, because it replies in free text and sounds equally sure when it’s wrong. Curva adds what your code needs around it.

When you call a model directly When you call it through Curva
Free text that you parse yourself A typed answer: an option, a level, yes or no, a number, a box on a photo
It sounds sure either way A probability on each answer, and calibration against your own labels
The order of your options can sway the pick Options asked in both orders and averaged
It has to pick something A none_of_these option, and an abstain flag below the bar you set
Every answer costs a call Rules, the cache and learned answers can answer with no model call
You have the reply and nothing else An audit log, and signed receipts anyone can check offline

Eight layers, top to bottom, in the order a decision passes through them. Press Follow one decision to step through the real example below.

Drag the model to turn it. Click a layer to read about it.

  1. 1 Your app

    Your code calls Curva through an SDK, plain HTTP or MCP. Curva runs on your own machine or server, and it uses your own model key.

    In the example: A support app sends one ticket and three questions.

  2. 2 Your data

    The state is whatever the decision is about: text, JSON, pictures, recordings or clips. For big PDFs, Curva finds the right passages in your library first.

    In the example: State: the ticket text, amount 40, plan free.

  3. 3 Typed questions

    Each question fixes the shape of its answer, so your code never parses free text. A question can be skipped with when, or wait for another with depends_on.

    In the example: team is a Choice. refund and priority_support are yes or no.

  4. 4 Rules and memory

    A rule you wrote answers without calling a model. If you switch on learned answers, a small model trained on your feedback can answer once it proves itself. A repeated question can come from the cache.

    In the example: The rule on plan free answers priority_support: no, with no model call.

  5. 5 Any model

    The rest go to the model you chose. Curva asks with the options in both orders and averages them, so position can't sway the pick, and a Choice gets a none_of_these option so the model is never forced to guess.

    In the example: team: billing 0.9992. refund: yes 0.9999.

  6. 6 Calibration

    You send the true answers back as feedback. From 30 labels on a question, Curva tries a calibrator and keeps it only if it beats the raw probabilities on held-out labels, so a stated 90% moves closer to being right 90% of the time.

    In the example: calibrated: false. This question has no labels yet, so these are raw probabilities.

  7. 7 Confidence check

    You set the bar. An answer below it comes back with abstain: true, so your app can hand it to a person. A promised accuracy sets that bar from your own labels.

    In the example: team cleared the 0.8 bar: abstain is false.

  8. 8 Proof and actions

    The audit log records the decision with a salted hash of the state, not the state itself. A receipt that anyone can check offline can come back with the answer, and triggers can call your webhook or chat channel.

    In the example: Typed answers and a signed receipt returned in 690 ms, for $0.00021.

Each of these guides opens with the same kind of model, following one real case step by step.

Part See how it works
Hearing a live call Voice calls
Watching a camera or a clip Live video, Video clips
Reading PDFs and photos Library, Images, Boxes
Rules in plain words, and what fires next Ask files, Actions
Keeping an AI agent in check AI agents, Curva Router
Getting better from your corrections Feedback, Learned answers, On a phone
Proving what happened Signed receipts

This ran on 1 November 2026 on moonshotai.kimi-k2.5 through Amazon Bedrock, from a laptop in India.

import curva
from curva import Choice, Noul
d = curva.decide(
{"ticket": "I was charged twice for order A-104. Please refund the duplicate.", "amount": 40, "plan": "free"},
{
"team": Choice("Which team handles this?", {"billing": "Payments and refunds", "technical": "Bugs and outages"}, min_confidence=0.8),
"refund": Noul("Does the customer ask for a refund?"),
"priority_support": Noul("Does this customer get priority support?").rule(False, plan="free"),
},
)
Question Answer Probability Where it came from
team billing 0.9992 The model, cleared the 0.8 bar
refund Yes 0.9999 The model
priority_support No Certain Your rule, with no model call

The whole decision took 690 ms and cost $0.00021, and came back with a signed receipt. calibrated was false on every answer, because this question had no labels yet. Raw probabilities like these can be overconfident, which is why calibration exists.

You have Curva can Read more
Text in any language Route, score, pull out fields Questions and answers, Any language
Photos Answer questions, read fields, draw boxes Images, Boxes
Big PDFs and files Find passages in a local library and answer with the page cited Library
Live calls and recordings Listen to the audio and act during the call Voice
Clips and live cameras Watch for what you describe Video, Live video
An AI agent Check an action before it runs, screen input, pick a model Agents, Agent frameworks
Things to do next Call your webhook or chat channel when an answer fires Actions
A need for proof Keep an audit log and sign receipts Receipts

To see these on real problems, read the 200 use cases, wrong answers included.

A model can still be wrong, and instructions hidden in the input can still steer some answers. Live answers on camera video go through a hosted model and take about a second. The full list is on Known limits.