Transaction intent verification for Solana AI agents.
Graphite sits between an AI agent's intent and the wallet's execution. It verifies that a constructed transaction actually does what was declared — with a falsifiable confidence score, staying accurate as protocols evolve.
Core verification engine (Rust):
- 8-layer verification pipeline: Account Resolution → Transaction Construction → Risk → Confidence → Policy → Unknown Protocol Mode
- 11 seed protocol manifests (10 + legacy Memo) (System, SPL Token, Token-2022, Stake, Raydium AMM V4, Squads V4, Jupiter V6, Orca Whirlpools, Meteora DLMM, Memo)
- Risk Engine: 5 P0 patterns (Drainer, AuthorityHijack, HiddenTransfer, UnexpectedCpi, FakeSwap)
- Unknown Protocol Mode with hard confidence ceiling
- Benchmark: 18 cases, 100% precision/recall, ~25μs avg latency
Consumer surfaces:
- TypeScript SDK + Go SDK (full VerificationResult round-trip)
- CLI (Rust, feature-gated)
- Python AI Layer (advisory-only, separate process — P1 compliance)
- Solana Agent Kit integration — code complete with real SAK v2 imports (pending live devnet testing)
630 Rust tests passing (630 Rust + 9 Go + 7 Python), 0 clippy warnings.
# 1. Start Graphite Core
cd graphite-core && cargo run --release --bin graphite -- server --port 7331
# 2. Start AI Layer (separate process)
cd python-ai-layer && python3 intent_parser.py --serve --port 8081
# 3. Run the demo (dry-run)
# SAK integration rebuilt with real solana-agent-kit v2 (pending live devnet test — Phase 2)
npx tsx demo.ts "Swap 0.5 SOL for USDC"The demo shows the full flow:
- AI Layer parses "Swap 0.5 SOL for USDC" → ProposedIntent
- Graphite Core verifies the Jupiter V6 swap → VerificationResult (approved)
- Agent would execute via
agent.methods.trade()(dry-run shows the path)
It also demonstrates the security property — a malicious CPI route is blocked by Graphite (fail-closed per Constitution P12).
cd graphite-core
cargo run --release --bin graphite -- benchmark- Release Evaluation Report — P16 compliant, reproducible
- Architecture — full system design
- Engineering Skill — the skill that builds Graphite
MIT — Copyright Victor Stanley