integrate-arcjet-guard-langchain-py

Installation
SKILL.md

Integrate Arcjet Guard into Python LangChain

arcjet.guard.langchain wraps the agent's existing Arcjet client. It never talks to the Arcjet API itself. Shared Guard fundamentals (client, rules, labels, decisions, capture, registration) live in ../arcjet/references/guards_python.md. Load that reference for anything that is not LangChain-specific.

Four surfaces, one decision rule:

  • Any Python callableguard_action / guard_action_sync in core arcjet.guard. No LangChain extra. Details in the shared Python Guard reference.
  • A LangChain BaseTool you call yourselfguard_tool. DENY raises ArcjetToolDeniedError (the tool's handle_tool_error may convert it).
  • create_agent (the model chooses tools)ArcjetMiddleware + ToolPolicy. Tools without a policy pass through.
  • Observe a chain or agentArcjetCaptureHandler / ArcjetAsyncCaptureHandler. These cannot deny.
Installs
34
Repository
arcjet/skills
GitHub Stars
3
First Seen
Sep 3, 2026
integrate-arcjet-guard-langchain-py — arcjet/skills