jes ships LangChain/LangGraph middleware examples to guard agent prompts, tool calls and replies
EdenEmarco177 · x · 2026-10-02
jes, an Apache-2.0 Python library, checks every step of an AI agent — prompt, tool calls, tool results, and final reply — and blocks risky ones. The author published official LangChain/LangGraph integration examples:
- Guard composition: allowedtools enforces a tool whitelist; injection catches prompt injection in user messages/tool calls; indirectinjection catches injection hidden in tool outputs; hazards covers 14 harmful-content categories.
- Judgments are made by a hosted decision model (Jev by default) that returns probabilities instead of text, so checked content can't hijack it. Thresholds must be tuned on your own traffic — no library defaults.
- Middleware runs checks at three points in the agent loop; the LangGraph version wires in as nodes, traceable via LangSmith.
- Each check is a plain Python call returning ok/onward, so it can be placed anywhere an agent handles text; a formal langchain-jes integration is in progress.
More from coding & agent
- Generic API-catalog MCP server vs one tool per job: a context-bloat experiment — MandeepKaur9407 · 2026-11-16
- Berkeley paper: LLMs answer with stale values even when the update is in context — ombre-ai · 2026-11-16
- Effective HTML: 4.2k-star agent skills turn wireframes into self-contained interactive prototypes — tom_doerr · 2026-11-16
- skills-gate: one gate skill fronts 148 agent skills at just 389 tokens — Distinct-Pie2389 · 2026-11-16
- Open-weight Karpo-Decision-31B tops Decision Index at 73.9, one forward pass per answer — CodeByPoonam · 2026-11-16
- shadcn boosts @uisdk: one-shot UI rebuild that's instantly E2E-testable by AI — shadcn · 2026-11-16