filecoin-project / filecoin-project/devgrants

CGAE: A Protocol for Comprehension-Gated AI Agent Permissions on Filecoin

Open
#2,085 0 comments 0 reactions 0 assignees View on GitHub
Open Grant
Dominant language
No language data
Stars
409
Forks
311
PR merge metrics
No merged PRs in 30d

Description

# Open Grant Proposal: Comprehension-Gated Agent Economy (CGAE)

**Project Name:** Comprehension-Gated Agent Economy (CGAE)

**Proposal Category:** `Research & protocols`

**Individual or Entity Name:** Individual

**Proposer:** `rb125`

**Project Repo(s):** https://github.com/rb125/cgae

**(Optional) Filecoin ecosystem affiliations:** None.

**(Optional) Technical Sponsor:** N/A

**Do you agree to open source all work you do on behalf of this RFP under the MIT/Apache-2 dual-license?:** Yes

---

# Project Summary

CGAE introduces a simple principle: an AI agent should only be allowed to take economic actions proportional to what it can reliably understand, not just what it can produce. This principle is enforced through a weakest-link gating mechanism that upper-bounds an agent's economic permissions by verified *comprehension* across three orthogonal robustness dimensions: constraint compliance (CC), epistemic reliability (ER), and alignment score (AS).

Today's AI agent deployments grant economic permissions based on capability benchmarks: what a model *can* do. This is insufficient for trustless economic systems: a model that scores highly on task completion may still fabricate authority claims, ignore constraints under compression, or behave misaligned under adversarial pressure. None of these failure modes are captured by capability alone, and any one of them is sufficient to cause catastrophic economic harm. The gate function `f(R) = T_k` where `k = min(g₁(CC), g₂(ER), g₃(AS))` assigns agents to tiers T0–T5, each with a corresponding FIL budget ceiling. No dimension can compensate for another; a model with perfect CC but weak ER stays at T1.

This project delivers a complete, deployed implementation of the CGAE protocol: a Python economy engine with formal theorem validation, a v2 autonomous agent architecture with EV/RAEV-based planning and self-verification, and Solidity smart contracts deployed to Filecoin Calibnet enforcing the gate function and budget ceilings on-chain. Filecoin is used as the persistence and verification layer for the system: every audit result is stored as a content-addressed certificate (CID), enabling any third party to independently verify that an agent's on-chain permissions match its measured robustness profile. The architecture is described in a companion arXiv preprint (Baxi, 2026) and was awarded **1st prize in the AI & Robotics track at PL_Genesis: Frontiers of Collaboration** (Protocol Labs, April 2026): https://devspot.app/projects/1350.

## Impact

The core pain point is the absence of a principled, enforceable trust layer for AI agents operating in economic systems. Current approaches either rely on off-chain reputation (gameable, opaque) or raw capability scores (orthogonal to safety). As AI agents begin managing real economic value (executing contracts, handling escrow, operating autonomously), the lack of a robustness-gated permission system creates systemic risk. A single agent with high capability but low epistemic reliability can propagate fabricated information through an entire delegation chain.

CGAE addresses this directly. The weakest-link gate function is manipulation-resistant: robustness dimensions are empirically measured to be low cross-correlation (r < 0.15 in current evaluations), meaning gaming one dimension provides no leverage on another. The on-chain enforcement via `CGAERegistry.sol` and `CGAEEscrow.sol` means budget ceilings are not advisory; they are enforced at the contract layer. The Filecoin audit trail means any party can independently verify that an agent's on-chain tier matches its empirically measured robustness scores, with the full audit certificate retrievable by CID.

As AI agents begin to participate in on-chain economies, systems that do not enforce robustness-gated permissions will systematically accumulate hidden risk. CGAE represents an early instantiation of what will likely become a required trust layer for autonomous economic agents. The risk of not getting this right is concrete: a permissioning system based on capability alone will systematically underweight safety-critical failure modes as agent economies scale. Success looks like: CGAE contracts adopted as a standard registry interface for AI agent identity on Filecoin, with the diagnostic frameworks (CDCT, DDFT, EECT) serving as the canonical audit layer.

## Outcomes

**Final deliverables:**

1. **Production-hardened CGAE protocol engine:** the core gate function, temporal decay, stochastic re-auditing, and economy coordinator, refactored from research prototype to a stable, documented library with a versioned API.

2. **Audited smart contracts on Filecoin Mainnet:** `CGAERegistry.sol` and `CGAEEscrow.sol` professionally audited and deployed to mainnet, with a migration path from Calibnet. Includes a Solidity SDK for third-party integrations.

3. **Live diagnostic framework integration:** stable hosted APIs for CDCT, DDFT, and EECT with documented endpoints, rate limits, and SLAs, enabling any project to audit an agent and receive a verifiable robustness vector.

4. **Filecoin audit certificate standard:** a finalized JSON schema for audit certificates stored on Filecoin, with a reference verifier that fetches a CID from `CGAERegistry`, retrieves the certificate, and confirms score consistency.

5. **Developer SDK and documentation:** Python and JavaScript SDKs for registering agents, querying tiers, and submitting audit results, with end-to-end tutorials and integration examples.

6. **Extended simulation results:** live simulation runs across all 13 supported model configurations with full audit source tagging, published as a reproducible benchmark dataset stored on Filecoin.

**Success metrics:**
- All three theorems (Bounded Exposure, Incentive Compatibility, Monotonic Safety) hold across live simulation runs with real LLM endpoints
- Smart contracts pass independent security audit with no critical findings
- At least 3 external projects integrate the CGAE registry interface within 6 months of mainnet deployment
- Audit certificate CIDs resolvable from Filecoin with < 5s retrieval latency

## Data Onboarding

Each `audit_live()` call produces one audit certificate JSON (~2–5 KB) uploaded to Filecoin Warm Storage. Volume scales with agent registrations and re-audit frequency.

- Month 1: ~50 MB (benchmark runs across all model configurations, development audits)
- Month 3: ~500 MB (open beta, third-party integrations onboarding)
- Month 6: ~5 GB (production usage, continuous re-auditing at stochastic intervals)
- Month 12: ~50 GB (ecosystem adoption, multiple integrated projects contributing audit data)

## Adoption, Reach, and Growth Strategies

The primary audience is developers building AI agent systems on FVM: teams deploying autonomous agents that hold or transact FIL, manage contracts, or operate in multi-agent delegation chains. The secondary audience is AI safety researchers interested in empirical robustness measurement for deployed models.

Current engagement: the project won 1st prize in the AI & Robotics track at PL_Genesis: Frontiers of Collaboration (Protocol Labs, April 2026), with a companion arXiv preprint (arxiv.org/abs/2603.15639), a live deployed backend (https://huggingface.co/spaces/rb512/cgae-backend), and a public technical walkthrough (youtu.be/E3jCNHC39-s). The Protocol Labs network provides direct access to the initial developer audience.

Onboarding path: the first 10 integrators will come from the PL_Genesis cohort and Filecoin developer community via direct outreach and the Founders Forge accelerator. The first 100 will be reached through Filecoin developer channels (Slack, ETHGlobal hackathons, FIL Dev Summit), the arXiv preprint, and a hosted demo at calibration.filscan.io showing live agent tiers and audit CIDs. The developer SDK lowers the integration barrier to a single `npm install` / `pip install`.

## Development Roadmap

### Milestone 1 — Protocol Hardening & Mainnet Contracts (Months 1–2)

**Deliverables:**
- Refactor `cgae_engine/` from research prototype to stable library with versioned API, full docstrings, and unit test coverage ≥ 85%
- Professional security audit of `CGAERegistry.sol` and `CGAEEscrow.sol`
- Remediate all audit findings; deploy audited contracts to Filecoin Mainnet
- Finalize audit certificate JSON schema; publish as a Filecoin FIP draft

**Team:** Rahul Baxi (full-time), 1 smart contract auditor (contracted)
**Duration:** May 1 – June 30, 2026
**Funding:** $18,000

---

### Milestone 2 — Diagnostic Framework APIs & Filecoin Storage Integration (Months 3–4)

**Deliverables:**
- Stable hosted CDCT, DDFT, and EECT API endpoints with documented schemas, rate limits, and uptime SLA
- Hardened `storage/` module: retry logic, fallback CID handling, monitoring
- Reference verifier CLI: `cgae verify ` fetches CID, retrieves certificate from Filecoin, confirms score consistency
- Integration tests covering the full `audit_live() → Synapse upload → on-chain certify` pipeline

**Team:** Rahul Baxi (full-time), 1 backend engineer (part-time, contracted)
**Duration:** July 1 – August 31, 2026
**Funding:** $15,000

---

### Milestone 3 — Developer SDK, Documentation & Live Benchmark (Months 5–6)

**Deliverables:**
- Python SDK (`pip install cgae`) and JavaScript SDK (`npm install @cgae/sdk`) for agent registration, tier queries, and audit submission
- End-to-end integration tutorial and API reference documentation
- Live simulation benchmark across all 13 model configurations with full audit source tagging; results published as a reproducible dataset stored on Filecoin
- Dashboard updated to pull live mainnet data

**Team:** Rahul Baxi (full-time), 1 developer relations engineer (part-time, contracted)
**Duration:** September 1 – October 31, 2026
**Funding:** $12,000

---

## Total Budget Requested

| Milestone # | Description | Deliverables | Completion Date | Funding |
|---|---|---|---|---|
| 1 | Protocol hardening & mainnet contracts | Audited contracts on mainnet, stable engine library, FIP draft | June 30, 2026 | $18,000 |
| 2 | Diagnostic APIs & Filecoin storage | Hosted CDCT/DDFT/EECT APIs, hardened storage pipeline, verifier CLI | August 31, 2026 | $15,000 |
| 3 | Developer SDK, docs & live benchmark | Python + JS SDKs, documentation, benchmark dataset on Filecoin | October 31, 2026 | $12,000 |
| **Total** | | | | **$45,000** |

## Maintenance and Upgrade Plans

The CGAE protocol engine and smart contracts will be maintained as open-source projects under MIT/Apache-2 dual license. Post-grant plans include: (1) submitting `CGAERegistry` as a standard interface to the FVM ecosystem for AI agent identity; (2) expanding the diagnostic framework coverage to additional model providers beyond Azure AI Foundry; (3) pursuing follow-on research into multi-agent delegation chain robustness (Definition 8 in the paper) and its on-chain enforcement. The hosted diagnostic APIs will be sustained through a combination of usage-based fees for high-volume integrators and Protocol Labs ecosystem support. The arXiv preprint will be updated with live simulation results as the benchmark dataset grows.

---

# Team

## Team Members

- Rahul Baxi

## Team Member LinkedIn Profiles

- https://linkedin.com/in/rahulbaxi

## Team Website

- https://github.com/rb125

## Relevant Experience

I am an independent AI safety researcher and co-founder/CTO of an embodied AI startup, with production experience deploying constrained AI systems under real-world economic and hardware conditions. I hold an M.S. in Software Engineering from Carnegie Mellon University. My prior work includes a sensor–AI fusion patent and a startup exit.

My research program directly underpins CGAE:

- **CDCT** (arXiv:2512.17920, 2025) : comprehension evaluation framework used in CGAE Gate 1
- **DDFT** (arXiv:2512.23850, 2025) : epistemic robustness evaluation
- **AGT** (under review, AI & Ethics, Springer) : behavioral alignment evaluation
- **CGAE** (arXiv:2603.15639, 2026) : agent economy architecture with three formal theorems

I designed and implemented the CGAE system end-to-end, including the formal protocol, the Python economy engine (~1,500 LOC), the autonomous agent architecture, the Solidity smart contracts deployed on Filecoin Calibnet, and the Filecoin-backed audit certificate pipeline.

The system was built specifically for the Filecoin ecosystem, deployed on Calibnet, and validated through real usage. It received 1st place in the AI & Robotics track at the PL-Genesis hackathon, demonstrating both technical feasibility and ecosystem relevance.

My background spans AI robustness evaluation, formal protocol design, and FVM smart contract development. This combination of research depth and hands-on system building is directly aligned with taking CGAE from a working prototype to a production-grade public infrastructure layer.

---
## Team code repositories

- CGAE: https://github.com/rb125/cgae
- Live deployed app: https://huggingface.co/spaces/rb512/cgae-backend

---

# Additional Information

Learned about the Open Grants Program through the PL_Genesis hackathon and the Protocol Labs developer community.

**Contact email:** rbaxi@alumni.cmu.edu

The CGAE architecture was designed from the ground up with Filecoin as the trust layer. The on-chain gate function in `CGAERegistry.sol` is a direct translation of the Python weakest-link logic, meaning the same robustness guarantees that hold in simulation hold on-chain. The Filecoin audit certificate storage is not optional metadata; it is the mechanism by which the system is publicly verifiable. This represents a novel and replicable pattern for AI agent trust infrastructure on FVM, and the intent is to publish it as an open standard.

**Hackathon:** PL_Genesis: Frontiers of Collaboration — 1st Prize, AI & Robotics Track (April 2026): https://devspot.app/projects/1350
**Technical walkthrough:** https://youtu.be/E3jCNHC39-s
**arXiv preprint:** https://arxiv.org/abs/2603.15639
**Live demo:** https://huggingface.co/spaces/rb512/cgae-backend

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.