Changelog
All notable changes to Curva. The format follows Keep a Changelog
and versions follow Semantic Versioning. The HTTP API v1 contract is frozen:
breaking API changes go to /v2.
[Unreleased]
Section titled “[Unreleased]”[0.3.1] - 2026-10-29
Section titled “[0.3.1] - 2026-10-29”-
/v1/watchreuses an answer for a near-identical frame. A frame no camera head could answer alone, near-identical (thumbnail grid, brightness taken out) to one the hosted model judged on the same stream in the last 30 s with the samestate, gets that answer again with"tier": "cache"and no paid call; the receipt countscachedandreused. On by default. Measured on two synthetic 10-minute clips: hosted-model calls a camera-hour fell 8% at 1 camera, 15% at 10 and 16% at 25 on a lobby clip, and 42% on a kitchen clip, with no reused answer wrong against the truth; the goal was 50%.CURVA_WATCH_REUSE=offturns it off.CURVA_WATCH_CROPS=on(off by default, not measured) sends only the changed area. Batching frames for the hosted model is not built. -
Ask files: rules written as Markdown. A
## headingand one sentence per thing to look for, with optional bullets (- not:,- alert:,- choice:,- score:,- text,- webhook:,- slack:,- teams:,- discord:,- telegram:,- if <reading> <op> <value>), work asaskon/v1/decide,/v1/listenand/v1/watch; the SDKs take a path (ask="rules.md") and send the text. Plain words (ask="tell me when smoke appears") are written into a file once by the server’s model and saved next to the script; later runs read the file with no model call. Saving the file whilewatchruns applies the new rules from the next frames (areloadedevent); a broken edit keeps the old rules and names the line.POST /v1/ask-fileshows what the server understood (no model call) or turns plain words into a file.curva ask check rules.mdprints each rule in plain words and the JSON it runs;curva ask examplelists 7 ready files (drivinggives exactly the built-indrivingset). At most 32 KB and 64 rules a file. Parsing takes 3.8 µs for 1 rule, 37 µs for 10 and 177 µs for 50 (p50, release build, Apple M-series). See Ask files. -
Actions on any decision, and in chat apps.
triggerson/v1/decidefire as on live calls and video: the response lists the firedactions(name,id,because), and each action is sent beside the decision, never holding it up. A trigger posts to itswebhook(signed with the project’s secret) and toslack,teams,discordandtelegramURLs as one readable line in each app’s own shape;timeout_ms(default 5000, at most 30000) caps each attempt. A delivery is tried up to 3 times on 408, 429, 5xx or no answer, and every delivery is logged per project (newest 10,000, up to 30 days; scheme and host only, the full URL kept encrypted withCURVA_MASTER_KEY):GET /v1/deliverieslists them,POST /v1/deliveries/{id}/replaysends one again with the same idempotency key. CLI:curva webhook test <url>,curva webhook log,curva webhook replay <id>. A webhook carriesx-curva-idempotency-keyandx-curva-signature: t=<unix seconds>,v1=<hex>, the HMAC-SHA256 of<t>.<idempotency key>.<body>, signed again with a freshton every attempt and replay; Pythonverify_webhookand TypeScriptverifyWebhookcheck it and refuse atmore than 300 s from now (an argument changes that), so a captured webhook cannot be replayed later. At most 256 deliveries are in flight at once (CURVA_DELIVERIES_IN_FLIGHT), half of them for one project; one past the cap is logged as failed withtoo many deliveries in flight, ready to replay. Only public https addresses are posted to, unless the owner lists a host and port inCURVA_ALLOW_PRIVATE_HOOKS. Tested against local receivers, not real chat channels. See Actions: what happens after a decision. -
Tools for agent frameworks. Python
curva.integrations.tools(questions, name=..., policy=...)returns plain typed functions (decide_<name>,check_action,screen_text) that a framework registers as tools with no adapter; each returns JSON text, and a Curva error comes back as text instead of raising.guarded(policy=..., approved=...)wraps your own tool so every call is checked against the policy first and runs only on “allow”; on “block” or “review” the agent gets one sentence instead of the result. TypeScripttools({...})gives{ name, description, parameters, execute }objects with a strict JSON Schema, andguarded(fn, options)the same wrapper. The TypeScript tools ran unchanged in the Vercel AI SDK, the OpenAI Agents SDK for TypeScript and Mastra against a stand-in server; the Python tools ran in five frameworks with a scripted model. See Agent frameworks. -
Emotion in calls:
ask="emotion". A built-in set for live calls and recordings:emotion(calm, happy, frustrated, angry, sad, scared, confused),intensity(none to strong),getting_angrier,stays_upsetandtone_differs, judged from the voice as well as the words. Two default actions:escalatewhen the caller stays upset,reassurewhen they sound clearly scared or sad. Accuracy on acted clips is low (see Known limits), so do not act on it alone. See Voice calls and theemotionrecipe. -
Docs: what you can build, models and versions, limits. What you can build runs through 40 real problems by input, each with a snippet and the latency measured on 24 and 26 October; Models and versions says which model each feature uses by default and how to pin it; Limits lists every hard input limit with its setting and error.
-
Calibration is kept per model. A calibrator is fitted only on labels of one model’s answers and applied only to that model’s answers; another model’s answers come back raw with
calibrated: false.GET /v1/calibrationtakesmodel(default: the model that answered the question last) and names it in the report;calibration(..., model=)in Python, the third argument in TypeScript. Older databases keep each calibrator whose labels all came from one model and drop a mixed one, which the next label refits per model. -
At most 64 live calls per API key.
CURVA_LIVE_CALLS_PER_KEYchanges it; one more gets anerrorevent (too_large, 413) naming the limit. A dropped call keeps its place for the 30 s it can be resumed. -
A changed default model is noticed. The server remembers its default model; when a start picks another one (a provider retired it), it logs both and says the old model’s calibration is not applied to the new one.
GET /v1/modelsreportsdefault_modelwithpreviousandchanged_at. -
Camera answers on a device.
curva pack --encoderwrites the image encoder file (153 MB, once per device) andcurva pack --stream S --questions Q.jsona stream’s trained yes/no heads (about 145 KB a question); thecurva-packC library answers a JPEG or RGB frame offline with the server’s own encoder and heads. On 1,650 held-out photos and 1,440 held-out driving-clip frames the device matched the server bit for bit (embeddings, probabilities, abstains); JPEG to answer took 20.7 ms median (61.2 ms p99) on 4 threads of an M1 laptop. Guide: Camera answers on a device. -
Curva Router:
POST /v1/chat/completionswith"model": "curva/router". Any OpenAI client (Python, TypeScript, LiteLLM, the Vercel AI SDK) points at Curva and each request goes to one of the operator’s models, chosen by Curva’s calibratedroutedecision and forwarded unchanged, streaming included. Unsure routing goes to the strongdefault; a conversation keeps its model (a salted hash, no message text kept) unless the router is sure it needs another; a provider that fails before the reply starts is replaced by the next best model once; a stream cut mid-answer ends with an error event; per-model reasoningeffort;x-curva-*headers, acurvaobject and an optional signed receipt say which model answered and why. Models come fromCURVA_ROUTERor the request’scurvaobject. Measured on 94 held-out prompts on Bedrock (ministral-3-8b small, gpt-oss-120b strong): 88.3% right at 90% of always-strong’s cost (94.7%); routing takes 172 ms p50 with a model call. See Curva Router. -
Curva Router learns from outcomes. Send
feedback(decision, "correct", true/false)on a routed answer. Once each model cheaper thandefaulthas 30 outcomes in a project, the cheapest model whose learned chance of being right meetstarget_accuracy(default 0.9) answers, with no model call to route (why: learned, under 2 ms). Replies now always carry a decision id and reportroute_cost_usd. On 94 held-out prompts it matched router v1’s accuracy (88.3%) at 54% of always-strong’s cost; always strong reached 94.7%. -
Long recordings in the library.
library.add("recording.mp4")takes mp4, webm or mov files up to 24 hours and 8 GiB. A free pass reads one frame a second through the change gate and keeps a key frame when the scene changes (at most one every 2 s, at least one a minute); only those are described, like photos.findreturns moments withat_ms,end_msand the object’s box,verifyandlookcheck the key frame’s pixels, andsourcesevidence carriesat_ms.estimategives a ceiling, and a job withmax_cost_usdstops before spending when the exact key frames would cost more. Measured on a synthetic 1-hour recording: 66 key frames, $0.028, added in 51 s, 4 of 4 events found at their first second. See Library: documents, photos and recordings. -
/v1/watchreads a camera by URL (pull mode)."source": "rtsp://..."(orrtsps,http,https) in thestartmessage, orwatch(url, pull=True)in Python ({ pull: true }in TypeScript): the server reads the camera with ffmpeg through the same gate and models. Only public addresses unless the owner setsCURVA_WATCH_ALLOW, checked for every connection ffmpeg opens (redirects and HLS segments included); RTSP over TCP with camera redirects refused; passwords and queries kept out of events, errors, logs and receipts; a dropped camera reopened up to 6 times, a dead one ended with one sentence; 8 cameras per key, 64 per server. -
/v1/watchcan answer familiar frames on the server (the fast path); it has not switched on for a real camera. With the local image model installed (curva vision-model fetch, once), each camera learns a head per yes/no question from the hosted model’s answers and, once its answers agree with the hosted model at least 95% of the time with calibrated probabilities, answers familiar frames itself. Such a frame is not sent to the hosted model unless it fired an action (sent to be confirmed or retracted) or is one of about one in 20 sampled as a check; a whole-scene change sends the camera back to shadowing. Heads are saved per project, stream and question, so a restarted server answers from the first frames.POST /v1/feedbackon a watch decision teaches the camera, and a person’s label outranks the hosted model’s. Local actions still pass the key’s rate and revocation checks. The receipt addsaudits,headsandlocal_latency_ms;/metricsaddscurva_watch_stream_headsandcurva_watch_stream_local_secondsper stream. Without the weights nothing changes and the server says so once at start. On 3 hours of a real fixed camera no head switched on, so the fast path has no current measurement. See Known limits and Watch live video. -
A local image–text model in our own Rust:
curva vision-model. CLIP ViT-B/32 (LAION-2B, MIT licence) in int8 with NEONsdotand AVX2 kernels, no new crates.fetchdownloads the pinned weights once into~/.curva/models, converts them to int8 (153 MB) and refuses any file whose SHA-256 differs;ask <picture> "<question>"answers zero-shot with a probability, a box and the time taken. Measured on an M1: 17–19 ms a frame at p50, vectors within 0.995 cosine of the float reference; zero-shot accuracy on the general set is far below the quality bar (precision 0.60, recall 0.61), so it is not used by/v1/watchyet. -
Signed receipts for live calls and
/v1/systemone. Every decision of a/v1/listencall that is written to the audit log (model answers, fallbacks, late answers) now carries areceiptin the/v1/decideformat, soverify_receiptandcurva receipt verifyprove offline which answers an action such asend_callfired on; the end-of-call receipt lists each decision’s id with its receipt./v1/systemoneresponses carry a receipt too. A fallback’s audit row now hashes the state of its own utterance (it took the previous one). See Signed receipts. -
Learned answers on a phone:
curva pack. Writes a project’s learned questions and the text embedder (8-bit, 8.1 MB) into one checked file; the newcurva-packC library (784 KB with the camera functions) answers from it with no network in about 5 µs a text, abstaining where the server would. On 1,552 held-out SMS texts it abstained or answered as the server did on all but one, which sat at the threshold. See Learned answers on a phone. -
Watch live video:
/v1/watch. A WebSocket takes JPEG, PNG or WebP frames (pushed by a camera app, a phone, a screen grabber or the SDK) and answers each one: a change gate (64×64 grey thumbnail, threshold that follows the scene’s own noise, one frame at least everymax_quiet_s) repeats the last answers for an unchanged frame ("tier": "gate"); a changed frame goes to the hosted vision model in the background ("tier": "model", signed receipt), at most one call per stream at a time, never queued: a newer frame replaces the one waiting. Triggers, webhooks,deadline_mswithfallback, per-key rate,statereadings for rules (a speed from telemetry), and theautoset when no questions are given. The action path has three tiers (gate,local,model); with a local model the server acts on its answer at once ("confirmed": false, sent before the decision is signed) and the hosted model confirms or retracts it later (speculative, default true). The local model itself is not in this release, so today every changed frame is judged by the hosted model. Frames are decoded on a fixed thread pool sized to the cores (full pool: the frame is dropped and counted); caps of 2 MiB a frame, 512 MiB of frames held across the server, 64 streams per key and 1,024 per server; graceful shutdown sends each stream its receipt; per-stream and total counters and a per-tier latency histogram on/metrics. Pythonfor event in curva.watch("clip.mp4"): print(event)(a file, a URL,0for the webcam, or your own frames;str(event)is a sentence) and TypeScriptfor await (const e of curva.watch(source)) console.log(String(e)). Thedrivingset (belt, phone in hand, eyes closed, no helmet) is experimental until it passes the quality bar. -
Confirmation over frames and speculative alerts on
/v1/watch. A trigger fires when it holds on k of the last n judged frames (confirm, default 2 of 3) or on one frame atmin_p_single(default 0.95); frames the gate drops are no new evidence, and a fired trigger fires again only after it held on none of the last n, so one bad frame raises no alarm and a lasting event raises one. With a local model,speculative(default true) fires on its first frame where the trigger holds ("confirmed": false); the hosted model’sconfirmedorretractedevent carries the action id andafter_ms, and goes to the trigger’s webhook as a second signed POST (idempotency key<action id>.confirmedor.retracted).speculative: falsewaits for k of n. The receipt countsfired,confirmed,retractedandmedian_check_ms;/metricshascurva_watch_checked_total{outcome}, per stream too, and thecurva_watch_check_secondshistogram.confirmandmin_p_singleare refused on/v1/listen. -
A faster change gate for JPEG. The gate’s 64×64 thumbnail comes from a luma-only decode (
zune-jpeg, already in the build throughimage, now used directly; no new crate) and our own area average, instead of a full colour decode and resize; PNG and WebP keep theimagepath. -
Video clips in a decision. A
videoasset on/v1/decide(mp4, webm or mov; up to 2 minutes; 16 MiB inline or 256 MiB throughfile, an id fromPOST /v1/files). Gemini models get the clip itself; every other model gets up to 16 frames labelled with their time (scene changes plus one at least every 2 s, via ffmpeg on the server), with the soundtrack for Gemini. Box answers on a video carryat_ms. With noquestionsoraskthe built-inautoset answershappening,attention,eventandwhere. PythonAsset.video(...)andcurva.decide(Asset.video("clip.mp4")); TypeScriptAsset.video(...). ffmpeg runs with a time limit,-protocol_whitelist file,pipe, no network and a temporary folder removed after the request; a missing ffmpeg is one sentence with the install command. Measured live on 94 clips made from labelled Wikimedia stills (driving and helmet questions): precision 100% on all three paths, recall 82% to 87% and p50 2.8 s to 3.7 s, so below our bar for recall and speed; the table is in the video guide. -
Signed decision receipts: every
/v1/decideresponse carries areceipt, an Ed25519 signature over the decision’s id, time, project, model, salted state hash, answers and probabilities, and its audit chain link. Anyone with the server’s public key (GET /v1/receipts/keys, open without an API key) can check it offline:curva receipt verify <file|-> --key <key>, Pythonverify_receipt(receipt, key)(standard library only) or TypeScriptverifyReceipt(receipt, key)(WebCrypto). The key is made on first start and kept encrypted withCURVA_MASTER_KEYwhen set;curva receipt rotatemakes a new one and old receipts still verify. Measured: 0.015 ms more per decision at p50 and 600 to 890 bytes more per response on live Bedrock decisions. A receipt (version 2) also signs themodeand, per answer,by: the model, the cache, a rule, a learned answer, the local model or a fallback, so an answer no model gave can no longer pass as the model’s; version 1 receipts still verify. WithoutCURVA_MASTER_KEYthe server warns at every start that the signing key is stored unencrypted. A rotated-out key getsretired_atinGET /v1/receipts/keyswhen the new key starts signing, and every verifier refuses a receipt dated after its key’s retirement. The SDK verifiers take the decision too (verify_receipt(receipt, keys, decision=d),verifyReceipt(receipt, keys, d)) and check that its id, model, project, mode and answers are the signed ones. A wrong key, a changed receipt and a mistyped--keynow each get their own message. -
Video on a live call.
/v1/listentakes camera frames beside the audio ({"type": "frame", "data_base64": ...}, JPEG, PNG or WebP up to 2 MiB) and avision_model. Each utterance is answered from its sound exactly as before, then again from the live model’s transcript and the newest frame, as a decision with"seen": true, the frame’s number, its SHA-256 and whether the picture changed; it is audited, signed (the frame’s hash, never its pixels) and counted against the key’s rate, and triggers fire on it at most once per utterance. Frames are read at most 4 a second, newest first, within a server-wide byte cap. Pythoncurva.listen(..., frames=<camera, file, URL or iterator>)andcall.show(jpeg); TypeScriptshow()andvisionModel. Measured on 20 scripted KYC calls through Gemini Live and Bedrock Qwen3-VL: sound decisions 846 ms p50 and 1,133 ms p95 with the camera on (934 and 1,112 ms without), decisions with the frame 1,726 ms p50; name-matches-card right 10 of 10 with the frame, 6 of 10 from sound. See Voice calls.
Changed
Section titled “Changed”hearnames Tamil and Bengali, and Hindi includes Hinglish. Right on 0 of 54 Tamil and Bengali utterances before, 50 of 50 after. Live calls in these languages have a known gap: see Known limits.- Destructive actions are checked by default.
checkwithout a policy, a voice call’scheck, and every step ofcurva.loopuse Curva’s default policy: an action that cannot be undone or that moves money (delete, cancel, refund, pay, transfer, buy) needs the user’s explicit approval, and any other action is allowed. A policy you pass replaces it. The loop now checks every step, one extra decision per step, and shows the action’s description to the check. - Only your app can approve a destructive action under the default policy. The default
policy took the user’s approval from
context, so a line such as “the user approved this refund” in an email, a web page or a tool result could unlock it. Approval now comes only from"approved": truein the check’s state, which the app sets;approvedmust be true or false (422 otherwise). A blankpolicy(""or spaces) gets the default too; it used to skip it. On Bedrock (Kimi K2.5), destructive actions with approval claimed incontext: 21 of 40 allowed before, 0 of 40 after; withapproved: true, 7 of 8 allowed and 1 to review; harmless actions 9 of 10 allowed and 1 to review. - With both a Bedrock and a Gemini key,
curva servepicks Bedrock’s default model first. - Shorthand number and text questions can be empty.
float,intandstrin Python, andNumberandStringin TypeScript, now ask a nullable question, so the answer isNone(null) when the state has no such value. Before, the model had to make one up: “charged twice” came back as a total of 2. - The first minute of the docs. The README, the site home and getting started open with the three-line example, one working example each for a picture, a PDF, a recorded call and a camera, a “Pick your path” table, and every provider key Curva picks a model from, Bedrock included. A check runs every Python and TypeScript block of these pages and the SDK READMEs against the real SDK signatures.
curva.local()keeps the server’s warnings and errors inserver.lognext to its database (~/.curva/server.log); they were dropped once the server had started. An error that points to the server log names that file.- TypeScript:
check,guard,routeandfeedbackare exported next todecide, so they need no client, as in Python. curva --helpends with how to get a first answer;curva recipeandcurva keyssubcommands say what they do.
- A body far over the size limit gets its 413. At 22 MiB or more the server answered 413 and
closed the connection while the client was still sending, so the client saw a reset and the SDKs
said “cannot reach” the server. A body whose
Content-Lengthis over the limit is now read and dropped, at most 64 MiB past the limit and for at most 10 s, then answered with the 413 sentence; past those bounds, or withExpect: 100-continue, it is answered at once without reading. Both SDKs now report a reset during an upload over 16 MiB as the sametoo_largeerror (status 413) without sending it again. Measured on a local server with Python’s urllib: 17, 22, 40 and 70 MiB all got the 413; 81 and 120 MiB got the SDKs’too_large. - A live call sent faster than real time is heard. The answer deadline (10 s, or
deadline_ms) ran from the moment an utterance was detected, so audio pushed ahead of real time was timed out before the model could have heard it: a 26 s recording sent at once got 0 utterances withask="scam"and withask="emotion", and the 13 semotionrecording only sometimes made it (answers came 6.8 to 8.9 s later). The deadline now starts when the utterance would have ended in real time, at most 32 s ahead (the most audio a call may queue); audio sent in real time keeps the same deadline. Both 26 s recordings are now answered (11.6 s and 13.9 s). - A rule’s certain answer survives a model that fails or is late. A request that mixed a rule
question with a model question failed as a whole (502, or 504 past
deadline_ms), and the SDK’sfallbackthen replaced the rule’s answer too: a fallback of eligible made a 45-year-old eligible. The error body now carriesanswerswith what needed no model (rule answers and skipped questions), and both SDKs keep those under afallback, so only the model questions fall back. Without a fallback the error is raised as before, with the sameanswerson it. The status codes and theerrorobject are unchanged. - A Score asked through
askhas its level. With an ask file or a built-in set such asemotion,.levelwas None in Python andvaluesheld the number in TypeScript. Every Score answer now carries itslevels, so both SDKs name the level whichever way it was asked. guarded(approved=...)works under a written policy. The app’sapproved: truereached the check but the model was never told what it meant, so a $5,000 transfer the customer approved in the app was still blocked. With a written policy andapprovedsent, the policy now says thatapproved: trueis the user’s own approval in the app, which never stands in for a manager or compliance. Measured live: the approved transfer is allowed (0.90); the same approval under “Refunds above $200 need a manager’s approval” is not (review, 0.51 allow), and without approval it is blocked (0.998).guarded()no longer waits 60 s on a model that never answers. Its check has a 10 s deadline by default, as MCPcheckandguarddo (deadline_msin Python,deadlineMsin TypeScript); a missed deadline does not run the tool and tells the agent a person will review it.- A camera head no longer switches on from near copies of a few scenes. A frame almost the same as one the head already learned with the same answer still trains it but no longer counts as new evidence for switching on. On held-out driving clips the helmet head had been answering alone and was right on 92 of 190; it now stays shadowing.
- Every camera learns on a busy server. Frames judged for a learning camera wait their turn for the image encoder instead of being dropped (at 25 cameras, 3 had never learned).
- Live calls kept every answer across a slow or replaced Gemini Live session. A late answer did not count as a sign of life, so a session that was slow but answering was replaced, its unanswered audio was dropped, and an utterance that missed its deadline while queued never got its late answer. Now any answer resets the count, a replaced session’s unanswered audio is heard by the new one, and every missed utterance gets its late answer. A 642 s live call: 138 of 138 utterances decided (before: the call closed after about 94, with 86 decisions).
- A live model that cannot be reached is named as such. Connect or setup timeouts at the start
of a call ended it after about 30 s with “the live model is not keeping up”; now the error is
model_unavailable, with the number of tries, how long they took and why the last one failed. Audio sent faster than real time is told to slow down instead. - TypeScript
guardfailed open. When Curva was unsure of the verdict (abstain),values.verdictandanswers.verdict.choicekept the model’s pick, such as “allow”; they are now “review”, as in Python. - Clearer first-use errors: no model key (“Curva needs one model key: export it or put it in a .env
file here, …”), questions passed as a list or a string instead of a dict (a
ValueErrorwith the right shape, was anAttributeError), and no server running (both SDKs now ask whethercurva serveis running there). - Docs: getting started printed
curva 0.1.0forcurva --version; the TypeScript README gave the timeout default as 30000 ms (it is 130000); the site home had two identical “Get started” buttons. - TypeScript
Asset.image("parcel.jpg")reads the file, as Python does. A local path was sent as a URL and refused; on Node, Deno and Bun the SDK now reads it (images, audio and video). The TypeScriptVERSIONsaid 0.1.0; it is the package’s 0.3.0. - Short-form questions over HTTP say how to write them in full.
"team": ["billing", "technical"]sent with curl got “unknown variantbilling”;/v1/decideand/v1/listennow answer with the same question in the full format, ready to paste. - Audio sent to a model that can’t hear says so. It got “no model could answer”; it now says
the model can’t hear audio and names
@gemini/gemini-3.1-flash-lite, which can. - A statement used as a yes/no question says to add “?”.
{"refund": "The customer wants a refund"}now raises “end … with “?” to ask it as yes or no, or write Noul(…)” (noul(...)in TypeScript), instead of listing every short form. - Docs: every Python and TypeScript block in the guides runs or type-checks as written
(a check that now also fails a block that uses
curvaor an SDK class without importing it). Fixed: a question without “?” in the library guide,curva = Curva()shadowing the module in the images guide, signature lists and shorthand placeholders in the TypeScript guide, a TypeScript voice block with undefined questions, and missing imports in seven guides and two concept pages. curva mapandcurva shadowresume cleanly after Ctrl-C. A record was written in many small pieces, so Ctrl-C often left half a line (7 of 25 interrupts in a test); the rerun then counted it as done and glued the next record onto it, losing two states and leaving a line that is not JSON. Each record now goes out in one write, and a rerun drops a cut-off last line and answers that state again.- Password-locked PDFs fail with a reason. A PDF that needs a password to open was marked
donewith 0 pages, so it looked read but nothing in it could be found. It is nowfailedwith “the PDF is locked with a password; save a copy without the password and add that”. PDFs with only an owner password still read. - A file added again right after its job was cancelled is read. While the cancelled job was
still stopping, adding the same file gave a
donejob with nothing to do and the file stayed unread. It is now queued again. - A refused provider key says so. When the model provider answers 401,
/v1/decidenow says “the model provider refused the API key (HTTP 401); check the provider key this server or project uses” instead of “no model could answer”. Still 502model_error. curva keys create --rpm 0is refused. It made a key that allowed one request and then answered 429 forever; the limit is now at least 1.- Feedback on a multi question says it is not supported. It got “label is not an answer” whatever the label was; it now says a multi takes no feedback yet and how to label options. The docs said feedback labels a multi as a whole; they now match.
ask: "check"needs an action. A state with noaction(a typo such asactoin,null, or a plain string) was judged anyway, with nothing to judge; it now gets 422 before any model call.AsyncCurva.check(action)works without a policy, likeCurva.check; it raised aTypeError.curva mcpnames an unknown tool plainly: “unknown toolsearch”, notSome("search").check(..., approved=True)in both SDKs. The app’s approval reaches the default policy as a typed field (approvedin Python,{ approved: true }in TypeScript); text incontextnever counts as approval.curva.check(action)works without a policy. The module-level shortcut required one and raised aTypeError; it now applies the default policy, asCurva().check(action)already did.- Uploads at once stay within the library limit.
POST /v1/filesnow counts the bytes of a project’s uploads still arriving against its--library-mblimit, so temporary files stay within it: four 6 MB uploads at once to an 8 MB project held about 24 MB on disk before and at most 6.7 MB now. An upload refused at the end because others finished first now gets 413too_largewith the limit in the message, not 500internal. Uploads that together pass the limit while arriving can all be refused; send large files one at a time. - One action per trigger per utterance on live calls. A trigger with
repeatandon_fallbackfired twice for one utterance, on the fallback and again on the late answer, under two action ids. The late answer no longer fires a trigger that utterance’s fallback already fired, so a webhook receiver gets one idempotency key. - Utterances over the key’s rate are not stored. They still get the fallback decision event,
now marked
"rate_limited": true, but write no decision row: 9 over-rate utterances stored 9 rows before and 0 now. The receipt counts them inrate_limited. - A still event on
/v1/watchfires. A scene that changed once and then held was judged once, so a 2-of-3 trigger waited formax_quiet_s(10 s) and a 3 s phone scene fired nothing. While a trigger that held needs more frames, the next frame is judged even if unchanged, up to k - 1 times; a flicker still fires nothing. - A
/v1/listenclient that stops reading no longer holds its call. A send that takes over 30 s lets the socket go as if the connection dropped: the call can be resumed for 30 s, then it ends. Closing the socket waits at most 30 s too, as on/v1/watch. - A model that no provider serves is refused at
/v1/watchstart. Before, the stream opened and every changed frame got the provider error. - Live frames over 16 million pixels are refused from their header. A 40-megapixel frame was decoded in full (8.3 s and 273 MB in a debug build); now it gets an error and the stream goes on.
deadline_mscovers preparing the assets. Downloads, ffprobe, scaling pictures and the library search now count against the deadline on/v1/decide, and decoding a frame does on/v1/watch: a 25-megapixel photo with a 300 ms deadline got a normal 200 after 5.5 s (debug build), and now gets 504deadlinein time.- Python
curva.watchsays when it reopened a dropped stream. It yields aconnection_errorevent: frame numbers start again at 1 and the final receipt counts only the frames sent after it.
Security
Section titled “Security”- Each project runs at most 2 ffmpeg at once and one request at most 90 s of ffmpeg, so one key can no longer hold every video decoder; ffmpeg runs with one filter thread. Video temp folders are created 0700. Video errors no longer name the file’s path on the server.
/v1/watchhardening (security audit of 2026-10-23). Astartmessage over 64 KiB and other text over 32 KiB are refused before parsing (20 keyless 4 MB starts had taken the server from 20 to 569 MiB); idle sockets without a key no longer lock out a start that brings one. One API key gets at most half of the frame-decoding pool and 128 MiB of held frames, and live frames are capped at 9 million pixels (DCI 4K) from their header, so one key’s flood of big frames no longer drops another key’s frames.ask: "check"keeps its default policy on every frame. The local model tier counts actions against the key’s rate and notices a revoked key within a second. Both SDKs checkfpsand give their own ffmpeg a protocol whitelist for its source, and keep a camera’s password out of their errors.- PDF decompression bombs are bounded. Opening a PDF (
POST /v1/collections/{name}/estimateand library ingest) now caps the total bytes decompressed and parsed across all object and cross-reference streams while loading one file, not per stream, and caps a page’s decoded content and operation count when its text is read. A small file with many compressed streams can no longer drive memory without limit; it is rejected with “the PDF expands to more than 128 MB when opened”. Only one PDF is opened at a time server-wide, so several crafted files in parallel cannot stack. Measured: a 490 KB, 8-object-stream file took oneestimaterequest from ~17 MB to ~550 MB before and ~190 MB after, and no longer grows with the stream count; the 2,131-page test PDF still reads. The total-decompression budget is a minimal change to a vendored copy of lopdf 0.45.0 (vendor/lopdf, upstream unchanged otherwise). - Security audit of 2026-10-27.
/v1/listenrefuses astartover 64 KiB and other text over 32 KiB before parsing it. The server holds at most 1,024 live calls (CURVA_LIVE_CALLS), and one key holds at most a quarter of the frame budget and a quarter of the waiting audio.- A key revoked mid-call ends the call at its next question or reconnect, and ends a
/v1/watchstream on its next frame, even an unchanged one. - The saved-camera-head cap counts per project, so one project no longer deletes another’s.
curva servereads.envonly from the folder it runs in, and skips one that another user owns or can write to, with a warning. It no longer looks in parent folders. The Pythoncurva.local()does the same.- A PDF whose cross-reference entries repeat one object, or whose objects overlap, is loaded once or refused. Every operand on a page counts against its 16 MiB page budget.
- Every value, dictionary entry and name or string byte parsed while a PDF opens counts against a 128 MiB budget, so one huge array or dictionary is refused instead of taking about 60 times its file size in memory. A 5 MB one-array PDF peaked at 309 MiB and now stops at 137 MiB.
- An
alert: whenline in an ask file parses in linear time. A 32 KB line had taken minutes. - A video with a small first stream and a huge second one is refused, and ffmpeg itself refuses to decode a picture over 40 million pixels.
- VAPT of 2026-10-29.
- The database and its
-waland-shmsidecars are created0600. They had followed the usual umask (0644), so another user on the same host could read the API-key hashes, the audit salt, and the receipt signing key, which is stored unencrypted whenCURVA_MASTER_KEYis unset and signs receipts that verify. The server already warned that anyone with a copy of the database could forge receipts; now the file is not world-readable in the first place. - Updated
rustls-webpkito 0.103.16 andwebpki-root-certsto 1.0.10 (RUSTSEC-2026-0382 and RUSTSEC-2026-0383: an outbound TLS connection could accept a distrusted intermediate), andtokioto 1.54.1 (RUSTSEC-2026-0386).cargo auditis clean.
- The database and its
[0.3.0] - 2026-10-20
Section titled “[0.3.0] - 2026-10-20”- Pictures and recordings as assets:
"assets"on a decision names images and audio ({"photo": {"type": "image", "format": "jpeg", "data_base64": "..."}}), sent inline, byurlor asmultipart/form-dataparts. Each asset must be named in the state or a question. Photos are turned upright from their EXIF orientation, stripped of EXIF and scaled down before they are sent; audio can be wav, mp3, rawpcm16or telephonemulaw. Audio URLs are fetched only from public https hosts. PythonAsset.image(...)/Asset.audio(...), TypeScript the same. - Box questions:
{"type": "box"}answers where something is in a picture, astop,left,bottomandrightfrom 0 to 1, withfound(the probability that it is there at all) and up to 20boxes. A box counts as right in feedback when it overlaps the true one by half or more. - The library: add PDFs and text files to a collection (
client.library("contracts").add(...)in Python and TypeScript, orPOST /v1/filesand/v1/collections/{name}/items), read in the background by resumable jobs, and search them withfindin milliseconds, at no model cost: each hit has its file, page and snippet. Text is embedded on your machine by a small model downloaded once on first use. - Live listening:
GET /v1/listentakes a call’s audio as it happens (16 kHz pcm16 or phonemulaw) and answers your questions after each turn of the caller, from the sound itself. Thescamandhearquestion sets are built in.triggersfire actions on calibrated answers (warn_user,end_call, your own), optionally as signed webhooks. A turn that misses itsdeadline_msgets yourfallback, andstopreturns a receipt of the call. Pythoncurva.listen(ask="scam", on={...})andvoice.attach(...), TypeScriptlisten. Feedback can label a whole call by its id. - Typed answers over a library:
"sources": {"collection": ...}on a decision finds the passages, and every answer carriesevidencewith the file, page and snippet it rests on. Cited passages are checked against what was sent, and an answer with no evidence abstains. - Photo collections: add pictures to a library; each is described once and found by meaning
in milliseconds, with the box of the object you asked for.
verifychecks the top hits on the real pixels and orders them by probability. - Compatible clients switch unchanged: zstd and gzip request bodies, and asset references such
as
<image:...>, are accepted on/v1/systemone. - MCP
findtool: agents search a library collection from any MCP client. - Known limits page in the docs.
- Promised accuracy for yes/no questions:
target_accuracyon anoulquestion; the answer then hasabstainandpromise. A promise is also dropped when the newest labels show it is no longer kept. - Built-in question sets:
"ask"on a decision names a question set that lives in the server (check,guard,spoken,signals,next), in place ofquestions. The Python SDK’scheck, voice guard and loop use it, so their wording is no longer in the SDK. - TypeScript:
curva.check(action, policy),curva.guard(text), and on aVoiceCallcheck,guardandsignals. - Learn by example:
learn=True("learn": true) keeps a decision’s state; once it has feedback it is shown to the model as an example for the same question. Up to four per question, corrections first. Off by default;curva lessons forgetdeletes the kept states. - Autopilot model choice:
auto=[...]("model": {"auto": [...]}). You list the models; Curva asks the one that has been answering fastest first and brings in the next after one and a half times its usual time. It orders by speed only. - Voice calls:
curva.voice.Call(Python) andVoiceCall(TypeScript) keep the last turns of a live conversation and answer questions about it within a time limit, returning your fallback when no model answers in time. In Python,call.check(action)also says whether a policy allows what the voice agent wants to do, andcall.guard()screens the last thing said for injection attempts, spoken secrets and threats with one short question. unstableanswers: when a question asked in both option orders gets two different top answers, the answer carriesunstable: trueand abstains if the question setmin_confidenceortarget_accuracy.wall_ms: the whole time a decision took, waiting and retries included, on the decide response, in the audit log and inGET /v1/summary. The dashboard’s speed now shows it.- Cost from your own prices:
curva serve --prices <file>(orCURVA_PRICES) prices each model per million input and output tokens, for providers that do not report a cost. - Action check context:
curva.check(action, policy, context=...)and the MCPchecktool judge only the action and use the context as background. - Brief replies:
brief=True("brief": true) asks the model to list only the likely answers. The reply is shorter and the decision faster; voice calls use it by default. - Promised accuracy:
target_accuracyon a question (for example 0.99). Curva learns from your feedback how sure it must be to keep that accuracy and marks every other answerabstain; until it has the evidence, every answer is unsure.GET /v1/calibration?target=and the dashboard’s Calibration view report it. - Loop:
curva.loop(goal, [your functions], state)(Python) runs a task in steps. Every step is a typed decision among your functions; it stops when unsure, on a failure or at a step limit. - Nodes:
curva.Node(name, questions)andnode=on a decision name the place in your app that asks. The dashboard has a By node table,GET /v1/summaryhasby_node, andGET /v1/audit?node=lists one node’s decisions. - Voice calls, more (Python):
call.watch()andcall.pulse()follow a risk through the call and alert after two high readings in a row;call.clarify()names the two likeliest answers to ask the caller about;call.receipt()lists everything decided in the call. - More for voice calls (Python):
call.expect()andcall.hearing()decide ahead on partial words, so the answer is ready when the caller stops;call.unsure(decision)names what to ask the caller about;call.signals()answers hand over, end of call, voicemail, consent and identity (the newvoice-callrecipe);heard(..., confidence=)andcall.repeatkeep unclear words from allowing anything;second_opinion=re-checks with a stronger model afterwards;call.outcome()labels a call’s decisions with what really happened;call.warm()readies the model before the first decision. - Hedge plan:
hedge=[fast, backup]("model": {"hedge": [...], "after_ms": 150}) asks the backup model only when the first is late. - Call id:
callonPOST /v1/decide,GET /v1/audit?call=, and a Call button on the dashboard that lists one call’s decisions together. - In-time report:
GET /v1/summarycounts decisions that met (timed) and missed (late) their deadline; the dashboard shows the share answered in time. - Tamper-evident audit log: every audit entry is chained to the one before;
curva audit verify [--head <hash>]finds a changed or removed decision. deadline_msonPOST /v1/decideand in both SDKs (deadline_ms=,deadlineMs): answer within this many milliseconds or fail with504 deadline; nothing is stored for a decision that misses it.- Learned answers:
"learned": true(orcurva serve --learned) lets Curva train a small model of its own for a question once it has 200 labels. It answers beside your model for 30 decisions, then answers alone only when its held-out accuracy is at least the model’s; those answers carryanswered_by: "learned", take about 10 µs and cost nothing. - AWS Bedrock preset:
AWS_BEARER_TOKEN_BEDROCKalone is enough; models are named@bedrock/<id>and the region defaults to Mumbai. - Ready-made call sets:
askon/v1/listentakessupport,sales,booking,consent,verify,healthandcollections, each with its own questions and actions. Calls may be 8 to 48 kHz, mono or stereo, and keypad tones are ignored. - Warm connections:
curva serveopens a connection to each provider it has a key for when it starts and keeps idle ones alive.
Security
Section titled “Security”- Release builds are stripped of symbols by default, and the public docs no longer name internal source files.
- A failed model call never shows the provider’s words. A model list that mixed an unknown provider with a failing model, or a model id that contained Curva’s own error wording, returned the provider’s error text to the caller. Only Curva’s own message is returned now; the provider’s words stay in the server log.
- A server without API keys is closed to web pages. It refuses writes that come from a page on
another site, and when it listens on localhost it answers only under a localhost name, so a page
in your browser can neither spend your model quota nor read your decisions.
--no-authkeeps a server on a trusted private network reachable under its own name. - Action check: what the party asking for the action says, including a claim that it was
approved, never meets a condition of the policy.
check(..., requester=...)names that party. - A model id is at most 200 bytes with no control characters, and a feedback
decision_idmust look like one; neither can forge a log line any more. A provider reply larger than 8 MB is refused. Withprivacy: "strict", a model reply that cannot be read is no longer written to the server log. GET /metricsanswers 403 to an API key that is limited to one project.- Audit check: a decision answered by rules alone, which costs nothing, broke
curva audit verifyfor every decision after it. It verifies now, and so do rows already written. Theheadalso covers how many older decisions came before the chain, so a decision forged in front of it no longer passes a head you kept. - Logprobs: when the model writes anything but an answer letter, the answers after it are no longer read from the wrong position: those questions are asked again or come back unsure. An answer with almost no probability on its options comes back unsure instead of confident.
- A model reply that cannot be read no longer decides which error the caller gets (a reply could make a decision look rate-limited). The reply goes to the server log, not into the error.
- With
--no-auth, a browser reaches the server only by IP address or as localhost. - Releases: nothing is built or published from a commit whose tests fail, and the npm token is present only while npm itself runs.
- Release binaries: linked as one unit and stripped, they name no build-machine path, and the
prompts and built-in question sets are stored encoded, so
stringsshows none of them. The release build fails if either shows up. - Uploads and the library: uploads keep to the project’s quota when several run at once; an upload whose file part never comes is refused after 4 MiB; a crash leaves no half-written file; a file the library reads for over 10 minutes is stopped and marked failed; a picture’s decoder may allocate no more than the pixel cap allows; each evidence passage is one line, so text read from a picture cannot pose as a document that was sent.
- Live calls: a frame is capped like a message, opening a call counts against the key’s rate, a key revoked during a call ends it, and only audio keeps a call from going idle.
curva audit verifyhashes actions as they are stored, so actions rewritten as text or under a repeated key no longer pass.- rustls 0.23.46 and yoke-derive 0.8.4:
cargo auditreports no advisories.
- Rate limits: after a provider reports how many requests it has left, Curva counts them down
itself, so a burst no longer overshoots; a
Retry-Aftergiven to one caller holds the others on that key and model too; a call refused for a spent limit no longer uses upCURVA_DAILY_LIMIT. - Cascade: an answer that changed when the options were asked in the other order goes to the next
model even when its confidence was above
escalate_below. - Python:
Decision.wall_ms(TypeScript:wallMs);call.check(..., context=...)on a voice call no longer raises. - Any language: a yes/no shorthand question may end in
?,؟or፧; project names may be 64 characters in any script (the limit counted bytes); a voice decision made ahead is no longer reused for words that differ only in a vowel sign or accent; a long spoken turn is never cut inside a character (TypeScript); the dashboard shows right-to-left answers correctly. The docs have a new “Any language” guide with what was tested and the limits. - Live calls: when the Live session drops mid-call, that utterance gets the fallback and the next
opens a new session; a first session closed with error 1011 or 1013 is opened again; an answer
that comes after its fallback still fires its actions, marked
late; a calm call no longer gets a warning at its end, and a fallback never fireswarn_user. - One picture that cannot be read fails alone instead of failing its whole job.
- Auto mode asks a model in words when its logprobs carry no label, as models that reason first do.
Changed
Section titled “Changed”- The provider rate limit follows the limits the provider reports (
x-ratelimit-*headers): calls are no longer held to 60 a minute when the provider has room. A limit you set is kept as a cap. Retries and limit waits are logged. - The action check’s question is reworded, so earlier feedback on
checkstarts afresh. - The dashboard is redesigned again: the Curva mark, a light and a dark theme, periods from a week to 5 years, line charts you can read with the pointer or the arrow keys, cost per decision, and new decisions showing up on their own within a few seconds, without a reload. It asks for an API key only when the server requires one, switches projects from a menu, and words every row plainly (“Team: billing, 95% sure”, “Today, 12:57 AM”).
GET /v1/summarytakesdaysup to 1825 (was 365) and counts whole UTC days, today included, so its totals match its per-day rows.- With only a Bedrock key, the default model is
moonshotai.kimi-k2.5, thenmistral.ministral-3-8b-instruct. guard’s allow option says what an ordinary text is, so blunt but harmless texts are no longer held for review.- Pictures are prepared a few at a time, half as many as the cores, base64 decodes about ten times faster, and library searches read vectors through a memory map.
[0.2.0] - 2026-10-05
Section titled “[0.2.0] - 2026-10-05”- Model router:
route(prompt, models)in the Python and TypeScript SDKs picks which of your models should answer a prompt, with a confidence, adefaultfor unsure cases and feedback. - Agent action check:
check(action, policy)in the Python SDK says whether a policy allows an action before an agent carries it out: “allow”, “block”, or “review” when unsure. - Guardrails:
guard(text)in the Python SDK and theguardrailsrecipe screen a text for prompt injection, personal or secret data and toxicity, with an allow / review / block verdict. - Fallback answers:
decide(..., fallback={...})in the Python and TypeScript SDKs returns your safe answers, markedfallback, instead of raising when no model can answer. - MCP tools for agents:
curva mcpnow gives an agent six tools instead of one:decide(which also takes arecipename and every decide option),route,check,guard,feedbackandrecipes.checkandguardanswerreview, androuteitsdefault, when no model can answer, so a failure never lets an action through. curva mcpwith no setup: without--urlit uses the server on127.0.0.1:7777if one runs, else starts its own and stops it on exit.curva dashboard: opens the dashboard in a browser on any port and shows what the SDKs ran on this machine, with no model key needed just to look.GET /v1/summary: a project’s decisions, spend and speed over the last days, in total, per day and per model.
Changed
Section titled “Changed”- The dashboard is redesigned: read-only, in the Curva look, with decisions, spend and speed for the last 7 days, month or 3 months, three small charts, a per-model table and the latest decisions. Links can open a project, period and tab.
- The docs say that one provider key in a
.envfile is enough. curva mcpanswers calls concurrently, asks a busy server (429, 503) again, returns results asstructuredContentas well as text, sends the client instructions on when to use each tool, and reports Curva’s own error message instead of the raw response.
[0.1.0] - 2026-09-30
Section titled “[0.1.0] - 2026-09-30”First public release: the curva binary (CLI + HTTP server), the curva-ai Python and
TypeScript SDKs and the n8n-nodes-curva n8n node, all free to use under the Curva Free License.
- Core engine: Choice, Score and Noul questions answered through any OpenAI-compatible
model, read from logprobs or from a constrained JSON reply (
mode: auto | logprobs | verbal), with a label-mass guard, a rate limiter, retries and cost tracking.curva spikeandcurva benchmeasure accuracy, ECE and cost on the eval sets. - Server and Python SDK:
curva servewithPOST /v1/decideandGET /health, clear JSON errors, and an LRU decision cache (repeats in 0 ms at $0). Stdlib-onlycurva-aiSDK with retries andsystem_one/criteria=aliases. - Reliability: order debiasing (on by default), a
none_of_theseescape option,min_confidenceabstain, model fallback chains, a daily budget (CURVA_DAILY_LIMIT) and injection hardening. - Calibration: temperature and Platt scaling per question and per
project, fromPOST /v1/feedback, plus bias scaling (a per-answer offset that fixes a model favouring one answer) for Choice and Score; from 30 labels a calibrator is applied only when it clearly beats the raw probabilities on held-out folds in both log-loss and Brier score, moving cautiously with few labels.GET /v1/calibrationreports held-out before/after numbers. SQLite store (--db),curva bench --saveandcurva report. - Power features:
Multiquestions, Council (blended models withagreement), Cascade (escalate only unsure answers), Race, few-shotexamples,explain: trueattribution, andcurva mapfor large, resumable JSONL jobs. - Production: API keys (
curva keys, stored hashed) with per-key rate limits andRetry-Afteron every 429; the server refuses public addresses without keys. Per-project provider keys encrypted withCURVA_MASTER_KEY, an audit log (GET /v1/audit, state hashed, never stored), pinned configs (curva-1.0.0,curva-1.1.0),privacy: "strict", Prometheus/metrics, graceful shutdown, and a distrolessDockerfile. - Any model, any provider:
@<provider>/<model>ids for OpenAI, Anthropic, Gemini, Groq, Mistral, DeepSeek, Together, Fireworks, xAI and OpenRouter (on when their usual API key is set), local Ollama, LM Studio, vLLM and llama.cpp, and any OpenAI-compatible endpoint (CURVA_PROVIDER_<NAME>_URL). OpenRouter is optional. - Own fast model:
curva exportturns decisions and feedback into fine-tuning data in Curva’s own prompt format; a guide covers fine-tuning and serving a small model. - Cache-friendly prompts: pinned config
curva-1.2.0puts the questions before the state, so provider prompt caches and local prefix caches reuse the repeating part. - Pro features: conditional questions (
whenwith the rule operators; skipped answers cost nothing), a drift monitor (GET /v1/drift), shadow mode (curva shadow), Curva Tune (curva tune), seven recipe packs (curva recipe: support triage, content moderation, lead qualification, phishing check, LLM output QA, RAG check, RAG rerank), and an MCP server (curva mcp) for AI agents. - SDKs: a TypeScript/JavaScript SDK (
curva-aion npm), and in Python an async client (AsyncCurva,decide_many), typed error classes, request ids and level names. - Operations: structured request logs (
CURVA_LOG=json,CURVA_LOG_LEVEL) with anx-request-idon every response. - Docs: a documentation website (MkDocs), a public benchmark page, and a contributor CLA.
- Packaging:
pip install curva-aiships thecurvabinary inside platform wheels, andcurva.local()starts it on a free localhost port and stops it at exit. - Scale and speed: Choice takes up to 255 options (over 20, answered in verbal mode with the
top 5 labels),
racereturns the first valid answer of several models, and a compatiblePOST /v1/systemoneroute withcriteriarequests, plusGET /v1/models. - Workflows in one call:
depends_onon any question runs a request as a graph, stage by stage (one model call per stage, at most 8), each dependent question seeing its dependencies’ answers;@keyfields inwhenand rules branch on earlier answers. Per-questionthink: truereasons in its own concurrent call. Answers getstage. Python.depends()/think=, TypeScriptdependsOn()/think. - Rules: answer a question from the state without a model call (
rules: [{"if": ..., "answer": ...}]), withcontains,starts_with,gt,gte,lt,lteandexists. - Extraction:
text,numberandintegerquestions return a typed value with a confidence. - Images:
imageson a request sends https ordata:images to vision models. - Guaranteed accuracy:
coveragereturns a conformal prediction set that holds the true answer with the chosen probability, once a question has 30 labels. debias: "auto": stops asking the reversed order once a model shows no position bias.- Dashboard and OpenAPI:
GET /dashboardandGET /openapi.json. - n8n node (
integrations/n8n-nodes-curva) and the TypeScript SDK. - RAG recipes:
rag-check(needs retrieval, answerable, grounded, next step) andrag-rerank(passage relevance as a reranking score). - Z.ai (GLM) and Alibaba (Qwen) presets:
ZAI_API_KEY,DASHSCOPE_API_KEY. CURVA_PROVIDER_<NAME>_PRICE: input and output price per million tokens for providers that don’t report cost (fine-tuned or self-hosted models).- Zero-setup server:
curva servewithout--modelpicks a working default from whichever provider key is set, like the Python client. - Costs:
cost_usdfrom the provider’s report, OpenAI and Anthropic list prices, orCURVA_PROVIDER_<NAME>_PRICE. - Batch parity:
curva map,shadow,benchandtunerun questions exactly like the API (stages,when, rules,think);bench --per-setandtunetake label-balanced samples. - Hardening (pre-release audit): at most 64 model calls per request, 60 s provider timeouts,
a 120 s request deadline and a 30 s shutdown grace, a hashed decision-cache key scoped to project,
privacy and provider key, provider errors kept in the server log (never sent to callers), JSON 413s,
a total size limit on question text, reserved control characters in question keys, a
case-insensitive prompt fence, a salted audit hash, SQLite
busy_timeout, and--lockedDocker builds. The server’s provider endpoint variable isCURVA_PROVIDER_URL(the SDK keepsCURVA_BASE_URLfor the Curva server).

