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
- LangChain ships mcp-adapters 2.0 with stateless MCP support and easier auth — LangChain · 2026-10-02
- Context Highlights launches agent web extraction, 97% more token-efficient than Codex — ycombinator · 2026-10-02
- Grok's New Proactive Bot Fixes Silent Stalls in Agent Automation Loops — leveragedupside · 2026-10-02
- Meta paper: branching harness search lifts Olympiad math +34.8% over Meta-Harness — dair_ai · 2026-10-02
- Grok Build v1.0.46/47: MCP reliability, context sync and large-workspace speedups — XFreeze · 2026-10-02
- Seroter: AI agents are making app frontends optional—developers should build CLIs, skills and MCP servers — rseroter · 2026-10-02