Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add arcjet/arcjet-plugin --skill integrate-arcjet-guard-langchain-pygit clone --depth 1 https://github.com/arcjet/arcjet-pluginWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/arcjet/arcjet-plugin/integrate-arcjet-guard-langchain-py)<a href="https://agentmods.dev/skills/arcjet/arcjet-plugin/integrate-arcjet-guard-langchain-py"><img src="https://agentmods.dev/badge/skills/arcjet/arcjet-plugin/integrate-arcjet-guard-langchain-py/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/arcjet/arcjet-plugin/integrate-arcjet-guard-langchain-py"><img src="https://agentmods.dev/badge/skills/arcjet/arcjet-plugin/integrate-arcjet-guard-langchain-py.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00107 | $0.02349 |
| Opus 5 | $0.00053 | $0.01175 |
| Sonnet 5 | $0.00021 | $0.00470 |
| Haiku 4.5 | $0.00011 | $0.00235 |
Grade A, and why
integrate-arcjet-guard-langchain-py scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
88% identical to integrate-arcjet-guard-langchain-py — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 callable →
guard_action/guard_action_syncin corearcjet.guard. No LangChain extra. Details in the shared Python Guard reference. - A LangChain
BaseToolyou call yourself →guard_tool. DENY raisesArcjetToolDeniedError(the tool'shandle_tool_errormay convert it). create_agent(the model chooses tools) →ArcjetMiddleware+ToolPolicy. Tools without a policy pass through.- Observe a chain or agent →
ArcjetCaptureHandler/ArcjetAsyncCaptureHandler. These cannot deny.
This is Python create_agent. The merged page
https://docs.arcjet.com/guards/langchain/ covers both languages — JS is
@arcjet/guard/langchain/v1 (createAgent / wrapToolCall), not this
module. It is not LangGraph JS StateGraph / ToolNode (docs
https://docs.arcjet.com/guards/langgraph/).
Importing arcjet.guard.langchain does not load LangGraph. Referencing
ArcjetMiddleware or ToolPolicy without arcjet[langchain-agents]
raises and names that extra.
Screen inbound before agent.ainvoke — there is no inbound helper
There is no inbound helper. Put prompt-injection (and other inbound rules)
in the application with core aj.guard(...) before ainvoke / invoke.
Core guard() fails open: ALLOW is not proof the rules ran. Gate on
decision.has_failed_open() when this call site must fail closed.
guard_tool / ArcjetMiddleware already default to that.
Capture handlers never block
LangChain ignores what a callback returns. ArcjetCaptureHandler only
records. Policy lives in guard_action / guard_tool / ArcjetMiddleware.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed cccd4ea7991e
- 5d ago First seen · 233 lines · 107 tokens per session scan A 7d340476b075
integrate-arcjet-guard-langchain-py is a skill published in the GitHub repository arcjet/arcjet-plugin (1 stars, last pushed 4d ago), licensed Apache-2.0. It adds 107 tokens to every session and 2,349 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to integrate-arcjet-guard-langchain-py, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
chief-financial-officer
Owns the financial position: planning, budgeting, forecasting, unit economics, cash, and the numbers the business is run and reported on. Use this to build or challenge a budget, model a decision's financial consequence, assess unit economics or runway, evaluate an investment or spend request, set financial controls…
chief-revenue-officer
Owns the revenue engine end to end: sales, monetization, pricing, customer success, retention, and partnerships. Use this for pricing and packaging decisions, sales strategy and coverage, forecast and pipeline health, churn and expansion, partner and channel strategy, or when marketing-sourced demand is not…
chief-strategy-officer
Owns where the business plays and how it wins over a multi-year horizon — portfolio choices, corporate development, strategic partnerships, and planning under uncertainty. Use this for a decision about which markets or businesses to be in, whether to build, buy, or partner, how to allocate capital across business…
seo-strategy
Audits and improves organic search performance — technical health, site architecture, internal linking, structured data, and the content decisions that determine what can rank. Use this to run an SEO audit, diagnose why pages are not ranking or were deindexed, plan a site's URL and navigation structure, add structured…
ceo-advisor
Pressure-tests a decision, plan, or idea before it is committed to — surfacing the assumption it rests on, the case against it, and what would have to be true for it to work. Use this when weighing options, when a plan needs challenging before commitment, when you have already decided and want a genuine gut check…
customer-success-management
Runs the ongoing relationship with accounts after the sale — segmenting coverage against account value, building a health score that predicts rather than describes, running reviews customers find worth attending, forecasting renewals honestly, and finding expansion that follows usage instead of quota. Use this to…