Skip to main content

AI Agent (packages/ai-agent/.env)

Required

ANTHROPIC_API_KEY
string
required
Claude API key for AI analysis. Get one at console.anthropic.com.
GITHUB_TOKEN
string
required
GitHub personal access token for REST API access. Provides higher rate limits than unauthenticated requests.

XRPL Settlement

FOUNDER_SEED
string
XRPL testnet wallet seed. The founder wallet issues MPT equity tokens and creates escrows. Generate with npm run setup in packages/xrpl-contracts.
AGENT_SEED
string
XRPL testnet wallet seed for the AI agent. Receives platform fees and releases escrows.
XRPL_NETWORK
string
default:"testnet"
XRPL network to connect to. Options: testnet, devnet, mainnet.
RLUSD_ISSUER
string
RLUSD issuer address on XRPL. Has a default value for testnet.

Optional

PORT
number
default:"3001"
Port for the Express server.
The XRPL micropayment paywall on GET /report/:id uses the FOUNDER_SEED wallet address as the payment destination. No separate config needed — if FOUNDER_SEED is set, the paywall is active.
CLAUDE_MODEL
string
default:"claude-sonnet-4-20250514"
Override the Claude model used for analysis. Defaults to Claude Sonnet.
AGENT_API_SECRET
string
Bearer token for authenticating escrow release requests (POST /xrpl/escrow/:id/release).
PAYWALL_REQUIRE_SENDER
boolean
When set, the XRPL paywall requires the X-Payment-Sender header in addition to X-Payment-TxHash for sender verification.

MetaLex SAFE (Base Sepolia)

BASE_PRIVATE_KEY
string
EVM private key for deploying SAFE agreements on Base Sepolia. If not set, settlement skips the SAFE deployment step.
BASE_RPC_URL
string
default:"https://mainnet.base.org"
Base RPC endpoint. Override for custom RPC providers.

Persistence

REDIS_URL
string
Redis connection URL for persistent storage. If not set, falls back to in-memory storage (state lost on restart).

XRPL Contracts (packages/xrpl-contracts/.env)

These are only needed to run the standalone XRPL demo:
FOUNDER_SEED
string
Founder wallet seed.
INVESTOR1_SEED
string
First investor wallet seed.
INVESTOR2_SEED
string
Second investor wallet seed.

Generating XRPL Wallets

cd packages/xrpl-contracts
npm run setup
This connects to the XRPL testnet faucet, generates funded wallets, and writes the seeds to .env.