Install¶
GuardLayer needs Python 3.10 or later. The core has no runtime dependencies.
Optional extras add heavier layers and integrations. Install only what you use: each one brings third-party packages.
| Extra | Adds | Pulls in |
|---|---|---|
api |
REST API server | FastAPI, uvicorn, pydantic |
signing |
Ed25519-signed audit logs | cryptography |
ml |
transformer prompt-injection classifier | transformers, torch (about 750 MB of model weights on first use) |
embeddings |
semantic similarity and relevance checks | sentence-transformers |
langgraph |
LangGraph / LangChain integration | langgraph |
openai-agents |
OpenAI Agents SDK integration | openai-agents |
toml |
TOML config on Python 3.10 | tomli |
Check the install:
guardlayer --version
guardlayer scan "Ignore all previous instructions." # prints BLOCK and exits with code 1
From source¶
Docker¶
The image runs the REST API as a non-root user. See Deployment for hardened Compose and Kubernetes setups.