Skip to navigation

Score conversations with signals

Trace signals are typed fields that Runtype reads out of every completed turn of an agent, such as whether the assistant promised a follow-up or how frustrated the user is. Your coding agent configures signals through Runtype Connect. The dashboard shows results.

Before you begin

You need the following:

  • For reading signals: a connected agent with recent completed runs. For setup steps, see Connect a repository and Send a first trace.
  • For previewing or saving custom signals: a claimed organization and at least one confirmed failure_criterion or success_criterion fact. If you created your organization without a browser sign-in, claim it with npx @runtypelabs/connect claim. For context facts, see Describe your agents.

Read your product’s signals

Runtype scores every agent with Failure facts (built-in) at no model cost: run_failed, tool_error, tool_repeated, invalid_tool_input, turn_limit_exhausted, abrupt_end, latency_outlier, and cost_outlier.

Ask your coding agent to call get_signals, or run the CLI command to inspect your product’s signal sets, bindings, recent result counts, and monthly measurement usage:

Read product signals
npx @runtypelabs/connect get-signals --product-id YOUR_PRODUCT_ID --json

Replace YOUR_PRODUCT_ID with your connected product’s ID.

The response lists each signal set, which agents it scores, recent result counts (default seven days, up to 30), and this month’s measurement usage. Agents without a binding appear in missingAgentIds.

Result rows split into sample: "uniform" (an unbiased sample of all traffic) and sample: "filtered" (only the traffic that coverage selects). Never add the two together. A signal’s rate is fired over the turns it could answer.

Preview and save a custom signal

To score a custom question across every agent in a connected product, ask your coding agent to draft a definition from a confirmed failure_criterion or success_criterion fact. The following example defines one bool signal:

Example signal definition
{
"signals": {
"promised_followup": {
"type": "bool",
"instructions": "The assistant promised to follow up later."
}
}
}

To preview and save the signal, follow these steps. A preview that costs at most $0.01 and that your organization’s credit covers runs without asking, up to 20 such previews in 24 hours and while it fits your monthly spend cap, when you call preview_signal without an estimateId; its response carries ranWithoutApproval with what it cost, so you can skip step 1.

  1. Price the preview: call preview_signal with dryRun: true. It runs no model and returns a price and an estimateId. Confirm the price before running the preview.
  2. Run the preview: call preview_signal again with the same inputs and the estimateId, without dryRun: true. It returns each signal’s fire rate with sample answers. The model calls are billed. An estimate works once, for 24 hours.
  3. Save the signal: call save_signal with the confirmed facts in sourceFactIds. Runtype scores the signal on every turn of every agent in the product. Pass coverage as { "mode": "sample", "rate": 0.2 } to score a share of turns instead.

A bool signal that cites confirmed failure_criterion or success_criterion facts of one kind also counts when you check a shipped change against production. Keep its coverage, filter, and uniform share the same before and after you ship, because sampling differences strip the signal’s direction from that comparison.

After a few new conversations complete, call get_signals to see fire rates, or open the agent in the dashboard. Fired keys also feed mine_issues.

An agent that can’t score signals appears as refused in agents, and Runtype binds the remaining agents. Saving the same signal again changes nothing. An agent added to the product after a save isn’t scored until you save again. get_signals lists those agents in missingAgentIds.

Organizations with no payment method on file get a monthly signal measurement allowance. For allowances and billing rules, see Limits and pricing.

How signals are evaluated

A signal set holds up to 40 signals. Each signal has a lowercase snake_case key, a type, and instructions (required for bool signals).

The following table lists each signal type and what an answer contains:

Signal typeAnswer
bool, choiceA value with calibrated confidence.
text, number, date, duration, list, estimateA value or null with confidence. A nonempty value can carry a source span.

Each answer falls into one of three confidence bands:

  • act: confidence at or above bands.act (default 0.9).
  • review: confidence at or above bands.review (default 0.6) and below bands.act. Count these answers, and have a person check them before acting.
  • low: confidence below bands.review.

A signal fires when a bool is true in the act band, or when a choice value is listed in notable in the act band. Signals of type text, number, date, duration, list, and estimate carry values and never fire on their own.

Write instructions the model can answer

The model reads each instruction literally, so wording changes answers. Follow these rules when writing bool and choice instructions:

  • Describe one observable event in the turn: "The refund tool call failed in this turn." works. "The user was unhappy and the refund failed." asks two questions in one instruction.
  • State the condition positively: a negation such as "...and the assistant did NOT apologize" can flip every answer to false. To catch the opposite case, write a second signal.
  • Name concrete evidence: cite a tool call, a phrase in the assistant’s reply, or a value from the user.

Tune the act band from the preview

The default bands.act of 0.9 is strict. Correct answers often return with confidence between 0.6 and 0.9, so they land in the review band and never fire.

Preview the signal and check its review-band count. If the sample answers in the review band are correct, lower bands.act to between 0.8 and 0.85 in your signal definition, then preview again. In Runtype Connect, pass the updated definition to preview_signal and save_signal. Through the REST API, publish a new version with POST /v1/signal-sets/YOUR_SIGNAL_SET_ID/versions and preview that version. The following definition sets bands.act to 0.85:

Signal definition with a tuned act band
{
"signals": {
"refund_failed": {
"type": "bool",
"instructions": "The refund tool call failed in this turn."
}
},
"bands": { "act": 0.85, "review": 0.6 }
}

If a signal fires on traces where it doesn’t apply, rewrite its instructions before raising bands.act. bands applies to every signal in the set.

Create a signal set

To manage signal sets directly through the REST API, SDK, or runtype CLI, use an API key with SIGNALS:WRITE to configure or preview signals. Use SIGNALS:READ to read results and stats. For details, see Authentication.

Start from a preset or write your own definition. Two presets are available:

  • conversation_health: covers frustration, repeated asks, corrections, escalation requests, out-of-scope asks, promised follow-ups, and unanswered questions.
  • failure_detector: covers agent failures in each turn: unrecovered tool errors, calling the wrong tool, claimed success after a failed call, looping, and giving up. It also returns failure_category and a one-sentence failure_summary. Its act band is 0.8.

The following request creates a signal set from a definition:

cURL
curl https://api.runtype.com/v1/signal-sets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support follow-ups",
"definition": {
"context": { "priorTurns": 4 },
"signals": {
"promised_followup": {
"type": "bool",
"instructions": "The assistant promised to follow up later."
},
"frustration": {
"type": "choice",
"options": ["none", "mild", "churn_threat"],
"notable": ["churn_threat"]
}
}
}
}'

Replace YOUR_API_KEY with your Runtype API key.

priorTurns (0 to 20, default 6) adds that many earlier turns of the same conversation as context. Version 1 becomes current when you create the set.

To start from a preset instead, send "preset": "conversation_health" or "preset": "failure_detector" in place of definition. To list presets, send GET /v1/signal-sets/presets. To rename a set or change its description, send PATCH /v1/signal-sets/YOUR_SIGNAL_SET_ID.

Preview a signal set version before binding

A preview runs one version over an agent’s most recent completed traces and writes nothing. Its model calls are billed. To price a preview without calling a model first, send POST /v1/signal-sets/YOUR_SIGNAL_SET_ID/versions/1/preview/estimate with agentId and an optional limit (1 to 50, default 20).

The following request previews version 1 of a signal set over an agent’s recent completed traces:

cURL
curl https://api.runtype.com/v1/signal-sets/YOUR_SIGNAL_SET_ID/versions/1/preview \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "agentId": "YOUR_AGENT_ID", "limit": 20 }'

Replace the following:

  • YOUR_API_KEY: your Runtype API key
  • YOUR_SIGNAL_SET_ID: the signal set’s sigset_ ID
  • YOUR_AGENT_ID: the ID of the agent whose recent traces to read

The preview report lists each signal’s fire rate, mean confidence, review-band count, sample answers with source spans, and projected monthly cost. A signal that fires on most traces usually has instructions that are too broad. To change a signal, publish a new version with POST /v1/signal-sets/YOUR_SIGNAL_SET_ID/versions and preview that version.

Bind a signal set to an agent

A binding starts evaluation on every matching turn from then on. Its model calls are billed like other model calls. If billing stops or the monthly allowance runs out, Runtype skips evaluation until it resumes.

The following request binds a signal set to an agent:

cURL
curl https://api.runtype.com/v1/signal-bindings \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"signalSetId": "YOUR_SIGNAL_SET_ID",
"target": { "kind": "agent", "id": "YOUR_AGENT_ID" }
}'

Replace the following:

  • YOUR_API_KEY: your Runtype API key
  • YOUR_SIGNAL_SET_ID: the signal set’s sigset_ ID
  • YOUR_AGENT_ID: the ID of the agent to bind

The binding uses the set’s current version unless you pass versionNumber. The following table lists the optional binding fields:

FieldDefaultDescription
coverage{ "mode": "all" }Pass { "mode": "sample", "rate": 0.2 } (greater than 0 and up to 1) to evaluate that share of matching turns.
filter{}Pass status to limit evaluation to traces with those statuses, and minTurns to skip shorter conversations.
uniformShare0.05Share of turns drawn at random before the filter so live-traffic rates stay unbiased.

An agent holds at most one enabled binding per set. Publishing a new version doesn’t move an existing binding. To run a newer version or change filter or coverage, send the same bind request again to update the binding.

To stop evaluation, send DELETE /v1/signal-bindings/YOUR_BINDING_ID. Existing results stay readable on their traces.

To delete a set you no longer need, unbind each of its enabled bindings, then send DELETE /v1/signal-sets/YOUR_SIGNAL_SET_ID. Results already recorded stay readable. While any binding is enabled, Runtype returns SIGNAL_SET_BOUND with the binding IDs in details.bindingIds.

Refusals

Runtype refuses some bindings and previews for the same reasons, because a preview also sends turns to a model. The default signal models retain no data and are covered by the Runtype Business Associate Agreement (BAA). Accounts under zero data retention or handling protected health information (PHI) can use them with no extra step.

The last two refusals apply when decisionModel or extractionModel is a model other than the default signal models. These refusals need a decision from someone in your organization, so a coding agent reports them instead of working around them. The following table lists each refusal code:

CodeStatusMeaning
SIGNALS_LOGGING_OFF422The agent has loggingPolicy: "off", so there are no turns to read.
SIGNALS_ZERO_DATA_RETENTION422The organization is under zero data retention, and decisionModel or extractionModel isn’t one of the default signal models. Remove decisionModel and extractionModel to use the defaults.
SIGNALS_EXTERNAL_PROCESSING_UNACKNOWLEDGED409The organization handles PHI, and decisionModel or extractionModel isn’t one of the default signal models. Remove decisionModel and extractionModel, or retry with "acknowledgeExternalProcessing": true after a person confirms. Runtype records the acknowledgement in the audit log.

Read signal results

After a set is bound, runs and trace reads (GET /v1/runs, GET /v1/runs/YOUR_EXECUTION_ID) carry a signals block with status and the keys in fired. Detail reads also include results, with each answer’s value, confidence, band, and source spans.

The status field takes one of the following values:

  • complete: every signal result on the run completed.
  • pending: evaluation hasn’t finished. This usually takes a few seconds after the trace completes.
  • partial: at least one signal result on the run didn’t complete, such as a failed or skipped result.
  • unavailable: results couldn’t be read. The rest of the response is unaffected.
  • none: no binding covered the run.

To list only the runs where a signal fired, pass the signal query parameter to GET /v1/runs. Pass the key alone, or key:value for one choice value. The following request filters runs by a fired choice signal:

cURL
curl "https://api.runtype.com/v1/runs?agentId=YOUR_AGENT_ID&signal=frustration:churn_threat" \
-H "Authorization: Bearer YOUR_API_KEY"

Replace the following:

  • YOUR_AGENT_ID: the ID of the agent to filter
  • YOUR_API_KEY: your Runtype API key

In the dashboard, open the Runs panel (click Runs in the top bar, or press ⌘J). It displays fired keys on each run and includes a Signal filter in the source menu. Select a run to open its Signals section, which lists each answer and quotes its source text. An agent page with an enabled binding shows a read-only Signals card. It reports fire rates on a uniform sample of live traffic over the last seven days, grouped by set version.

Read rollup stats

Send GET /v1/signals/stats to read hourly counters summed over a window (default: the last seven days). Each row counts evaluated and fired turns per signal and set version.

Pass sample=uniform for rates on live traffic. Counts with sample=filtered describe only the traffic that the binding selects.

Configure signals from other clients

You can configure signals through the Runtype Connect Model Context Protocol (MCP) server, the Runtype MCP server, the REST API, the SDK, or the CLI:

  • Runtype Connect MCP server and CLI: get_signals (get-signals), preview_signal (preview-signal), save_signal (save-signal), and estimate (estimate). For every parameter and option, see Connect MCP tools and Connect CLI.
  • Runtype MCP server: list_signal_sets, get_signal_set, create_signal_set, update_signal_set, delete_signal_set, publish_signal_set_version, preview_signal_set, list_signal_bindings, bind_signal_set, unbind_signal_set, and get_signal_stats. The list_runs tool accepts signal. You can ask a coding agent connected to the Runtype MCP server to “tell me when support conversations go badly”, and it configures the set. For setup details, see Runtype MCP server.
  • SDK: Runtype.signals provides listSets, listPresets, getSet, createSet, updateSet, deleteSet, publishVersion, estimatePreview, preview, listBindings, bind, unbind, and stats.
  • CLI: runtype signals provides list, get, create, update, delete, publish, preview, bindings, bind, unbind, and stats. Run runtype runs list --signal YOUR_SIGNAL_KEY (replacing YOUR_SIGNAL_KEY with a signal key or key:value) to filter runs where a signal fired.

Error codes

The following table lists the error codes you’re most likely to encounter when previewing or saving a custom signal:

CodeStatusFix
claim_required403Claim the organization before calling estimate, previewing, or saving a custom signal.
CONTEXT_FACT_NOT_CONFIRMED422Confirm the business-context fact before citing it in sourceFactIds.
SIGNAL_MEASUREMENT_ALLOWANCE_EXCEEDED422Lower coverage to a sample rate that fits, or add a payment method to lift the monthly allowance.

For other signal and estimate error codes, see Troubleshooting.

Next steps