Installation¶
SafeAI installs as a standard Python package with optional extras for vault integration, AWS services, and MCP server support. The core package has minimal dependencies and works out of the box for most use cases.
Requirements¶
- Python >= 3.10
- uv (recommended) or pip
Why uv?
uv is a fast Python package manager written in Rust. It's 10-100x faster than pip, handles virtual environments automatically, and is the tool used in SafeAI's CI pipeline. We recommend it for all SafeAI workflows.
Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
Basic Install¶
This installs the core framework with secret scanning, PII redaction, policy enforcement, tool control, and action approval.
Optional Extras¶
SafeAI provides optional dependency groups for extended functionality:
| Extra | Description |
|---|---|
vault | HashiCorp Vault integration for secret rotation and storage |
aws | AWS Secrets Manager and KMS support |
mcp | Model Context Protocol server for tool-level guardrails |
all | All optional dependencies bundled together |
docs | MkDocs Material documentation tooling |
Choosing extras
If you are unsure which extras you need, start with the base install. You can always add extras later without reinstalling the core package.
Development Install¶
To contribute or run tests locally, clone the repository and install with development dependencies:
This includes linting, testing, and documentation tooling on top of the full runtime dependencies.
Verify Installation¶
Run the following command to confirm SafeAI is installed and importable:
You should see:
Import errors
If you see a ModuleNotFoundError, make sure you are using the correct Python environment. With uv, dependencies are managed automatically. With pip, use a virtual environment (python -m venv .venv) to avoid conflicts.
Next Steps¶
Once installed, head to the Quickstart guide to run your first scan in two lines of code.