Zero-Trust Context Security Hypervisor for AI Agents

Deterministic Guardrails for
Autonomous AI Agents

Modern AI agents execute unrestrained bash commands, leak context secrets, and trigger catastrophic pricing cliffs. ctxsec provides hardware-isolated kernel sandboxing, microsecond CEL policy hypervisors, and real-time DLP redaction with zero VM overhead.

1-Click AI Guardrails & MCP Gateway
Zero Config
CLI Alternative: ctx init --agent=vscode
< 5µs
CEL Rule Gating
0ms
VM Startup Overhead
60-90%
Token Cost Pruned
LIVE ENFORCEMENT
1# ctxsec.yaml - Zero-Trust Declarative Agent Role Scoping
2version: "1.0"
3pipeline: "enterprise-agent-bounds"
4
5roles:
6 researcher:
7 network:
8 default: allow
9 allow: ["*.google.com:443", "github.com:443"]
10 filesystem:
11 read: ["."]
12 write: ["local/scratch"]
13 forbidden_tools: ["write_to_file", "replace_file_content"]
14
15 coder:
16 network:
17 default: deny # Physical hardware socket drop
18 filesystem:
19 read: ["."]
20 write: ["pkg", "cmd", "local/scratch", "web"]
Pure static Go binary. Evaluates policies in < 5µs.CGO_ENABLED=0
The Problem With Current Tooling

Why Existing AI Agent Runtimes Fail

Today's AI agent frameworks (Antigravity, Cursor, Claude Desktop, and vanilla MCP) rely on implicit trust. Once tool execution is enabled, the agent has full, unsandboxed host capabilities.

Current Naive AI Runtimes

Implicit Project-Wide Trust
HIGH RISK
The "Click Monkey" Tax

Developers sit clicking manual "Approve" 50 times an hour, or surrender to blanket "Always Allow"—giving every untrusted subagent root-level project permissions.

The Token Bloat Tax

Pages of plain-text prohibitions ("never do X, do not run Y") are injected into LLM prompts on every turn, burning thousands in unnecessary API token bills.

The "Pretend Security" Tax

Politely asking an LLM not to drop tables fails 10-20% under prompt injections, complex reasoning drift, or jailbreaks. Markdown text cannot physically block a syscall.

Result: Human fatigue, token money burn & prompt injection breachesFAIL-OPEN

ctxsec Zero-Trust Hypervisor

Declarative Multi-Plane Gating
HARDENED
True Peace of Mind (Click Monkey Relief)

Per-skill least-privilege declarative boundaries (`ctxsec.yaml`) let developers safely give autonomous agents full execution autonomy without hovering over an approve button.

Automated Prompt De-Bloater (Save 30-70% Tokens)

`ctx skill optimize` distills negative prompt instructions into compile-free Google CEL rules, stripping bloated tokens from every prompt turn and eliminating attention drift.

Kernel & CEL Enforcement (0ms Lag, 0 Hallucinations)

OS kernel sandboxing (Seatbelt / Bubblewrap) and < 5µs CEL policy gates guarantee that dangerous tool calls are physically blocked, regardless of prompt injections.

Result: Maximum agent autonomy, lower API bills & mathematical containmentFAIL-CLOSED
Active Defense Architecture

Multi-Layer Defense Topology

Observe how tool requests travel through the three defense layers. Select an attack scenario below to see real-time hardware containment in action.

Interactive Threat Ingress & Gating Topology
REQIngress PayloadAgent Tool InvocationLatency: 0.0µsTarget: Host OSL1Kernel SandboxmacOS / Linux bwrapVM Lag: 0msPass-throughL2Policy EngineGoogle CEL HypervisorEval: < 5µsPass-throughL3Context & SecretsDLP & CompactorLatency: < 150µsPass-through
TARGET ENFORCEMENT
Hardware OS Kernel Sandbox (Seatbelt / bwrap)
(deny network-outbound) + (deny file-read-data ~/.ssh/*)
LATENCY BUDGET
0.2µs (Hardware Fast-Path)
Single-digit microsecond overhead
VERDICT STATUS
SYSCALL BLOCKED: EPERM
sys_connect(AF_INET, 185.22.x.x:443) -> -1 EPERM
Layer 1 • macOS / Linux
Kernel Sandbox

OS Hardware Isolation

Agent-based config and guardrails on hyper-fast hardware kernel level. Enforced via macOS Apple Seatbelt and Linux Bubblewrap to physically drop rogue sockets and isolate the filesystem with 0ms VM overhead.

Hardware-level syscall containment
Docs
Layer 2 • AST Hypervisor
Policy Engine

Google CEL Hypervisor

Google Common Expression Language hypervisor evaluating per-agent role attenuation and tool gating in < 5µs. Declaratively ensures read-only subagents cannot execute mutating bash commands.

< 5µs compile-free policy gating
Docs
Layer 3 • DLP & Compactor
Context & Secrets

DLP & Token Compactor

Guards context and tokens against prompt explosion while scrubbing sensitive data, API secrets, and PII before prompts leave your laptop. Eliminates token waste and pricing cliffs.

Zero model secret leakage & 60-90% compaction
Docs
Platform Capabilities

Engineered for Zero Overhead & Total Control

Every capability is delivered as an importable Go package, a CLI command, and a strongly-typed MCP tool.

Zero-CGo Static Go

Compiled strictly with CGO_ENABLED=0. Runs as a single static binary with no external runtime dependencies and sub-millisecond execution.

pkg/sandbox0ms Startup

Google CEL Hypervisor

Google Common Expression Language policy engine evaluates AST facts, caller roles, and session budgets compile-free in under 5µs.

pkg/policy< 5µs Latency

Ed25519 Cryptographic Trust

Every downloaded skill, manifest, and agent envelope is cryptographically signed and verified. Prevents tampered community tooling.

pkg/registry • pkg/a2aZero-Trust

Token Pricing Cliff Defense

Prunes whitespace, compresses repetitive tool outputs, and slices context before reaching the 128k/200k provider pricing cliffs.

pkg/tokens60-90% Savings

Tamper-Evident Audit Ledger

Embedded SQLite audit ledger records every syscall verdict, policy evaluation, and tool trajectory for complete post-incident forensics.

pkg/backlog • local/*.sqliteImmutable

Universal MCP Gateway

Transparent stdio proxy gating all Model Context Protocol requests. Works seamlessly with Antigravity, Cursor, Claude Desktop, and VS Code.

cmd/mcp-server • cmd/ctxUniversal
Interactive Policy Hypervisor

Live Google CEL Policy Engine

Test how declarative Common Expression Language rules intercept dangerous actions in microsecond runtime.

cel.dev/cel-go v0.32.0
Hypervisor VerdictNative Go Evaluator
Click “Evaluate Security Policy” to test the CEL expression.
Google CEL EngineSafe & Compile-Free
Ed25519 Cryptographic Trust

Module Registry & Capabilities

Discover, verify, and install verified security modules with signed provenance and zero-trust envelopes.

@ctxsec/sandbox-kernel1.0.0
Verified: ed25519:6c2a...f901

0ms in-kernel OS containment for macOS (Apple Seatbelt) and Linux (Bubblewrap). Drops sockets without Docker overhead.

sandbox_inspect_profilesandbox_detect_engine
License: Apache-2.0
@ctxsec/context-optimizer1.0.0
Verified: ed25519:7a4f...e89b

Universal token and cost compactor: 128k pricing cliff prevention, whitespace compaction, and multi-tier router.

tokens_compacttokens_route_tasktokens_evaluate_clifftokens_circuit_check
License: Apache-2.0
@ctxsec/guard-pii1.0.0
Verified: ed25519:3b19...fa02

Zero-allocation Shannon entropy secret scanner and Luhn credit card, SSN, and email redaction.

guard_scanguard_redactguard_redact_piiguard_mask_tools
License: Apache-2.0
@ctxsec/a2a-envelopes1.0.0
Verified: ed25519:9f40...11bc

Zero-Trust Ed25519 signed delegation envelopes, 3-step X25519 ECDH mutual handshake, and key rotation.

a2a_signa2a_verifya2a_handshake_inita2a_handshake_respond
License: Apache-2.0
Cross-Tool Protection

Universal MCP Gateway Setup

Transparently intercepts, gates, and isolates tools across any AI developer environment.

1// .agents/hooks.json (Antigravity CLI & IDE PreToolUse Interception)
2{
3 "ctxsec-guard": {
4 "enabled": true,
5 "PreToolUse": [
6 {
7 "matcher": "run_command|write_to_file|replace_file_content",
8 "hooks": [
9 {
10 "type": "command",
11 "command": "ctx hook --format=antigravity",
12 "timeout": 5
13 }
14 ]
15 }
16 ]
17 }
18}
1-Click Protocol Deep Link: Trigger instant IDE install dialog via OS handler