Quick Start Guide

Get AuditAgent running in 10 minutes. This guide covers local development on Solana devnet.

Prerequisites

  • Node.js 18+
  • Solana CLI tools
  • A Solana devnet wallet with SOL

Step 1: Clone and Install

git clone https://github.com/daveylupes/AuditAgent-.git
cd AuditAgent-
npm install

Step 2: Deploy Solana Program

# Make script executable
chmod +x scripts/deploy-program.sh

# Deploy to devnet
./scripts/deploy-program.sh

This will output your Program ID and Authority public key. Save these!

Step 3: Configure Environment

# Copy example file
cp web/.env.example web/.env.local

# Edit with your values
# SOLANA_AGENT_PROGRAM_ID=<from-step-2>
# SOLANA_AGENT_AUTHORITY_SECRET=<from-step-2>

Step 4: Initialize Agent

cd scripts
npx ts-node initialize-agent.ts

This creates the agent PDA on-chain and initializes it.

Step 5: Fund Agent

# Interactive funding script
./scripts/fund-agent.sh

Transfer some devnet USDC to the agent. You'll need this for making payments to premium APIs.

Step 6: Run Dashboard

cd web
npm run dev

Visit http://localhost:3000 and click "Trigger Agent" to see autonomous payments in action!

What Happens Next?

  1. Agent requests premium data from /api/premium-data
  2. Receives 402 Payment Required
  3. Automatically pays 1 USDC from PDA wallet
  4. Records transaction on-chain
  5. Generates TAP proof
  6. Receives premium data
  7. Updates dashboard in real-time

Next Steps

Troubleshooting

Cannot find module '@auditagent/sdk'

Make sure you've run npm install in the root directory. The SDK is linked via npm workspaces.

Missing environment variables

Check that web/.env.local has all required variables. Restart the dev server after changing env files.

Agent PDA already initialized

This is fine! It means the agent was initialized in a previous run. You can still use it.

Insufficient USDC balance

Fund the agent with more devnet USDC using ./scripts/fund-agent.sh