Installation

This guide covers installing Regent SDK packages and setting up your development environment.

Prerequisites

  • Bun >= 1.0 (recommended) or Node.js >= 20.9

  • An API key from your preferred LLM provider (OpenAI, Anthropic, etc.) if building AI-powered agents

  • Optional: A wallet address for receiving payments

The fastest way to get started is with the CLI, which scaffolds a complete project:

# Interactive mode - CLI guides you through options
bunx @regent/cli my-agent

The CLI prompts you to select:

  • Adapter: hono, tanstack-ui, tanstack-headless, express, or next

  • Template: blank, axllm, axllm-flow, identity, trading-data-agent, or trading-recommendation-agent

  • Configuration: Agent metadata, LLM keys, and optional payment details

Non-Interactive Mode

For CI/CD or scripted setups:

Using the Unified Package

For most projects, install the unified regent-sdk package:

This includes all core functionality:

Manual Installation

For fine-grained control, install individual packages:

Core Packages

Framework Adapter

Install the adapter for your framework:

Next.js (App Router) is supported via scaffolding (bunx @regent/cli --adapter=next) rather than a standalone @regent/next package.

Optional Extensions

Peer Dependencies

Some extensions have peer dependencies:

Package Overview

Package
Purpose

regent-sdk

Unified SDK with high-level APIs

@regent/core

Protocol-agnostic agent runtime with extension system

@regent/types

Shared TypeScript type definitions

@regent/http

HTTP extension for request/response handling and SSE

@regent/hono

Hono framework adapter

@regent/tanstack

TanStack Start adapter (UI and headless)

@regent/express

Express framework adapter

@regent/x402

x402 payment protocol and policies

@regent/erc8004

ERC-8004 identity, discovery, and reputation

@regent/a2a

A2A protocol client

@regent/wallet

Wallet connectors and helpers

@regent/ap2

Agent Payments Protocol extension

@regent/scheduler

Scheduled agent invocations

@regent/analytics

Payment tracking and reporting

@regent/cli

CLI scaffolding tool (source: monorepo/regent-cli/)

Environment Variables

Create a .env file in your project root:

Verify Installation

After installation, verify everything works:

Your agent should be running at http://localhost:3000. Test it:

Next Steps

Last updated