Recipe catalog / action-effects
Label the side effects of an action
action-effects is a Jev recipe from the jev-recipes TypeScript package. Which side effects does the described action involve: writing or modifying data, sending a message or notification, spending or moving money, deleting something, or calling an external service? Use it when an agent is about to execute a step and your approval policy differs by effect, so you want to gate auto-execution per side effect rather than with one blanket risk score.
Last updated .
Explore this recipe interactively · Source and implementation guide · Markdown version
How do I use action-effects in TypeScript?
Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.
import { actionEffects } from 'jev-recipes/action-effects';
const result = await actionEffects({
"action": "Send the weekly product digest to all 1,240 subscribers on the newsletter list through the SendGrid API, then set last_digest_sent_at to now on each subscriber row in the users table.",
"minConfidence": 0.8
});
console.log(result);
What input does action-effects take?
| Field | Type | Needed |
|---|---|---|
| action | string | Required |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"action": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"action"
]
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string"
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"input_tokens",
"output_tokens"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"detected": {
"type": "array",
"items": {
"type": "string",
"enum": [
"writesData",
"sendsMessage",
"spendsMoney",
"deletesData",
"callsExternal"
]
}
},
"labels": {
"type": "object",
"properties": {
"writesData": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"verdict": {
"type": "string",
"enum": [
"present",
"absent"
]
},
"probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"status",
"verdict",
"probability",
"confidence"
],
"additionalProperties": false
},
"sendsMessage": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"verdict": {
"type": "string",
"enum": [
"present",
"absent"
]
},
"probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"status",
"verdict",
"probability",
"confidence"
],
"additionalProperties": false
},
"spendsMoney": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"verdict": {
"type": "string",
"enum": [
"present",
"absent"
]
},
"probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"status",
"verdict",
"probability",
"confidence"
],
"additionalProperties": false
},
"deletesData": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"verdict": {
"type": "string",
"enum": [
"present",
"absent"
]
},
"probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"status",
"verdict",
"probability",
"confidence"
],
"additionalProperties": false
},
"callsExternal": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"verdict": {
"type": "string",
"enum": [
"present",
"absent"
]
},
"probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"status",
"verdict",
"probability",
"confidence"
],
"additionalProperties": false
}
},
"required": [
"writesData",
"sendsMessage",
"spendsMoney",
"deletesData",
"callsExternal"
],
"additionalProperties": false
}
},
"required": [
"model",
"usage",
"status",
"detected",
"labels"
],
"additionalProperties": false
}
}What does a action-effects result look like?
This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo action-effects.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"detected": [
"writesData",
"sendsMessage",
"callsExternal"
],
"labels": {
"writesData": {
"status": "ready",
"verdict": "present",
"probability": 0.94,
"confidence": 0.94
},
"sendsMessage": {
"status": "ready",
"verdict": "present",
"probability": 0.97,
"confidence": 0.97
},
"spendsMoney": {
"status": "ready",
"verdict": "absent",
"probability": 0.04,
"confidence": 0.96
},
"deletesData": {
"status": "ready",
"verdict": "absent",
"probability": 0.02,
"confidence": 0.98
},
"callsExternal": {
"status": "ready",
"verdict": "present",
"probability": 0.93,
"confidence": 0.93
}
}
}
Input
See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.
Result
labels holds one check per label: writesData, sendsMessage, spendsMoney, deletesData, callsExternal. Each check has a verdict of present or absent, the yes probability, confidence for the chosen side, and its own status. detected lists the present labels in declaration order.
The overall status is review when any single label falls below minConfidence. Labels that are individually ready remain usable in that case.
Reuse and calls
Uses the shared labels helper, which places one yes/no question per label in a single Jev request. This folder owns the questions and their outcome descriptions. A live invocation makes one logical Jev request.
Limits
The labels describe the action as written, not what the underlying tool actually does, so a vaguely described action can hide effects and a verbose one can overstate them. External calls are labeled whether or not they are read-only, and archiving or deactivating data does not count as deletion; decide how each case should be treated in your policy code. The recipe does not authorize anything. Spending limits, confirmation prompts, and per-effect approval rules belong in the application that consumes the labels.
Example input
demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo action-effects shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe action-effects to inspect the input and result schemas.
Decision boundary
Judge the effects of executing the outer action. Explaining a deletion or drafting instructions to send money does not itself delete data or move money. The caller still determines permissions and executes any approved action.
How accurate is action-effects?
jev-1.13.0 / 2026-10-04 / 100 development cases
Scoring revision 2.
63 ready decisions, with 98% accuracy among those decisions.
95% case-level interval: 71% to 87%. Related synthetic cases are correlated.
This measures the recorded dataset, not general readiness. Label sources: author-synthetic: AI-authored synthetic boundary cases for jev-recipes; labels have not had independent human review.
Use the evaluation guide to measure this decision on your own labeled cases.
What are the limits of action-effects?
- Labels the effects the action description states or plainly entails. It does not know what your tools actually do behind the description.
- Read-only lookups against an external API still count as external calls; whether that is acceptable is a policy decision for application code.
- Permission checks, spending limits, and confirmation prompts belong in application code that consumes these labels.
Which recipes are related to action-effects?
- action-reversibility: Use action-reversibility to grade how hard the action is to undo, rather than which kinds of effect it has.
- action-scope: Use action-scope to check whether the action stays within the work that was requested.