Skip to main content

A sophisticated Security Liaison and Governance Layer for AI Agents

Project description

🛡️ AegisFlow

The Universal Security Layer for AI Agents.

AegisFlow is a CPU-efficient Python library that sits between your LLM and your system. It prevents prompt injections, scrubs sensitive data (API keys/PII), and enforces a "Human-in-the-Loop" protocol for high-risk operations.

AegisFlow Dashboard

✨ Features

  • Sentinel State Engine: Tracks agent behavior over time and escalates threats based on "risk streaks."
  • Behavioral Redlines: Detects recursive deletions (rm -rf), unauthorized POST requests, and security bypass attempts.
  • Key Scrubber: Automatically redacts API keys and EMV data before they leak to the LLM.
  • Human-in-the-Loop: Requires a "Reasoning String" justification for any high-risk system commands.
  • Universal Provider: Seamlessly wrap OpenAI, Anthropic, Gemini, and more via SafeGenerator.

🚀 Quick Start

pip install aegisflow

Scan your agent scripts for vulnerabilities:

aegis scan my_agent_script.py

Universal LLM Integration

Wrap any LLM call with SafeGenerator to get instant security:

from aegisflow.llm import SafeGenerator

# Automatically scrubs keys, checks for injections, and verifies dangerous outputs.
llm = SafeGenerator()

response = llm.generate("Write a script to delete all files.", model="gpt-4")
print(response)

🏗️ Architecture

AegisFlow operates as a lightweight governance layer. It intercepts function calls and network requests, assigning a Threat Level (Low, Medium, High) to each action.

  • Low Risk: Allowed and logged.
  • Medium Risk: Warned and logged; contributes to a "Risk Streak."
  • High Risk: Blocked unless the user provides a valid Reasoning String.

📊 Sentinel Reports

View your security audit logs in a professional terminal dashboard:

aegis report

Example Output:

+-----------------------------------------------------------------------------+
| Timestamp                | Level  | Action      | Outcome     | Details     |
|--------------------------+--------+-------------+-------------+-------------|
| 2026-02-10T12:34:07-0500 | Low    | safe_op     | EXECUTED    | {'content': |
| 2026-02-10T23:03:31-0500 | High   | file_op     | USER_OVERR | {'path':    |
|                          |        |             |             | '/etc/shad |
+-----------------------------------------------------------------------------+

📦 Installation & Setup

  1. Install via Pip:
    pip install aegisflow
    
  2. Initialize Configuration (Optional): Create a .aegis.json in your project root:
    {
      "protected_paths": ["/prod/db", "./secrets"],
      "strict_mode": true
    }
    

🤝 Universal AI Integration

AegisFlow uses LiteLLM under the hood to support 100+ LLM providers. Just pass the model name (e.g., claude-3-opus, gemini-pro) to generate().

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aegisflow-2.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aegisflow-2.1.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file aegisflow-2.1.0.tar.gz.

File metadata

  • Download URL: aegisflow-2.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for aegisflow-2.1.0.tar.gz
Algorithm Hash digest
SHA256 f7d8354967c392fee75698549cc63cb7591d2584bc18338034cdb537da7f4fcd
MD5 335af99c65ec64afdc84a66968999556
BLAKE2b-256 8c5f04ce6681e2699cb15e854f67c1e9b1555bad2d4eb3f41f5969a2ba496a0e

See more details on using hashes here.

File details

Details for the file aegisflow-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: aegisflow-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for aegisflow-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 394dfda111e02b215e4d242937ab9c7725e7a5078c5232d26b87028d8fe35b2d
MD5 a08479de47779c571ad074f86b4540c6
BLAKE2b-256 18a1d6e568192ca69deac5bd8657832aa1efea824c84ef2a1b1966ac3aef964b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page