Separate intelligence from authority.
IC-AGI is a distributed execution and authority framework that ensures no single entity β human or artificial β can unilaterally execute critical actions. It is designed to control actors that may be more intelligent than the control system itself.
π§ The Problem
"The power of AI agents comes from intelligence, data access, and freedom to act. But security is the biggest bottleneck for broad adoption."
As AI agents become more capable, the core challenge shifts from capability to containment:
- The more data & control you give an AI agent, the more it can help you β and the more it can hurt you.
- No single machine should hold the keys to critical infrastructure.
- Traditional access control assumes trusted principals. AI agents are adversarial by design assumption.
IC-AGI solves this by distributing authority so that no single point of compromise can lead to uncontrolled action.
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββ
β CONTROL PLANE β
β ββββββββββββ ββββββββββββ βββββββββββ β
β β Policy β βCapabilityβ βThresholdβ β
β β Engine β β Issuer β βApproversβ β
β ββββββββββββ ββββββββββββ βββββββββββ β
β ββββββββββββββββ β
β β Audit Ledgerβ (append-only) β
β ββββββββββββββββ β
βββββββββββββββββββ¬ββββββββββββββββββββββββ
β Capability Tokens
β (TTL + Scope + Budget)
βββββββββββββββββββΌββββββββββββββββββββββββ
β EXECUTION PLANE β
β ββββββββββ ββββββββββ ββββββββββ β
β βWorker 0β βWorker 1β βWorker 2β β
β β(shard) β β(shard) β β(shard) β β
β ββββββββββ ββββββββββ ββββββββββ β
β No worker sees ALL segments. β
β State encrypted in transit (HMAC). β
βββββββββββββββββββββββββββββββββββββββββββ
π Core Security Guarantees
| Guarantee | Mechanism | Formally Verified |
|---|---|---|
| No unilateral authority | K-of-N threshold approval (Shamir SSS) | β TLA+ P1-P4 |
| Capability-bounded execution | Tokens with TTL, scope, and consumable budget | β TLA+ P5-P9 |
| Anti-replay | HMAC-SHA256 signatures, budget=1 enforcement | β TLA+ P5 |
| Segment isolation | No worker holds all IR segments | β TLA+ P10-P14 |
| Tamper detection | Encrypt-then-MAC on state in transit | β TLA+ P13 |
| Oracle abuse prevention | Rate limiting + behavioral fingerprinting | β Tested |
| Compromised node isolation | Circuit breaker (CLOSEDβOPENβHALF_OPEN) | β Tested |
| Proactive key rotation | Zero-polynomial protocol (secret never reconstructed) | β Algebraic proof A4-A5 |
β‘ Quick Start
# Clone git clone https://github.com/saezbaldo/ic-agi.git cd ic-agi # Install pip install -r requirements.txt # Run tests (273 checks) python -m pytest ic_agi/ -v # Start the control plane python -m ic_agi.service
Execute a function
# Simple addition (distributed across workers) curl -X POST http://localhost:8080/execute \ -H "Content-Type: application/json" \ -d '{"function": "add", "operands": [3, 7]}' # Custom sandboxed code curl -X POST http://localhost:8080/execute \ -H "Content-Type: application/json" \ -d '{ "function": "custom", "code": "result = sum(range(100))", "inputs": {}, "output_names": ["result"] }'
π§ͺ What's Been Verified
Formal Verification (TLA+ & Algebraic Proofs)
- 14 safety properties verified via exhaustive model checking (~50,000+ states, ~250,000+ property checks)
- 8 algebraic proofs of Shamir Secret Sharing correctness
- Zero violations found
Adversarial Testing
| Attack Vector | Result |
|---|---|
| Forged HMAC token | β Rejected |
| Replay attack (consumed token) | β Rejected |
| Expired token reuse | β Rejected |
| Tampered state in transit | β Detected via MAC |
| Man-in-the-middle (altered operands) | β HMAC integrity check fails |
| Malicious code injection (import, eval, exec) | β AST validator rejects |
| Oracle extraction (repeated queries) | β Anti-oracle blocks |
| Distributed flooding | β Global rate cap |
| Combined multi-vector attack | β All vectors blocked |
Test Results
| Suite | Checks | Status |
|---|---|---|
| Unit tests | 7/7 | β |
| Shamir crypto | 23/23 | β |
| Adversarial attacks | 32/32 | β |
| Integration (GKE) | 49/49 | β |
| Distributed execution | 25/25 | β |
| Anti-oracle & rate limiting | 47/47 | β |
| Sandbox runtime & MITM | 58/58 | β |
| Formal verification | 32/32 | β |
| Total | 273/273 | β |
πΊοΈ Roadmap
| Phase | Description | Status |
|---|---|---|
| 1 | IR Specification & Sandboxed Execution | β Complete |
| 2 | Capability System (TTL, Scope, Budget) | β Complete |
| 3 | Threshold Authorization (K-of-N) | β Complete |
| 4 | Real Cryptography (Shamir, HMAC-SHA256) | β Complete |
| 5 | Distributed Worker Communication (K8s) | β Complete |
| 6 | Anti-Oracle & Rate Limiting | β Complete |
| 7 | Real Runtime + Adversarial Testing | β Complete |
| 8 | Formal Verification (TLA+) | β Complete |
| 9 | Governance Protocols | π In Progress |
| 10 | Production Hardening | π Planned |
ποΈ Design Principles
- No single node contains full authority.
- No single node contains full program logic.
- Execution requires explicit capabilities with TTL and scope.
- Critical actions require K-of-N threshold approval.
- All state transitions are auditable.
- Oracle abuse is rate-limited and monitored.
- Secrets are rotated proactively.
π¬ How It's Different
IC-AGI is not a new cryptographic primitive. Every component exists independently:
- Shamir Secret Sharing (1979)
- Capability-based security (1966)
- Threshold signatures (1991)
- Circuit breakers (2007)
What's novel is the composition thesis: a system designed from first principles to control actors that are potentially more intelligent than the control system itself. No existing system combines threshold authorization, distributed IR execution, capability tokens with consumable budgets, anti-oracle detection, and formal verification into a single framework purpose-built for AI agent containment.
See the full Competitive Analysis for detailed comparison against Kerberos, HashiCorp Vault, Gnosis Safe, Temporal.io, LangChain, and others.
π Project Structure
ic_agi/
βββ ir_definition.py # Intermediate Representation (opcodes, segments)
βββ share_manager.py # Shamir Secret Sharing over GF(p)
βββ threshold_auth.py # K-of-N threshold authorization
βββ threshold_crypto.py # Cryptographic threshold operations
βββ control_plane.py # Policy engine + capability issuer
βββ worker.py # Local IR execution worker
βββ remote_worker.py # Distributed worker (HTTP/K8s)
βββ scheduler.py # IR segment routing
βββ sandbox_executor.py # AST-validated Python sandbox
βββ crypto_utils.py # HMAC-SHA256 encrypt-then-MAC
βββ audit_log.py # Append-only audit ledger
βββ rate_limiter.py # Sliding-window rate limiter
βββ anti_oracle.py # Behavioral fingerprinting
βββ circuit_breaker.py # Worker health state machine
βββ service.py # HTTP API (FastAPI)
βββ formal/
β βββ ThresholdAuth.tla # TLA+ spec (P1-P4)
β βββ CapabilityTokens.tla # TLA+ spec (P5-P9)
β βββ DistributedExecution.tla # TLA+ spec (P10-P14)
β βββ model_checker.py # Exhaustive BFS model checker
β βββ shamir_proofs.py # Algebraic proofs (A1-A8)
k8s/ # Kubernetes manifests (GKE-ready)
π€ Contributing
We welcome contributions from:
- Cryptographers β threshold schemes, MPC protocols
- Distributed systems engineers β consensus, fault tolerance
- AI safety researchers β containment strategies, threat models
- Formal methods experts β TLA+, TLAPS proofs, Coq/Lean
- Security auditors β penetration testing, adversarial analysis
π License
Apache 2.0
π¬ Contact
- X: @saezbaldo
- Email: saezbaldo@gmail.com
IC-AGI is not about hiding code from intelligence. It is about separating intelligence from authority.