Skip to content

Repository files navigation

Shield Aegis — Secure AI Agent Platform

The AI agent your security team won't hate.

Aegis is an open-source, self-hosted AI agent platform built on LangGraph and Anthropic Claude. It delivers the power of autonomous AI agents with enterprise-grade security built in — not bolted on.

Features

  • LangGraph agent powered by Claude claude-sonnet-4-5
  • Live web search via DDGS
  • AES-256 encrypted memory with per-user keys
  • HashiCorp Vault — zero secrets in env files
  • OPA policy engine — enforced pre-execution on every tool call
  • Tamper-evident audit logging (JSONL)
  • Browser dashboard — chat, audit, memory
  • Docker Compose — one-command deployment
  • GDPR ready — right-to-erasure built in Aegis-preview

Architecture

Request → nginx Gateway → FastAPI Agent → OPA Policy Check → LangGraph Tools → Encrypted Memory
                                                                      ↓
                                                               Audit Log (JSONL)
image

Quick Start

Prerequisites: Docker Desktop, Python 3.11+, Anthropic API key

git clone https://github.com/Indianinnovation/aegis.git
cd aegis

make setup   # interactive setup — writes .env and agent/config.yaml
make up      # build and start all services

Manual Setup (without wizard)

cp .env.example .env
# Edit .env and fill in all values, then:
make up

Chat with Your Agent

curl -X POST http://localhost/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Search the web for latest O-RAN news"}'

Security Model

Threat Protection
Prompt injection OPA blocklist enforced before every tool call
Memory exposure AES-256 encryption per-user key (scrypt-derived)
API key theft HashiCorp Vault — never in env files
Untracked actions Tamper-evident JSONL audit log
Weak encryption key Hard startup failure if MEMORY_MASTER_KEY is missing or default
Hardcoded secrets All secrets sourced from .env — none in docker-compose.yml
Abuse / flooding nginx rate limiting — 10 req/min on /chat, 30 req/min on /api/

Project Structure

aegis/
├── agent/
│   ├── core/
│   │   └── security.py       # Vault, AES-256 memory, audit logger
│   ├── skills/
│   │   └── websearch.py      # Web search skill (LangChain tool)
│   ├── config.yaml           # Agent name, model, timezone, skills
│   ├── Dockerfile
│   ├── main.py               # FastAPI + LangGraph agent + OPA enforcement
│   └── requirements.txt
├── nginx/
│   ├── html/
│   │   ├── index.html
│   │   └── dashboard.html    # Chat dashboard
│   └── nginx.conf
├── opa/
│   └── policy.rego           # Security policies (tool blocklist)
├── wizard/
│   └── setup_wizard.py       # Interactive first-time setup
├── worker/
│   └── worker.py             # Background Redis queue worker
├── docker-compose.yml
└── .env.example

Environment Variables

All secrets are required. Copy .env.example to .env and fill in every value, or run the setup wizard.

Variable Description
ANTHROPIC_API_KEY Your Anthropic API key (sk-ant-...)
VAULT_TOKEN HashiCorp Vault dev root token
REDIS_PASSWORD Redis auth password
MEMORY_MASTER_KEY 64-char hex key for AES-256 memory encryption

Generate a secure memory key:

python -c "import secrets; print(secrets.token_hex(32))"

Useful Commands

make help                 # Show all available commands

make logs                 # Tail all service logs
make logs-agent           # Tail agent logs only
make health               # Check agent health
make ps                   # Show container status

make chat                 # Send a test message
make audit                # View last 20 audit entries
make memories             # View stored memories
make purge                # Purge all memories (GDPR erasure)

make rebuild              # Force rebuild agent image
make restart              # Restart all services
make shell                # Shell into agent container
make down                 # Stop everything
make clean                # Stop + remove volumes and images

Tech Stack

Component Technology
Agent runtime LangGraph + Anthropic Claude
API FastAPI + nginx
Policy engine Open Policy Agent (OPA)
Secrets HashiCorp Vault
Memory SQLite + AES-256 (Fernet)
Search DDGS
Queue Redis
Containers Docker Compose

Contributing

  1. Fork the repo
  2. Create a branch: git checkout -b feature/my-skill
  3. Commit: git commit -m "Add my skill"
  4. Push: git push origin feature/my-skill
  5. Open a Pull Request

Author

Built by Dilip R Tandekar — AI Solution Architect


The AI agent your security team won't hate.

About

The AI agent your security team won't hate

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages