integrate-arcjet-guard-crewailisted
Install: claude install-skill arcjet/arcjet-plugin
# Integrate Arcjet Guard into CrewAI
`arcjet.guard.crewai` 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](../arcjet/references/guards_python.md).
Load that reference for anything that is not CrewAI-specific.
Official `crewai` only — not community forks, not LangChain Crew wrappers,
not an npm CrewAI port. There is **no** `arcjet[crewai]` extra: CrewAI
hard-depends on `chromadb`, which carries unpatched RCE CVE-2026-45829,
so an Arcjet extra must not pull it in. Install CrewAI yourself. Importing
`arcjet.guard.crewai` does not load LangChain.
Exports: `register_arcjet_hooks`, `unregister_arcjet_hooks`,
`ArcjetCrewAIHooks`, `guard_tool`, `ToolPolicy`, `sanitize_tool_name`,
`free_text_arguments`. There is no `guard_crew`.
Two surfaces, one decision rule:
- **A tool a crew, LiteAgent, MCP adapter, or crew-injected list executes**
→ `register_arcjet_hooks` + `ToolPolicy`. Gate is process-wide
`PRE_TOOL_CALL` only. DENY raises `HookAborted(reason=..., source="arcjet")`.
- **A CrewAI `BaseTool` you call yourself** → `guard_tool`. This is the
**only** CrewAI path that raises `ArcjetDeniedError` /
`ArcjetUnavailableError`. `BaseTool.run` never dispatches
`PRE_TOOL_CALL`.
Docs: https://docs.arcjet.com/guards/crewai/.
## The gate is process-wide `PRE_TOOL_CALL`, once
`register_arcjet_hooks` registers on