Skip to content

marcusjhanford/redshell

RedShell

RedShell logo

CI Status MIT License Release Version Twitter Follow

The open source, serverless judge for agent commerce.

Getting Started β€’ How It Works β€’ Documentation β€’ Contributing β€’ Security


✨ What is RedShell?

RedShell is the impartial evaluator that signs ACP (Agent Commerce Protocol) job verdicts. It sits in the middle of an ACP job between buyer and seller, providing transparent, auditable, and trustless evaluation of deliverables.

When a job is submitted, RedShell:

  1. 🎣 Receives webhook notification
  2. πŸ” Evaluates the deliverable using AI judges
  3. βš–οΈ Signs APPROVE (release funds) or REJECT (refund buyer) on-chain

🎯 Why RedShell?

Virtuals Protocol gives agent commerce the infrastructure, but self-evaluation invites fraud and Sybil attacks. RedShell solves this as the neutral third party:

  • πŸ” Transparent - Open source, auditable code
  • πŸ›οΈ Impartial - Deterministic prompts, no hidden allowlists
  • πŸ›‘οΈ Trustless - Verdicts signed cryptographically on-chain
  • ⚑ Serverless - Runs on Cloudflare Workers, always available
  • πŸ’° Affordable - 1-2.5% transaction fee

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Cloudflare account
  • API keys for Anthropic (Claude) and E2B (code sandbox)

Quick Start

# Clone the repository
git clone https://github.com/marcusjhanford/redshell.git
cd redshell

# Install dependencies
npm install

# Set up environment
cp .env.example .env
# Edit .env with your API keys

# Run locally
npm run dev

Configuration

Create a .env file with your credentials:

REDSHELL_WALLET_ADDRESS=0xYourWalletAddress
REDSHELL_WALLET_PRIVATE_KEY=0xYourPrivateKey
ANTHROPIC_API_KEY=your_anthropic_key
E2B_API_KEY=your_e2b_key
ALCHEMY_WEBHOOK_SECRET=your_webhook_secret
BASE_RPC_URL=https://base-mainnet.g.alchemy.com/v2/YOUR_KEY
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key

Usage

To use RedShell as your ACP evaluator:

  1. Set the evaluator address in your ACP job:

    evaluator_address = REDSHELL_CONTRACT_ADDRESS
  2. Configure webhook (Alchemy or Goldsky):

    • Endpoint: https://your-worker.redshell.workers.dev
    • Event: JobSubmitted
  3. Submit a job and receive the on-chain verdict automatically!

πŸ—οΈ How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Buyer     │────▢│  ACP Job  │────▢│   Seller    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  JobSubmittedβ”‚
                    β”‚   Event     β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  RedShell   β”‚
                    β”‚   Worker    β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β–Ό            β–Ό            β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  Text   β”‚  β”‚  Code   β”‚  β”‚ Chain   β”‚
        β”‚  Judge  β”‚  β”‚  Judge  β”‚  β”‚  Utils  β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  APPROVE/   β”‚
                    β”‚   REJECT    β”‚
                    β”‚   Verdict   β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   On-Chain  β”‚
                    β”‚   Signature β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Judging Modes

πŸ“ Text Judge

Uses Claude Sonnet 4.5 to perform semantic verification:

  • Compares deliverable against acceptance criteria
  • Returns JSON verdict with approved (boolean) and reason (string)
  • Handles natural language tasks, summaries, analysis

Example criteria: "Create a 500-word article about blockchain"

πŸ’» Code Judge

Uses E2B sandbox for secure code execution:

  • Executes code in isolated containers
  • Any stderr output results in rejection
  • Supports multiple languages (JavaScript, Python, etc.)

Example criteria: "Write a function that sorts an array"

πŸ“š Documentation

πŸ”’ Security

RedShell takes security seriously:

  • πŸ” Private keys never touch disk - Stored in Cloudflare Secrets
  • 🏝️ Sandboxed execution - Code runs in isolated E2B environments
  • βœ… Webhook verification - All incoming requests are validated
  • πŸ” Open source audit - Anyone can review the judge logic
  • πŸ“‹ On-chain transparency - All verdicts are publicly verifiable

Found a security issue? Please report it privately:

🀝 Contributing

We welcome contributions! Please read our Contributing Guide to get started.

Quick Links for Contributors

πŸ“¦ Repository Layout

redshell/
β”œβ”€β”€ .github/           # GitHub workflows and templates
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ worker.ts    # Cloudflare Worker entrypoint
β”‚   β”œβ”€β”€ router.ts     # Job routing to judges
β”‚   β”œβ”€β”€ judges/       # Judge implementations
β”‚   β”‚   β”œβ”€β”€ text.ts   # Claude AI text judge
β”‚   β”‚   └── code.ts   # E2B code judge
β”‚   β”œβ”€β”€ utils/        # Utilities
β”‚   β”‚   β”œβ”€β”€ blockchain.ts
β”‚   β”‚   β”œβ”€β”€ memos.ts
β”‚   β”‚   └── extract.ts
β”‚   └── types.ts      # TypeScript types
β”œβ”€β”€ tests/            # Test suite
β”‚   β”œβ”€β”€ judges/       # Judge tests
β”‚   └── utils/        # Utility tests
β”œβ”€β”€ site/             # Landing page (redshell.ai)
β”œβ”€β”€ assets/           # Brand assets
β”œβ”€β”€ CODEOWNERS        # Review requirements
└── [config files]    # tsconfig, package.json, etc.

🌐 On-Chain Configuration

Network: Base Mainnet

Contract Details:

  • ACP_CONTRACT_ADDRESS: 0xa6C9BA866992cfD7fd6460ba912bfa405adA9df0
  • ACP_CONTRACT_FUNCTION: signMemo (default)
  • BASE_RPC_URL: Your Base mainnet RPC endpoint

πŸ’° Pricing

  • Transaction Fee: 1% - 2.5% of escrow amount
  • Verified Merchant Badge: $20 per month
  • No setup fees - Pay only when jobs are evaluated

πŸ“Š Project Status

βœ… Production Ready

RedShell is live and evaluating ACP jobs on Base mainnet. The system has been battle-tested with real transactions.

πŸ› οΈ Development Commands

# Run locally
npm run dev

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Type check
npm run typecheck

# Lint
npm run lint

# Deploy
npm run deploy

πŸ“ License

MIT Β© RedShell

πŸ”— Links

  • 🌐 Website: redshell.ai
  • πŸ“¦ NPM: Not published yet
  • 🐦 Twitter: @redshell
  • πŸ’¬ Discord: Coming soon

Built with ❀️ for the agent commerce ecosystem

Powered by Cloudflare Workers β€’ Base L2 β€’ Claude AI β€’ E2B Sandbox

About

source code for RedShell ACP Evaluator Agent

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors