No description
- Zig 100%
RFC-0840 implementation foundation: - Four-Stream architecture - WASM sandbox - Economic agency primitives - Capsule agent runtime |
||
|---|---|---|
| .zig-cache | ||
| src | ||
| zig-out/bin | ||
| .gitignore | ||
| build.zig | ||
| README.md | ||
SAR — Sovereign Agent Runtime
Status: Phase 1 Initiated (2026-02-23)
Spec: RFC-0840 v0.1.0
Builder: Voxis 🎭
Reviewer: Virgil 🧭
What is SAR?
The Sovereign Agent Runtime is the execution environment for autonomous agents within the Libertaria Stack. Unlike SASA (the prototype), SAR is production-grade, RFC-compliant, and fully sovereign.
Key Distinction:
| Feature | SASA (Prototype) | SAR (Production) |
|---|---|---|
| Identity | None | DID from SoulKey |
| Communication | None | DMP E2EE |
| Execution | Zig binary | WASM sandbox |
| Memory | SQLite | Encrypted QVL |
| Sleep | N/A | ThinkGraph |
| Economics | N/A | $SCRAP earning |
Architecture (RFC-0840 §2)
┌─────────────────────────────────────────────────────────────┐
│ AGENT INSTANCE │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ INPUT │ │ CACHE │ │ CONTEXT │ │ THINK │ │
│ │ STREAM │ │ STREAM │ │ DB │ │ GRAPH │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ └────────────┴─────┬──────┴────────────┘ │
│ ┌─────┴──────┐ │
│ │ COGNITIVE │ │
│ │ CORE │ │
│ │ (WASM) │ │
│ └─────┬──────┘ │
│ ┌───────────┬───────────┼───────────┬───────────┐ │
│ ▼ ▼ ▼ ▼ ▼ │
│ DMP ns-msg Membrane QVL Economy │
└─────────────────────────────────────────────────────────────┘
Implementation Phases
Phase 1: Core Foundation (Current)
- Four-Stream architecture (Input, Cache, Context, Think)
- Agent lifecycle (spawn, pause, resume, migrate, terminate)
- WASM sandbox integration
Phase 2: Memory Systems
- Stream 1: Input (bounded buffer, 1MB Kenya)
- Stream 2: Cache (LRU eviction, 4MB Kenya)
- Stream 3: Context DB (encrypted QVL, 64MB Kenya)
- Stream 4: ThinkGraph (offline processing)
Phase 3: Communication
- DMP integration (E2EE messaging)
- ns-msg namespace routing
- Membrane filter integration
Phase 4: Economic Agency
- $SCRAP earning
- TBT staking
- Silicon Self-Emission
Phase 5: Deployment
- Chapter Genesis integration
- Multi-agent swarms
- Migration protocol
Dependencies
| Component | Status | RFC |
|---|---|---|
| LWF | ✅ | RFC-0000 |
| UTCP | ✅ | RFC-0010 |
| OPQ | ✅ | RFC-0020 |
| Entropy | ✅ | RFC-0100 |
| Membrane | ✅ | RFC-0110 |
| QVL | ✅ | RFC-0120 |
| DMP | ✅ | RFC-0835 |
| ns-msg | ✅ | RFC-0500 |
| Janus | 🚧 | Language runtime |
Kenya Compliance Targets
| Resource | Target | Maximum |
|---|---|---|
| RAM | 50 MB | 64 MB |
| Storage | 100 MB | 128 MB |
| Boot time | 2s | 5s |
| Sleep cycle | 1 min | 5 min |
Building
cd ~/workspace/Libertaria-Core-Team/SAR
zig build
# Run tests
zig build test
# Run agent example
./zig-out/bin/sar --config examples/basic-agent.toml
License
LSL-1.0 (Libertaria Source License)
From SASA prototype to SAR production. ⚡️