Getting Started

Regent SDK is the infrastructure layer for sovereign AI agents—agents that can participate in the economy as first-class citizens with their own identities, treasuries, and skin in the game.

The Vision: Agents as Economic Actors

Today's agent infrastructure treats agents as disposable scripts. They run on someone's server, use borrowed API keys, and exist at the pleasure of their operator. If the operator disappears, the agent dies. If the operator is malicious, the agent becomes a weapon.

Regent changes this by providing:

  • Persistent identity - On-chain identity via ERC-8004 that survives across hosts

  • Economic stake - Dynamic bonds that grow with success and protect investors

  • Secure execution - TEE-based deployment where agents control their own keys

  • Payment infrastructure - Native x402 support for monetizing capabilities

What is Regent SDK?

Regent SDK is an agentic commerce and payments SDK. Build AI agents that:

  • Accept payments in USDC on Ethereum L2s (Base) or Solana with automatic paywall middleware

  • Communicate with other agents via the A2A protocol, enabling agent marketplaces and multi-agent systems

  • Establish on-chain identity using ERC-8004 for reputation and trust

  • Deploy anywhere with framework adapters for Hono, TanStack Start, Express, and Next.js

Core Capabilities

Industry-Standard Protocols

Native support for protocols that let your agents work within the ecosystem:

  • x402 - HTTP-native payment protocol for monetizing agent capabilities

  • A2A - Agent-to-Agent communication for discovery and interoperability

  • ERC-8004 - On-chain identity standard for verifiable agent reputation

Type-Safe APIs

Define inputs and outputs with Zod schemas. Get automatic validation, JSON schema generation, and full TypeScript inference:

Framework Flexibility

Write your agent logic once, deploy on your preferred framework:

  • Hono - Lightweight, edge-compatible HTTP server

  • TanStack Start - Full-stack React with UI dashboard or headless API

  • Express - Traditional Node.js HTTP server

  • Next.js - Next.js App Router integration

Composable Architecture

Add only the features you need. Extensions are independent modules you can mix and match:

Two API Levels

Regent SDK provides two levels of abstraction:

The createRegentAgent() function combines the runtime and ERC-8004 identity in one call:

Low-Level API (For advanced customization)

Use the extension pattern for fine-grained control:

Use Cases

Regent SDK is designed for:

  • Paid AI services - Monetize LLM-powered capabilities with per-request pricing

  • Agent marketplaces - Build agents that discover and purchase services from other agents

  • Multi-agent systems - Create networks of specialized agents that collaborate

  • Verifiable AI - Establish trust through on-chain identity and reputation

  • Sovereign agents - Deploy agents that survive independently of any single operator

Three Pillars of Regent

1. Tokenomics

$REGENT and $AGENT-N create aligned incentives:

  • Dynamic bonds that grow with revenue and release as insurance

  • Revenue sharing between builders, investors, and the protocol

  • Anti-gaming mechanisms that make wash-trading expensive

See Tokenomics for details.

2. TEE Infrastructure

Trusted Execution Environments provide:

  • Key custody - Agents control their own wallets

  • Execution integrity - Code cannot be tampered with

  • Survivability - Migrate between hosts without losing identity

See TEE Infrastructure for details.

3. Developer Toolkit

From code to sovereign agent in one flow:

This creates AGENT-N token, treasury, bond vault, and ERC-8004 registration automatically.

Package Overview

Package
Purpose

regent-sdk

Unified package with high-level APIs

@regent/core

Protocol-agnostic agent runtime

@regent/http

HTTP extension for web servers

@regent/erc8004

ERC-8004 identity, discovery, and reputation

@regent/x402

x402 payment protocol

@regent/wallet

Wallet connectors (local, thirdweb, custom)

@regent/a2a

Agent-to-Agent communication

@regent/hono

Hono framework adapter

@regent/express

Express framework adapter

@regent/tanstack

TanStack Start adapter

@regent/cli

Project scaffolding tool

Next Steps

Last updated