selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Adrian logo

Self-host Adrian

python-sdk-v1.2.1

Runtime security monitoring and control for AI agents

BetaOpen SourceApache-2.0
Updatedlast week
LanguagePython
Setup difficultyAdvanced
Stars
587
CPU
NVIDIA GPU with recent CUDA driver
Storage
~10 GB free disk for the model
Ports
8080 (Go backend WebSocket ingestion and dashboard API), 3000 (Next.js dashboard)
Install with Docker Compose

What is Adrian?

Adrian is an open-source runtime security engine for AI agents. It watches both agent activity logs and reasoning traces to spot malicious or out-of-scope behaviour, and can step in before actions run. The tool catches prompt injection, tool poisoning, data exfiltration, and privilege escalation. It provides Python SDKs for LangChain and Anthropic, a TypeScript SDK for OpenAI, and a native Claude Code plugin. Adrian can be self-hosted offline using Docker Compose with a Go backend, Next.js dashboard, and local Llama.cpp container running a Gemma model. Deployment requires an NVIDIA GPU with CUDA. Licensed under Apache 2.0.

Should you self-host Adrian?

Adrian scores 50/100 on selfhost.directory (how scoring works) and ranks #42 of 78 in Security. It has 587 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. It is Apache-2.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is pentagi (83/100, 32 622 stars). It scores higher overall, so compare the two before you pick. See Adrian vs pentagi side by side.

Features

  • Claude Code plugin
  • Data exfiltration prevention
  • In-flight intervention
  • PII redaction
  • Privilege escalation detection
  • Prompt injection detection
  • Python SDK
  • Reasoning trace analysis
  • Tool poisoning detection
  • TypeScript SDK

Adrian README

How to install Adrian

Install Adrian with Docker Compose

Environment variables
ADRIAN_LLM_URL, ADRIAN_LLM_MODEL_PATH, ADRIAN_LLM_API_KEY, ADRIAN_LLM_MODEL, ADRIAN_LLM_CTX_SIZE, ADRIAN_SLIDING_WINDOW_SIZE, ADRIAN_SLIDING_WINDOW_TTL_SECONDS, ADRIAN_BACKEND_PORT, ADRIAN_DASHBOARD_PORT, ADRIAN_PII_REDACT, ADRIAN_SESSION_SECRET

git clone https://github.com/secureagentics/Adrian cd Adrian

docker compose --profile setup run --rm setup bootstrap

docker compose --profile llm up -d

Requires Docker + Docker Compose v2 and NVIDIA GPU with CUDA driver and NVIDIA Container Toolkit

How to configure Adrian

  • ADRIAN_BACKEND_PORT8080Host-side port for the Go server

    Host-side port for the Go server

  • ADRIAN_DASHBOARD_PORT3000Host-side port for the Next.js dashboard

    Host-side port for the Next.js dashboard

  • ADRIAN_LLM_API_KEYlocal-no-authBearer token for LLM endpoint

    Bearer token for LLM endpoint

  • ADRIAN_LLM_CTX_SIZE8192Llama.cpp context window

    Llama.cpp context window

  • ADRIAN_LLM_MODELlocalModel ID sent in request body

    Model ID sent in request body

  • ADRIAN_LLM_MODEL_PATH/models/gemma-4-E4B-it-Q4_K_M.ggufIn-container path to the GGUF file

    In-container path to the GGUF file

  • ADRIAN_LLM_URLhttp://adrian-llm:8081/v1/chat/completionsClassifier LLM endpoint

    Classifier LLM endpoint

  • ADRIAN_PII_REDACTtrueToggle the SDK-side PII regex sweep

    Toggle the SDK-side PII regex sweep

  • ADRIAN_SESSION_SECRET(generated)Dashboard session-cookie secret

    Dashboard session-cookie secret

  • ADRIAN_SLIDING_WINDOW_SIZE16Per-agent ring buffer of recent classified turns

    Per-agent ring buffer of recent classified turns

  • ADRIAN_SLIDING_WINDOW_TTL_SECONDS86400TTL for inactive sliding-window entries

    TTL for inactive sliding-window entries

More in Security

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…