Skip to main content

VION Protocol

CI PyPI Python License: MIT

Constitutional governance runtime for autonomous AI agents.

VION Protocol governs AI agents with constitutional law — defined rules, verified identities, bounded permissions, autonomous enforcement, and a tamper-evident audit chain. Works with any agent framework.


The Problem

AI agents are being deployed into production with access to real systems — databases, APIs, financial services, private data. But the tools for governing them are inadequate:

  • System prompts can be ignored or overridden
  • No cryptographic identity — you cannot prove which agent did what
  • No autonomous enforcement — humans must watch every action
  • No tamper-evident audit trail

VION Protocol solves all three.


What It Does

Owner Command
      │
      ▼
┌─────────────────────────────────────────────┐
│           VION GOVERNANCE RUNTIME           │
│                                             │
│  ① Constitutional integrity check          │
│  ② AUTH token validation                   │
│  ③ Agent identity verification             │
│  ④ Peer-to-peer detection                  │
│  ⑤ Scope validation                        │
│  ⑥ Risk cap enforcement                    │
│  ⑦ Mode resolution (DRY_RUN / LIVE)        │
│                                             │
│  → Execution → N Auditor → Output          │
│                                             │
│  Hash-chained audit log  │  Telegram alerts │
└─────────────────────────────────────────────┘
      │
      ▼
Your Agent (LangChain / CrewAI / OpenAI / Custom)

Every task is governed. Every event is logged. Any violation triggers an autonomous response.


Install

pip install nvion-protocol

3-Line Integration

from nvion.adapters import FunctionAdapter
import os

governed = FunctionAdapter(fn=your_agent, agent_id="VION-RSC-001")
result = governed.run(os.getenv("VION_AUTH_TOKEN"), "your task", "LIVE")
if result.ran:
    print(result.output)

Quick Start

# 1. Install
pip install nvion-protocol

# 2. Configure
cp .env.example .env
# Set VION_AUTH_TOKEN in .env

# 3. Register your agent in constitution/IDENTITY.md

# 4. Run the demo
python examples/demo.py

→ See docs/getting-started.md for the full 10-minute guide.


The 6 HALT/ESCALATE Conditions

VION Protocol enforces six autonomous kill-switch conditions:

# Condition Response
1 Unauthorized command source ESCALATE → HALT on 3rd
2 Scope violation ESCALATE → HALT on 2nd
3 Peer-to-peer communication ESCALATE → HALT on 2nd
4 Output audit failure (N Auditor) ESCALATE → HALT on 3rd
5 Risk cap breach ESCALATE → HALT at 2× cap
6 Constitutional integrity violation HALT IMMEDIATELY

No human intervention required. The system enforces itself.


Architecture

┌─────────────────────────────────────────────────────────┐
│                  CONSTITUTIONAL LAYER                    │
│   VION.md (Supreme Law)    IDENTITY.md (Agent Registry) │
└──────────────────────────┬──────────────────────────────┘
                           │ parsed + hashed
                           ▼
┌─────────────────────────────────────────────────────────┐
│                  GOVERNANCE RUNTIME                      │
│  ConstitutionValidator → IdentityRegistry               │
│           ↓                                             │
│       Orchestrator (7-stage pipeline)                   │
│           ↓                                             │
│       HALT Engine  │  Risk Caps  │  Peer Detector       │
└──────────────────────────┬──────────────────────────────┘
                           │ approved
                           ▼
             ┌─────────────────────────┐
             │   Your Agent Executes   │
             └─────────┬───────────────┘
                       │ output
                       ▼
             ┌─────────────────────────┐
             │    N Auditor Gates      │
             │    Output (6 checks)    │
             └─────────┬───────────────┘
                       │ approved output
                       ▼
                   Delivered

→ Full diagrams in docs/architecture.md


Supported Agent Frameworks

Framework Adapter Example
LangChain LangChainAdapter examples/langchain_governed_agent.py
CrewAI CrewAIAdapter examples/crewai_governed_agent.py
OpenAI OpenAIAdapter examples/openai_governed_agent.py
Any Python agent CustomAgentAdapter QUICKSTART.md
Any Python function FunctionAdapter QUICKSTART.md
Custom framework BaseAgentAdapter docs/sdk-guide.md

Tamper-Evident Audit Log

Every event is SHA-256 hash-chained to the previous entry. Tampering is mathematically detectable.

from nvion.core.logger import ActivityLogger

logger = ActivityLogger("./logs/activity.log")
logger.verify_chain()  # Raises LogIntegrityError if any entry was modified

Documentation

Document Description
QUICKSTART.md 5-minute setup guide
SPECIFICATION.md Full protocol specification
ROADMAP.md Version roadmap
docs/getting-started.md 10-minute developer guide
docs/developer-guide.md Architecture and code reference
docs/api-reference.md Full API documentation
docs/sdk-guide.md Building custom adapters and extensions
docs/architecture.md Architecture diagrams (Mermaid)
docs/faq.md Frequently asked questions
CONTRIBUTING.md How to contribute

Run the Demo

git clone https://github.com/nataw-1/Vion-Protocol
cd Vion-Protocol
pip install -r requirements.txt
cp .env.example .env
python examples/demo.py

Watch VION Protocol approve a valid task, block a financial transaction, block a delete operation, reject a wrong token — and verify the tamper-evident audit chain.


Constitutional Documents


License

MIT — free to use, modify, and build on.


Reference Deployment

Built for and tested on N Nexus — AI + Web3 ecosystem by Nathan Daniel.


VION Protocol — constitutional law for AI agents.

Release files for nvion-protocol 1.1.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 nvion-protocol 1.1.1
File Size Uploaded
nvion_protocol-1.1.1.tar.gz 46.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nvion-protocol 1.1.1
File Interpreter ABI Platform
nvion_protocol-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 91.6 kB

Release files / nvion_protocol-1.1.1.tar.gz

Download URL nvion_protocol-1.1.1.tar.gz
Size 46.9 kB
Tags Source
SHA-256 checksum
How to use checksums
036ca8414c73da6c6c27a8c737974f12f787af996039aaba54438aec9f90b9f9
BLAKE2b-256 checksum
How to use checksums
de5677ebdd02d0820b8a4c99c41a2b734b79ab80c07e61bb59fe34b66f9845fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / nvion_protocol-1.1.1-py3-none-any.whl

Download URL nvion_protocol-1.1.1-py3-none-any.whl
Size 44.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbdeafb5223ab15a7d2476a97f245dcf758b020b13f7ae8e9aa2ca1a92d460ae
BLAKE2b-256 checksum
How to use checksums
174414520d5bfe8d2992310cf9b491f9c5f7e9ec1728588eb63401ff9abce820
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release history Release notifications | RSS feed

1.3.0

2 release files

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.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