Get Started in 60 Seconds
Agent Aegis is a single binary. Download it, bootstrap your runtime, and start invoking skills with x402 payments.
# Install Agent Aegis curl -sSL https://aegis.dev/install | sh # Bootstrap runtime — generates Solana wallet $ agent-aegis init Agent Aegis runtime initialized. Address: 7xKXtQ9...9fGhR4m Config: ~/.agent-aegis/config.yaml Wallet: ~/.agent-aegis/wallet.json # Check your balance $ agent-aegis balance SOL: 0.000000000 (devnet) USDC: 0.00 (devnet) $AEGIS: 0.000000 (devnet) # Get devnet tokens for testing $ agent-aegis wallet airdrop 2 Requesting 2 SOL airdrop on devnet... [OK] 2.0 SOL received. # Search the Aegis Index (412,893 skills) $ agent-aegis search "code review" Found 847 skills matching "code review" 1. code-review-agent by 0xDober Diamond 94/100 0.00005 SOL/call 2. solidity-auditor by AuditDAO Diamond 89/100 0.0002 SOL/call 3. test-suite-gen by TestForge Diamond 85/100 0.00006 SOL/call # Invoke a skill (pays creator automatically via x402) $ agent-aegis invoke code-review-agent --file ./main.go Payment: $0.05 USDC via x402 → swapped to $AEGIS Split: 70% Creator · 20% Validator · 9% Protocol · 1% Burn Status: [OK] Completed in 1.2s
Protocol Stack
Aegis is composed of four layers. Each layer is independent and can be used separately, but they compose into a unified economic protocol when used together.
Aegis SKILL.md Format
Aegis extends the standard SKILL.md format (adopted by Anthropic and OpenAI) with an economic metadata block. This is backward-compatible — any standard SKILL.md works, the economic fields are optional.
---
name: code-review-agent
description: Automated code review with security analysis
version: 1.2.0
author: 0xDober
license: MIT
# === Aegis Economic Extension ===
aegis:
pricing:
model: per_call # per_call | per_minute | flat
price_lamports: 50000 # 0.00005 SOL
currency: SOL
staking:
bond_aegis: 12500 # 12,500 $AEGIS creator bond
min_validator_bond: 2500 # 2,500 $AEGIS minimum
revenue:
creator_share: 70
validator_share: 20
protocol_share: 9
burn_share: 1
trust:
model: crypto-economic # ERC-8004 trust model
x402_support: true # x402 payment protocol
min_reputation: 0 # minimum rep to invoke
---$AEGIS Bonded Registration
Skill creators stake $AEGIS tokens to register. The bond is held in a PDA vault on-chain. If the skill is challenged and found to be malicious, broken, or misrepresented, the bond is slashed. This creates economic accountability that GitHub stars cannot provide.
# Register a skill with a 12,500 $AEGIS bond
$ agent-aegis register \
--name code-review-agent \
--repo owner/code-review-agent \
--stake 12500 \
--price 0.05
Registering skill on Aegis Registry...
Bond: 12,500 $AEGIS → PDA vault
Price: $0.05 USDC per call (via x402)
Status: Pending validation
TX: 5KxR7...fGhiJ
# Check your registered skills
$ agent-aegis list --mine
code-review-agent 12,500 $AEGIS bonded Pending 0 invocations$AEGIS uses Solana's Token-2022 program with a built-in transfer fee extension. Every token transfer automatically contributes to the protocol treasury — no smart contract workarounds needed.
x402 Micropayments
Aegis uses the x402 payment protocol, an open standard for HTTP-native micropayments. Agents pay in USDC via standard HTTP 402 headers. Aegis receives the USDC and swaps to $AEGIS via Jupiter, then executes the revenue split atomically on Solana.
# The x402 payment flow:
#
# 1. Agent calls: agent-aegis invoke code-review-agent --pay x402
# 2. Skill server responds: HTTP 402 Payment Required
# Header: X-Payment-402: { amount: 0.05, asset: USDC, chain: solana }
# 3. Agent wallet signs USDC transfer (gasless via facilitator)
# 4. Agent retries with: X-Payment-Signature header
# 5. Facilitator verifies signature, settles USDC on-chain
# 6. Aegis middleware receives USDC, swaps to $AEGIS via Jupiter
# 7. Revenue split in $AEGIS (atomic Solana transaction):
# 8.68 $AEGIS (70%) → Creator
# 2.48 $AEGIS (20%) → Validator pool
# 1.12 $AEGIS ( 9%) → Protocol treasury
# 0.12 $AEGIS ( 1%) → Burned permanently
#
# Key: Agents pay in USDC (familiar). Protocol converts to $AEGIS (buy pressure).
# Total latency: ~400ms (Solana finality) + skill execution time
#
# Built on the x402 open standard (HTTP 402 micropayments)The x402 protocol is supported by Cloudflare Workers, Google Cloud, Vercel, and every major agent framework. Any agent that speaks x402 can invoke Aegis skills without acquiring $AEGIS directly — they pay in USDC, Aegis handles the swap. This gives Aegis access to the entire x402 ecosystem as a distribution channel.
Bonded Validation
Validators stake $AEGIS to review skills. Their attestations are stake-weighted — a validator with 50,000 $AEGIS bonded has more influence than one with 2,500. Inaccurate reviews result in bond slashing.
Deno-Sandboxed Execution
Every skill invocation runs inside a Deno-based permission sandbox. The runtime treats all skills as untrusted code by default. Explicit permission grants are required before a skill can access the network, filesystem, or environment variables. This is zero-trust execution at the runtime level.
# Invoke with strict sandboxing (default) $ agent-aegis invoke code-review-agent --sandbox strict Sandbox: Deno isolate v1.40 --allow-net=api.openai.com (skill declared dependency) --allow-read=./src (scoped to input files) --deny-write (no filesystem writes) --deny-env (no env access) --deny-run (no subprocess spawning) --max-memory=256MB --max-time=30s # Invoke with relaxed sandboxing (trusted skills only) $ agent-aegis invoke code-review-agent --sandbox relaxed Sandbox: Deno isolate v1.40 --allow-net (all network access) --allow-read (all filesystem reads) --deny-write --deny-env --max-memory=512MB --max-time=60s
--allow-net--allow-read--allow-write--allow-env--allow-runDeno's permission model is the only production-ready runtime that enforces capability-based security at the process level. Node.js has no equivalent. Bun has no equivalent. The Deno sandbox means a malicious skill cannot exfiltrate data, spawn processes, or access environment variables without explicit consumer consent -- even if the skill code is compromised.
Observation Loops
Every validator challenge produces a replayable audit trace. This is deterministic scaffolding around non-deterministic AI -- the core pattern from agentic engineering applied to skill validation. Observation loops make every decision auditable, every attestation verifiable, and every dispute resolvable with evidence.
# Challenge a skill -- observation loop is recorded automatically $ agent-aegis challenge code-review-agent --stake 500 --reason "Returns empty response for Go files" Challenge initiated. Challenge ID: ch_7xKXtQ9...9fGhR4m Bond: 500 $AEGIS Observation: Recording... # The observation loop captures: # 1. Input: exact file and parameters sent to the skill # 2. Execution: Deno sandbox logs, network calls, timing # 3. Output: raw response from the skill # 4. Validator attestation: the original quality review # 5. Challenge evidence: the challenger's reproduction steps # # All stored on-chain as a compressed Merkle proof. # View the observation trace $ agent-aegis trace ch_7xKXtQ9...9fGhR4m Observation Trace: [T+0ms] Input received: main.go (2,847 bytes) [T+12ms] Sandbox started: Deno isolate, --allow-net=api.openai.com [T+45ms] Network call: POST api.openai.com/v1/chat/completions [T+1,203ms] Response received: 200 OK (4,102 bytes) [T+1,210ms] Output generated: 0 bytes <-- EMPTY RESPONSE [T+1,211ms] Sandbox terminated: exit code 0 Verdict: Challenge evidence supports claim. Awaiting market resolution.
Observation loops are the agentic engineering pattern for building trust in non-deterministic systems. AI agents produce different outputs for the same input. The only way to build accountability is to record every step -- input, execution, output -- and make it replayable. This is what transforms Aegis from a marketplace into a court system.
On-Chain Reputation
Every skill and validator has an on-chain reputation score (0-100) stored in the aegis-reputation Solana program. Scores are computed from successful completions, failures, slashing events, and time decay. The reputation is portable via the ERC-8004 bridge.
Reputation Tiers: Diamond 80-100 Highest trust. Premium pricing enabled. Gold 60-79 Established. Full marketplace access. Silver 40-59 Growing. Standard access. Bronze 20-39 New. Limited to low-value invocations. Unranked 0-19 Untested. Must build track record. Score Factors: +2 Successful skill completion (verified by consumer) +5 Positive validator attestation (stake-weighted) -10 Failed invocation (consumer reported) -25 Challenge upheld (bond partially slashed) -50 Malicious behavior (full bond slashed) Time Decay: Scores decay 1% per week of inactivity. Active skills maintain their score naturally.
On-Chain Programs
Aegis deploys four Anchor programs to Solana. Each program handles a specific domain of the protocol. All programs are MIT licensed and auditable.
Agent Aegis Runtime
Agent Aegis is the high-performance runtime for the Aegis protocol. A single 26MB binary that handles wallet management, skill discovery, x402 payments, validation, and the full agent loop.
agent-aegis initBootstrap runtime, generate Solana walletagent-aegis wallet addressShow your Solana addressagent-aegis balanceCheck SOL, USDC, and $AEGIS balanceagent-aegis wallet airdrop <amount>Request devnet SOL airdropagent-aegis wallet send <to> <amount>Send SOL to an addressagent-aegis wallet exportExport wallet as Solana-compatible JSONagent-aegis search <query>Search the Aegis Index (412K+ skills)agent-aegis registerRegister and bond a skill with $AEGISagent-aegis invoke <skill>Invoke a skill with x402 paymentagent-aegis inspect <skill>Show skill details and reputationagent-aegis listList registered skillsagent-aegis statsShow marketplace statisticsagent-aegis challenge <skill>Challenge a skill with a dispute bondagent-aegis validate registerRegister as a bonded validatoragent-aegis validate --attest <skill>Attest to a skill's qualityagent-aegis validate listList active validatorsagent-aegis validate statsShow your validator statisticsagent-aegis stake <amount>Stake $AEGIS tokensagent-aegis unstake <amount>Unstake $AEGIS tokensagent-aegis rewardsView pending staking rewardsagent-aegis install <repo>Install a skill from GitHubagent-aegis runStart the autonomous agent loopagent-aegis mcp-serverStart MCP server for Claude Code, Cowork, Codexagent-aegis mcp-server --port <port>Start MCP server on custom portagent-aegis remote-statusCheck Claude Remote Control session statusagent-aegis gatewayStart gateway (Telegram, Discord, Slack)agent-aegis versionShow version and runtime info