Skip to content

agentgateway Jev guardrail example

An agentgateway example that scores prompts and responses for jailbreaks, harmful content and secret disclosure with Jev, rejecting anything scoring 2 or above with HTTP 403.

Format
Article
Published by
Community
Last verified
Oct 2026

Highlights

  • Three scores run from 0 to 3, covering jailbreaks, harmful content and secret disclosure.
  • guardrail.ts inspects the last request message and each response choice, calling Jev through agentgateway with the AI SDK.
  • A score of 2 or higher is rejected with HTTP 403, and the demo proxies gpt-5.6-luna with a curl case that gets blocked.
  • Jev runs against its native /v1/systemone API with passthrough: detect, so requests stay visible in the gateway.

Watch out

This is an example directory inside someone else's repository, not a maintained product, and it is three files: README.md, config.yaml and guardrail.ts. Running it means exporting both OPENAI_API_KEY and TYPESAFE_API_KEY, starting agentgateway -f config.yaml and then running ./guardrail.ts in a second terminal against a proxy on port 4000, so you need Bun, which installs dependencies automatically and needs --install=force if node_modules already exists, plus AI SDK 7.0.105 or later. Only the last request message and each response choice are inspected, so earlier turns are not re-checked, which matters for a jailbreak spread across a conversation. Evaluation errors block the request rather than failing open, so a Jev outage turns into 403s instead of passthrough. Questions and the threshold are edited by hand in guardrail.ts with no configuration surface, and the capture documents no false-positive rate for any threshold, no calibration data and no cost per request. Copy reviewed against the linked page on 2026-10-04.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

29GitHub stars
Static aggregation site and JSON dataset collecting Jev posts, demos, long-form pieces, and discussions from X with original links and author credit and no rehosted content.
Jev Guides & Articles#community#jevbest#catalog-import
19GitHub stars
Community index of shipped Jev decision-model projects across workflow, bulk, realtime, verify, harness and voice patterns, with official docs, SDKs and per-link rubric scoring.
Jev Guides & Articles#community#jevbest#catalog-import
21GitHub stars
Community catalog of real Jev use cases, working architectures, and hard-won guidance, organized by decision shape with runnable examples and a ready-made question catalog.
Jev Guides & Articles#community#jevbest#catalog-import
22GitHub stars
Source-linked index of public Jev demos across robot control, simulation, 3D and animation, and vehicles, with each entry quoting the original author and archiving the demo video or images.
Jev Guides & Articles#community#awesomejev#catalog-import
275GitHub stars
Self-rebuilding Jev index organized by evidence grade, with one ranked pick per category, multilingual guides, and links through to full cards and sources.
Jev Guides & Articles#community#jevbest#catalog-import
24GitHub stars
Curated link collection tracking Jev resources, open reproductions, integrations and architecture playbooks, with every entry resolved from its source thread and checked as a live repo.
Jev Guides & Articles#community#jevbest#catalog-import

From the Jev guides

Original write-ups on what this entry is for.

The typed-answer shape removes a category of data risk, not all of it. Zero data retention per surface, the legal set to read, and the controls that remain yours to run.
Jev Guides & Articles#privacy#compliance#legal
Read article
TypeSafe serves Jev from one API. A second tier of independent sites wraps it with their own keys, credits, and playgrounds. How to read the disclaimers before you paste a key.
Jev Guides & Articles#ecosystem#trust#hosting
Read article
The first ten days produced three receptions that rarely meet: a Product Hunt launch, a 620-point Hacker News thread, and a r/LocalLLaMA that doubted the framing. Reading them together.
Jev Guides & Articles#launch#community#reception
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai