Sol.College

Structure lesson (licence does not allow quoting code)

Aegis-Private_Solana-AiAgent

Aegis is a framework for private, MEV-resistant agents on Solana. It uses RISC Zero's zkVM for confidential off-chain computation and private relayers for secure on-chain settlement, solving the critical challenges of alpha leakage, front-running and other MEV bot attacks. and other MEV bot attacks.

Original
UdayPandey01/Aegis-Private_Solana-AiAgent
SuperStack fork
Blockchains/Aegis-Private_Solana-AiAgent @ 924ea3e
Stars
5
Last push (original)
2025-10-24
Languages
Rust, TypeScript, Makefile, DTrace, CSS, JavaScript
Detected stack
AnchorNext.jsweb3.js
Categories
AI & AgentsInfrastructure & Tooling
Licence
none detected: code not quoted on Sol.College
Homepage
https://www.aegisprotocol.app

Architecture

117 source files. By extension: .tsx ×70, .ts ×38, .rs ×6, .js ×3.

Top-level directorySource files
frontend82
executor25
zk-agent4
onchain-program3
shared1
mock-relayer1
cli1

On-chain programs: onchain-program/programs/onchain-program

How it works: instructions and accounts

Each instruction handler and the accounts struct it validates, found by reading the Rust source. Links go to the exact line at the pinned commit.

InstructionAccountsSource
depositUpdateVaultonchain-program/programs/onchain-program/src/lib.rs:22
withdrawUpdateVaultonchain-program/programs/onchain-program/src/lib.rs:54
execute_jobExecuteJobonchain-program/programs/onchain-program/src/lib.rs:102

Where the Solana code lives

Source files that import a Solana SDK, ranked by how many Solana APIs they use, with the APIs each one calls. Read them in this order to see how the app talks to the chain.

FileSolana APIs used
executor/src/solana/solana.service.tsPublicKey, transfer, Transaction, findProgramAddressSync, SystemProgram, getLatestBlockhash
frontend/app/app/vault/page.tsxTransaction, PublicKey, getAssociatedTokenAddress, findProgramAddressSync, getAccountInfo, sendTransaction
onchain-program/tests/onchain-program.tsPublicKey, SystemProgram, mintTo, Program, createMint, findProgramAddressSync
onchain-program/programs/onchain-program/src/lib.rsseeds, Program, CpiContext, transfer, Pubkey, has_one
cli/src/submit.tsPublicKey, Program, Keypair, SystemProgram, getAssociatedTokenAddress, Connection
frontend/components/VaultManager.tsxPublicKey, useConnection, useWallet, SystemProgram, signTransaction, AnchorProvider
executor/src/solana/relayer.service.tsTransaction, Connection, sendTransaction
frontend/hooks/useVaultBalance.tsPublicKey, useConnection, useWallet, Program, AnchorProvider, findProgramAddressSync
frontend/app/app/agent/demo/page.tsxtransfer, useWallet, Transaction
zk-agent/host/src/main.rsPubkey
frontend/components/ui/CustomWalletButton.tsxWalletMultiButton, useWallet
executor/src/auth/auth.service.tsPublicKey

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/aegis-private-solana-aiagent/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
executornpm run start
executornpm run build
executornpm run test
executornpm run lint
onchain-programnpm run lint
frontendnpm run dev
frontendnpm run start
frontendnpm run build
frontendnpm run lint
clinpm run test
onchain-programanchor build
onchain-programanchor test
onchain-programanchor run test
.cargo build
.cargo test

What you could build from it