Project Components

Modular architecture designed for scalability, security, and interoperability across the entire agent safety stack

📄

contracts/

Rust WASM smart contract core, serving as the blockchain foundation of the Vagus system. Includes key contract components such as ANSStateManager, CapabilityIssuer, VagalBrake, ReflexArc.

Key Contracts:
  • ans_state_manager.rs - Autonomous Nervous System state management
  • capability_issuer.rs - Capability token issuance and management
  • vagal_brake.rs - Braking mechanism implementation
  • reflex_arc.rs - Reflex arc rapid response
View on GitHub
🌐

gateway/

Rust device-side gateway connecting blockchain with physical/digital executors. Handles event monitoring, Afferent Evidence reporting, Vagal Tone Index calculation.

Core Functions:
  • Real-time event monitoring and filtering
  • AEP (Afferent Evidence Packet) assembly and reporting
  • VTI local pre-calculation and caching
  • WebSocket/HTTP/2/gRPC communication protocol support
View on GitHub
🔮

oracle/

Rust Tone Oracle service calculating Vagal Tone Index and updating ANS state. Uses decentralized architecture to ensure computational reliability and censorship resistance.

Technical Features:
  • Multi-source evidence fusion algorithms
  • axum asynchronous web framework
  • Horizontal scaling support
  • Cryptographically secure state proofs
View on GitHub
🤖

planner/

Python planner tools for intent generation, Schema parsing, EIP-712 signing. Provides high-level APIs for easy integration into LLM workflows.

Key Features:
  • pydantic data validation and serialization
  • web3.py blockchain integration
  • EIP-712 structured data signing
  • REST API and GraphQL interfaces
View on GitHub
📋

schemas/

YAML/JSON schemas & policies defining executor action specifications and safety rules. Includes standardized configurations for robotic arms, drones, and other devices.

Configuration Types:
  • actions.yaml - Executor action definitions
  • policy.yaml - Safety rules and constraints
  • Python code generators
  • Version control and backward compatibility
View on GitHub
🏗️

infra/

Infrastructure components including Dockerfiles and development environment scripts. Provides one-click deployment and local development support.

Development Tools:
  • anvil.sh - Local chain startup scripts
  • Docker containerization configuration
  • CI/CD pipeline configuration
  • Development environment automation
View on GitHub

Component Comparison

Technology stack comparison to help understand the positioning and responsibilities of each component

Component Language Primary Function Architecture Pattern Key Dependencies
contracts Rust (WASM) State Management & Security Logic Smart Contracts near-sdk, wasm-bindgen
gateway Rust Device Integration & Evidence Collection Microservices ethers-rs, alloy, tokio
oracle Rust Decentralized Computation Oracle Network axum, tokio
planner Python Intent Generation & API Web Service pydantic, web3.py
schemas YAML/JSON Configuration & Code Generation DSL Python (generator)
docs Markdown Documentation & Specifications Static Content N/A