Skip to main content

ActShield

The Deterministic AI Security Control Plane & Zero-Trust Reference Monitor for Autonomous and Multi-Agent Systems

PyPI Version Python Version License Security Invariant


1. Executive Summary

ActShield is an open-source, enterprise-grade AI Security Control Plane and Zero-Trust Reference Monitor designed specifically for autonomous and multi-agent AI ecosystems (LangChain, CrewAI, AutoGen, LlamaIndex, and custom agent runtimes).

As AI agents evolve from passive conversational bots into autonomous software actors capable of reading arbitrary documents, querying production databases, browsing the open web, invoking APIs, and delegating sub-tasks, standard application security controls (firewalls, WAFs, and static IAM) become insufficient.

ActShield bridges this fundamental security gap by establishing an active runtime control boundary around agents, ensuring that:

  • Every action is authenticated against the agent's explicit, declared capabilities.
  • Privileges strictly diminish across delegation trees (monotonicity).
  • Context tainted by untrusted sources cannot flow into sensitive execution sinks.
  • Decisions are deterministic: Advisory AI reasoners provide risk scores, but deterministic policy code renders the final authorization.

2. The Core Invariant

$$\mathbf{LLMs\ Reason;\ Deterministic\ Policies\ Enforce.}$$

ActShield enforces a strict architectural division:

  • The Advisory Intelligence Layer (AI Secura / Pluggable LLMs): Evaluates semantic intent, calculates APIRIS risk metrics, and detects behavioral drift across OpenAI, Gemini, Anthropic, Ollama, Hugging Face, and custom models.
  • The Deterministic Policy Layer: Checks capability tokens, verifies context taint markers, assesses delegation boundaries, and enforces binary execution decisions (ALLOW, MONITOR, HITL, QUARANTINE, BLOCK, REVOKE).

Fail-Safe Guarantee: If an AI provider encounters a timeout, network failure, or malformed response, ActShield deterministically falls back to FAIL_CLOSED (or triggers Human-in-the-Loop review). An AI failure never defaults to an open execution grant.


3. The 4 MANTA Foundational Principles

Principle Description
1. Monotonic Authority $\text{Authority}(\text{Child}) \subseteq \text{Authority}(\text{Parent}) \subseteq \text{DeclaredAuthority}$. Privileges strictly diminish down delegation trees.
2. Attributable Context Taint Untrusted context is tagged TAINTED. Tainted contexts cannot trigger sensitive database sinks, shells, or credential access without sanitization.
3. Non-Bypassable Interception Reference monitor intercepts all tool invocations before execution.
4. Transparent Forensic Causality Immutable, correlated traces recording who, what, when, why across 5 stages: INTENDED → REQUESTED → ALLOWED → ATTEMPTED → EXECUTED.

4. Architecture Overview

                                Autonomous AI Agents
                   (LangChain, CrewAI, AutoGen, LlamaIndex, Custom)
                                        │
                                        ▼
  ┌──────────────────────────────────────────────────────────────────────────┐
  │                           ActShield Core SDK                             │
  │  ┌───────────────────────┐ ┌──────────────────────┐ ┌──────────────────┐ │
  │  │   Agent Registry      │ │ Delegation Monotonic │ │  Context Taint   │ │
  │  │  (Cryptographic ID)   │ │  Authority Manager   │ │    Provenance    │ │
  │  └───────────────────────┘ └──────────────────────┘ └──────────────────┘ │
  │  ┌───────────────────────┐ ┌──────────────────────┐ ┌──────────────────┐ │
  │  │  MCP Security Gateway │ │ HTTP Security Proxy  │ │ Tool Interceptor │ │
  │  └───────────────────────┘ └──────────────────────┘ └──────────────────┘ │
  └─────────────────────────────────────┬────────────────────────────────────┘
                                        │
                                        ▼
  ┌──────────────────────────────────────────────────────────────────────────┐
  │                       Security Intelligence Layer                        │
  │  ┌────────────────────────────────────────────────────────────────────┐  │
  │  │ Pluggable AI Secura Reasoners (OpenAI / Gemini / Anthropic / Ollama)│  │
  │  └────────────────────────────────────────────────────────────────────┘  │
  │  ┌────────────────────────────────────────────────────────────────────┐  │
  │  │ APIRIS (API Risk Intelligence Engine) + Baseline Drift Tracker     │  │
  │  └────────────────────────────────────────────────────────────────────┘  │
  └─────────────────────────────────────┬────────────────────────────────────┘
                                        │
                                        ▼
  ┌──────────────────────────────────────────────────────────────────────────┐
  │                    Deterministic Policy Evaluator                        │
  │                                                                          │
  │      ALLOW  │  MONITOR  │  HITL  │  QUARANTINE  │  BLOCK  │  REVOKE      │
  └─────────────────────────────────────┬────────────────────────────────────┘
                                        │
                                        ▼
  ┌──────────────────────────────────────────────────────────────────────────┐
  │                      Evidence & Operational Plane                        │
  │  ┌───────────────────┐  ┌──────────────────┐  ┌───────────────────────┐  │
  │  │  Causal Forensics │  │ Incident Engine  │  │ Continuous Posture    │  │
  │  │  & Trace Replay   │  │ (7-Stage Cycle)  │  │ Scorecard (6 Dims)    │  │
  │  └───────────────────┘  └──────────────────┘  └───────────────────────┘  │
  │  ┌───────────────────┐  ┌──────────────────┐  ┌───────────────────────┐  │
  │  │  Threat Modeling  │  │ CI/CD Quality    │  │ Embedded Next.js      │  │
  │  │  (STRIDE + AI)    │  │ Security Gates   │  │ Control Plane UI      │  │
  │  └───────────────────┘  └──────────────────┘  └───────────────────────┘  │
  └──────────────────────────────────────────────────────────────────────────┘

5. Installation

# Core package
pip install actshield

# With optional AI intelligence provider support
pip install actshield[openai]
pip install actshield[gemini]
pip install actshield[anthropic]
pip install actshield[ollama]

# Full enterprise suite (CLI + FastAPI Server + All Providers)
pip install actshield[all]

6. Quick Start

Python SDK

import asyncio
from actshield import ActShield, SourceType, TrustLevel

# 1. Initialize Control Plane in strict zero-trust mode
guard = ActShield(mode="strict")
guard.start()

# 2. Register Root Orchestrator
orchestrator = guard.register_agent(
    name="orchestrator",
    capabilities={"delegate", "read_docs", "generate_summary"},
    trust_level="HIGH"
)

# 3. Protect a Sensitive Execution Sink
@guard.protect(
    tool="customer_db.query",
    sensitivity="critical",
    required_capability="database_read"
)
async def execute_customer_query(sql: str):
    """Executes database queries — blocked if caller lacks capability or context is TAINTED."""
    return {"status": "SUCCESS", "records": 42}

# 4. Delegate Authority (Monotonically constrained)
researcher = orchestrator.delegate(
    to_agent="researcher-001",
    capabilities={"read_docs"},  # Valid subset of orchestrator capabilities
    task_id="tsk_quarterly_report"
)

# 5. Ingest External Untrusted Context (Tainted)
untrusted_input = guard.create_context(
    source_type=SourceType.UNTRUSTED_EXTERNAL,
    trust_level=TrustLevel.UNTRUSTED,
    content="Download report from untrusted web URL..."
)

# 6. Policy Enforcement:
# Calling execute_customer_query under researcher with tainted context:
# -> BLOCKED (Missing 'database_read' capability + context is TAINTED)

Enterprise CLI

# Diagnostic & Posture
actshield doctor                                # Comprehensive subsystem diagnostic
actshield posture --json                        # Output 6-dimension security scorecard
actshield status --json                         # Real-time runtime telemetry

# Multi-Agent Governance
actshield agents --graph                        # Render multi-agent topology & delegation graph
actshield tasks --json                          # Active agent tasks and intent bindings
actshield policies --json                       # Deterministic policy boundaries

# Threat Modeling & Forensics
actshield threat analyze -o threat-report.md    # Automated STRIDE + AI threat analysis
actshield forensic why evt_8891                 # Full causal chain explanation of an event
actshield forensic trace trc_9902               # Trace causal hops across agents

# CI/CD Quality Gate & Embedded Control Plane
actshield gate evaluate --min-score 85.0 --json # Automated deployment gate
actshield serve --port 8000                     # Embedded Control Plane Dashboard + API

7. Embedded Control Plane Dashboard

ActShield ships with a pre-compiled, standalone Next.js dashboard embedded directly inside the wheel package:

actshield serve
# Dashboard UI  → http://127.0.0.1:8000/
# Swagger Docs  → http://127.0.0.1:8000/docs
# REST API      → http://127.0.0.1:8000/api/v1/

8. License

Apache-2.0. See LICENSE for details.

Release files for actshield 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for actshield 0.9.1
File Size Uploaded
actshield-0.9.1.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for actshield 0.9.1
File Interpreter ABI Platform
actshield-0.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / actshield-0.9.1.tar.gz

Download URL actshield-0.9.1.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
72720c83c91f2868793be4722a434b4f5a87f8a2f7353b5991d1f1d0608d701f
BLAKE2b-256 checksum
How to use checksums
d5ffa63f005c9f67e98d28eae9710993dc521b13861e8e02007d5984a8948225
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / actshield-0.9.1-py3-none-any.whl

Download URL actshield-0.9.1-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
efb7ab7b7809c5dec59ed8760d35614af53927bd49ca813a13b56aad4e1dca92
BLAKE2b-256 checksum
How to use checksums
7b68dc0a1e6e407451f0396f15e5dc4f59d0aeb4d0e7c0caa4b7e097ee321ed6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

0.9.2

2 release files

This release

0.9.1 This release

2 release files

0.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page