Use Cases / agent-safety
Jev: безопасность агентов
Агенты могут вызывать shell, платежи или delete API. Нужен быстрый yes/no риск-гейт — не длинный chat completion — перед каждым tool.
Try a related template free on this host — 5 anonymous real-API runs with no signup — then ship the same schema with a prepaid jv_live_ key. See is Jev free? and playground.
Why Jev
Примитивы Noul и Score дают калиброванный риск для порогов (allow / confirm / block) за десятки–сотни миллисекунд. Передайте имя планируемого tool + сводку args как state; ветвитесь в коде по типизированному ответу. Пример: shell rm -rf /workspace → высокий Score риска + Choice block до исполнения.
How to define the decision
state должен включать имя tool, сводку аргументов и опциональный intent пользователя. Choice allow / confirm / block плюс Score или Noul риска. Набор меток идентичен тому, что понимает runtime агента.
When to use Jev
- Риск-гейты перед tool-call
- Confirm-before-send для деструктивных действий
- Проверки политики на планах агента
When not to use Jev
- Замена sandboxing и least-privilege IAM
- Генерация более безопасных патчей кода
- Неограниченные multi-hop security-аудиты
Sample input and output
From the live tool template. Run it in the playground for a real API response — sample labels below are illustrative until you click Run.
Input
goal: Clean up the build directory tool: bash arguments: rm -rf ./dist && aws s3 sync ./build s3://prod --delete context: CI deploy step
Sample display fields
- action: block · 84%
- risk: 0.84
Block или низкая уверенность → пауза и подтверждение оператора. Allow только когда риск явно ниже вашей планки. Модельные scores никогда не перекрывают жёсткие IAM deny и защиту от sandbox escape.
Failure modes and human fallback
- Upstream or network errors: retry with backoff; do not invent a decision.
- Low confidence: route to a human queue or safer default — never auto-act on money/destructive tools.
- Schema drift: keep a golden fixture set in CI so label changes fail the build before production.
- Jev — мягкий policy-гейт, не замена sandboxing или least privilege.
- Деструктивные money/shell tools должны иметь hard deny list в коде.
- При сбое API — fail closed (не исполняйте tool).
API example
Same prepaid jv_live_ balance as tools. Output tokens are free on this host's metering model.
curl https://jevtypesafe.org/api/v1/decide \
-H "Authorization: Bearer jv_live_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"state":"Agent tool proposal\nGoal: Clean up the build directory\nTool: bash\nArguments: rm -rf ./dist && aws s3 sync ./build s3://prod --delete\nContext: CI deploy step","questions":{"action":{"type":"choice","instructions":"Should this tool call be allowed, require confirmation, or blocked?","criteria":{"allow":"safe to run automatically","confirm":"needs human confirmation","block":"too risky — refuse"}},"risk":{"type":"score","instructions":"Overall risk of irreversible harm or data exposure (0–3 scale).","criteria":["negligible","moderate","high","critical"]},"destructive":{"type":"noul","instructions":"Is this destructive or irreversible?"},"external_side_effect":{"type":"noul","instructions":"Does this have external side effects (cloud, email, payments)?"},"data_exposure":{"type":"noul","instructions":"Could this expose sensitive data?"}}}'FAQ
- Какой tool открыть первым?
- Начните с Command Safety (Agent Risk) в Tools или подключите свои вопросы к /api/v1/decide с choices allow/confirm/block.
- Какой человеческий fallback?
- При block или низкой уверенности остановите агента и покажите UI подтверждения оператору. Никогда не давайте мягкому model score перекрыть жёсткие IAM deny.
Related use cases
Ready to build?
Free anonymous tool runs, then prepaid packs and a jv_live_ key — independent host, not affiliated with TypeSafe AI.