Concepts AI calls, scores and judges
AI calls, scores and judges
Every call your app makes to a model, with its tokens and cost, scored by judges you write.
What is recorded
With the Node.js SDK, calls to api.anthropic.com and api.openai.com made through fetch (both official SDKs use it) are recorded with no code change, plain and streamed: model, input and output tokens (cached tokens apart), status, time, and the route and request that made them. The response is read from a copy, so your app’s own reading is untouched.
Cost comes from each model’s price. A model Superflows has no price for shows “no price”; it is never guessed. AI calls are kept 30 days. Turn recording off with SUPERFLOWS_LLM=0.
Prompts and answers
Only usage is sent by default. SUPERFLOWS_LLM_CONTENT=1 (or init({ llmContent: true })) also sends the prompt and the answer as text, up to 32 KB each. Secrets, tokens, card numbers and emails are removed at the ingest gate before anything is stored.
Other providers
For any other model call, record it yourself. It returns the call’s id, which scores can point at.
The Go SDK has RecordLLM. Automatic capture in the Python SDK is not built yet.
Scores
A score is a number, pass/fail, a label or a note on one call. It comes from a judge, from someone on your team in the dashboard, or from your app’s users through POST /v1/scores with the environment’s ingest key, by call_id or request_id:
Judges
- A judge is a question in plain words with {{input}} and {{output}} in it; Claude answers it for a sample of calls and gives a reason for each score.
- Before a judge is saved it is tested on 3 real recent calls, so you see its scores and reasons first.
- It checks 10% of matching calls by default (1–100%) and stops at a daily cap (200 runs by default).
- Judges have their own token budget, so they never hold up root-cause analysis or Supfix.
- Judges read the prompt and the answer, so they only score calls sent with content capture on.