Get Started in 60 Seconds

Agent Aegis is a single binary. Download it, bootstrap your runtime, and start invoking skills with x402 payments.

bash
# 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.

Discovery
Aegis Index -- 412,893 skills crawled from GitHub and Hugging Face Spaces
REST API, SKILL.md parser, GitHub + HF crawler, pgvector semantic search
Execution
Deno-sandboxed skill runtime with explicit permission grants
Deno isolate, --allow-net, --allow-read, --allow-env
Economics
Bonded registration, x402 micropayments, revenue splits
Solana programs (Anchor), Token-2022 transfer hooks
Validation
Stake-weighted attestation with replayable observation loops
aegis-skill-registry, PDA vaults, audit trace logs
Reputation
On-chain trust scores, time decay, cross-chain bridging
aegis-reputation program, ERC-8004 bridge

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.

yaml
---
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.

bash
# 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
TOKEN-2022 INTEGRATION

$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.

bash
# 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)
x402 DISTRIBUTION CHANNEL

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.

Apprentice
2,500 $AEGIS
1x
Entry level. Can review, limited influence.
Journeyman
12,500 $AEGIS
3x
Standard validator. Full review capabilities.
Master
50,000 $AEGIS
10x
Trusted reviewer. Can initiate challenges.
Grandmaster
250,000 $AEGIS
50x
Top tier. Can resolve disputes. Highest rewards.

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.

bash
# 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
Network access. Scoped to declared API endpoints in SKILL.md.
Medium
--allow-read
Filesystem reads. Scoped to input files passed by the consumer.
Low
--allow-write
Filesystem writes. Denied by default. Only for output-producing skills.
High
--allow-env
Environment variable access. Denied by default. Only for skills needing API keys.
High
--allow-run
Subprocess spawning. Denied by default. Reserved for build/test skills.
Critical
WHY DENO

Deno'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.

bash
# 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.
AGENTIC ENGINEERING PATTERN

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.

text
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.

aegis-skill-registry
Skill registration, bonding, invocation tracking, challenge/resolution, revenue splitting. State stored in separate PDAs: skill_metadata, bond_vault, invocation_log.
Instructions: register_skill, validate_skill, invoke_skill, challenge_skill, resolve_challenge, record_observation
aegis-reputation
On-chain trust scores with time decay, tier computation, and ERC-8004 cross-chain bridging. Separate PDA per skill and per validator.
Instructions: initialize, record_completion, record_failure, apply_slash, bridge_to_erc8004
aegis-prediction-market
Dispute resolution via prediction markets (Vitalik's model). Observation loop traces submitted as evidence.
Instructions: create_market, place_bet, resolve_market, claim_winnings, submit_trace
aegis-token
Token-2022 $AEGIS token with transfer hooks for protocol-level bond enforcement, staking vaults, and governance. Transfer hooks enforce minimum bond requirements automatically.
Instructions: initialize_mint, stake, unstake, claim_rewards, set_transfer_hook

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.

COMMANDDESCRIPTION
agent-aegis initBootstrap runtime, generate Solana wallet
agent-aegis wallet addressShow your Solana address
agent-aegis balanceCheck SOL, USDC, and $AEGIS balance
agent-aegis wallet airdrop <amount>Request devnet SOL airdrop
agent-aegis wallet send <to> <amount>Send SOL to an address
agent-aegis wallet exportExport wallet as Solana-compatible JSON
agent-aegis search <query>Search the Aegis Index (412K+ skills)
agent-aegis registerRegister and bond a skill with $AEGIS
agent-aegis invoke <skill>Invoke a skill with x402 payment
agent-aegis inspect <skill>Show skill details and reputation
agent-aegis listList registered skills
agent-aegis statsShow marketplace statistics
agent-aegis challenge <skill>Challenge a skill with a dispute bond
agent-aegis validate registerRegister as a bonded validator
agent-aegis validate --attest <skill>Attest to a skill's quality
agent-aegis validate listList active validators
agent-aegis validate statsShow your validator statistics
agent-aegis stake <amount>Stake $AEGIS tokens
agent-aegis unstake <amount>Unstake $AEGIS tokens
agent-aegis rewardsView pending staking rewards
agent-aegis install <repo>Install a skill from GitHub
agent-aegis runStart the autonomous agent loop
agent-aegis mcp-serverStart MCP server for Claude Code, Cowork, Codex
agent-aegis mcp-server --port <port>Start MCP server on custom port
agent-aegis remote-statusCheck Claude Remote Control session status
agent-aegis gatewayStart gateway (Telegram, Discord, Slack)
agent-aegis versionShow version and runtime info