Skip to content

SDK Installation

Detailed installation instructions for the Aegis Python SDK.


Requirements

  • Python: 3.9, 3.10, 3.11, 3.12, or 3.13
  • Operating System: Linux, macOS, Windows
  • Dependencies: Automatically installed with pip

Installation Methods

pip install aegis-sdk

uv (Fast Python Package Manager)

uv pip install aegis-sdk

poetry

poetry add aegis-sdk

pipx (CLI Only)

If you only need the CLI tool:

pipx install aegis-sdk

Optional Dependencies

LLM Integrations

# OpenAI support
pip install aegis-sdk[openai]

# Anthropic support
pip install aegis-sdk[anthropic]

# LangChain support
pip install aegis-sdk[langchain]

# JWT license validation
pip install aegis-sdk[jwt]

# All optional dependencies
pip install aegis-sdk[all]

Verify Installation

Check Version

aegis --version
aegis-sdk 0.1.3

The CLI automatically checks for updates and notifies you when a new version is available.

Quick Test

from aegis_sdk import Aegis

aegis = Aegis()

# Test detection
result = aegis.process(
    text="Contact [email protected] or call 555-123-4567",
    destination="AI_TOOL"
)

print(f"Decision: {result.decision}")
print(f"Masked: {result.masked_content}")

Output:

Decision: Decision.ALLOWED_WITH_MASKING
Masked: Contact j***@example.com or call XXX-XXX-4567


Configuration

Environment Variables

Variable Description Default
AEGIS_LICENSE_KEY License key for enterprise features None

Programmatic Configuration

from aegis_sdk import Aegis

# Basic usage (no license required)
aegis = Aegis()

# With license key for enterprise features
aegis = Aegis(license_key="aegis_lic_xxx")

# With custom policy configuration
aegis = Aegis(
    policy_config={
        "destinations": {
            "AI_TOOL": {
                "masked": ["EMAIL", "PHONE"],
                "blocked": ["SSN", "CREDIT_CARD"]
            }
        }
    }
)

# With policy groups (departments)
aegis = Aegis(
    license_key="aegis_lic_xxx",
    policy_group="marketing"
)

Upgrading

Check for Updates

The CLI automatically checks for updates:

aegis --version

If an update is available, you'll see:

aegis-sdk 0.1.3

Update available: 0.1.4
Run 'pip install --upgrade aegis-sdk' to update

Upgrade

pip install --upgrade aegis-sdk

Uninstallation

pip uninstall aegis-sdk aegis-preflight-core

Troubleshooting

SSL Certificate Errors

If you encounter SSL errors:

pip install --upgrade certifi

Proxy Configuration

For corporate networks:

export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080

Permission Errors

Use --user flag:

pip install --user aegis-sdk

Or use a virtual environment:

python -m venv .venv
source .venv/bin/activate
pip install aegis-sdk

Docker

In Your Dockerfile

FROM python:3.11-slim

WORKDIR /app
RUN pip install aegis-sdk

COPY . .
CMD ["python", "main.py"]

With Optional Dependencies

FROM python:3.11-slim

RUN pip install aegis-sdk[openai]

Next Steps