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.
ans_state_manager.rs
- Autonomous Nervous System state managementcapability_issuer.rs
- Capability token issuance and managementvagal_brake.rs
- Braking mechanism implementationreflex_arc.rs
- Reflex arc rapid response
gateway/
Rust device-side gateway connecting blockchain with physical/digital executors. Handles event monitoring, Afferent Evidence reporting, Vagal Tone Index calculation.
- 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
oracle/
Rust Tone Oracle service calculating Vagal Tone Index and updating ANS state. Uses decentralized architecture to ensure computational reliability and censorship resistance.
- Multi-source evidence fusion algorithms
- axum asynchronous web framework
- Horizontal scaling support
- Cryptographically secure state proofs
planner/
Python planner tools for intent generation, Schema parsing, EIP-712 signing. Provides high-level APIs for easy integration into LLM workflows.
- pydantic data validation and serialization
- web3.py blockchain integration
- EIP-712 structured data signing
- REST API and GraphQL interfaces
schemas/
YAML/JSON schemas & policies defining executor action specifications and safety rules. Includes standardized configurations for robotic arms, drones, and other devices.
actions.yaml
- Executor action definitionspolicy.yaml
- Safety rules and constraints- Python code generators
- Version control and backward compatibility
infra/
Infrastructure components including Dockerfiles and development environment scripts. Provides one-click deployment and local development support.
anvil.sh
- Local chain startup scripts- Docker containerization configuration
- CI/CD pipeline configuration
- Development environment automation
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 |