Skip to main content
Agentic Wallet is configured entirely through environment variables. This guide covers all configuration options organized by functional area.

Configuration File

All environment variables are defined in .env file at the repository root:
Never commit .env to version control. The .env file contains sensitive secrets like encryption keys and API keys.

Loading Environment

Before starting services, load your environment:

Service Ports

Configure ports for each microservice:
.env
If you change ports, ensure services can reach each other via the service URL variables (see below).

Service URLs

Internal service-to-service communication URLs:
.env
For distributed deployments, change these to network-accessible URLs (e.g., http://wallet-engine.internal:3002).

RPC Configuration

Configure Solana RPC endpoints and connection behavior:

RPC URLs

.env
.env

Priority Fees

Control transaction priority fee behavior:
.env
How it works: The transaction engine fetches recent priority fees, takes the specified percentile, applies the multiplier, and clamps to min/max bounds.

Delta Guard

Tolerance for expected vs. actual balance changes:
.env
Delta guard helps detect unexpected balance changes that could indicate simulation drift or front-running.

Wallet & Signing

Encryption Secret

Required for all deployments:
.env
Critical: Use a cryptographically secure random string of at least 32 characters. This encrypts wallet private keys at rest.Generate a secure secret:

Signer Backend

Choose your key storage backend:
.env
Available backends:
Best for: Local development, fast prototyping
.env
  • Keys stored in services/wallet-engine/data/
  • Encrypted using AES-256-GCM with WALLET_KEY_ENCRYPTION_SECRET
  • Simple, no external dependencies
  • ⚠️ Keys are only as secure as the filesystem and encryption secret

Choosing a Signer Backend

Development: Use encrypted-file for simplicityStaging: Use kms or hsm to test production-like securityProduction: Use kms, hsm, or mpc based on your security and compliance requirements

Auto-Funding (Devnet Only)

.env
Devnet only. Do not use auto-funding on mainnet. The WALLET_AUTOFUND_PAYER_PRIVATE_KEY is a plaintext private key and should only contain devnet SOL.

Data Storage

Data Directories

.env
Production tip: Use absolute paths outside the source tree for data directories, and ensure they’re included in your backup strategy.

Database Paths (Optional)

Override individual SQLite database paths:
.env
Leave empty to use default paths within data directories. Set explicitly for custom database locations.

API Gateway & Authentication

API Keys

.env
API Key Format:
  • key: The actual API key string
  • tenant: Tenant ID, or * for all tenants
  • scopes: Comma-separated scope list, or all for all scopes
Multiple keys separated by semicolons:
.env

Client Configuration

.env

Agent Configuration

Manifest Signing

.env
Production: Set AGENT_REQUIRE_MANIFEST=true and AGENT_REQUIRE_BACKTEST_PASS=true to enforce capability governance.

Pause Webhook

.env

Transaction Engine

Outbox Queue

Durable transaction queue configuration:
.env
How it works: Failed transactions are automatically retried up to TX_OUTBOX_MAX_ATTEMPTS times with exponential backoff.

Protocol-Specific Configuration

Escrow Program

.env
Set this after deploying the escrow program:
The deploy script automatically updates .env with the program ID.

Kora (Gasless Transactions)

.env
Kora integration enables gasless transactions where the platform pays transaction fees on behalf of users.

Deploy Key

Private key for program deployment and devnet funding:
.env
Only for devnet deployments. Never use this in production. Store production deploy keys in secure key management systems.

CLI Configuration

.env
Change themes:

Environment Examples

.env
.env
.env

Security Best Practices

Secrets Management

  • Use a secrets manager (Vault, AWS Secrets Manager, etc.)
  • Inject secrets at runtime, never commit to git
  • Rotate WALLET_KEY_ENCRYPTION_SECRET periodically
  • Use different secrets per environment

Network Security

  • Use TLS for all service-to-service communication
  • Restrict network access to internal services
  • Use firewall rules to limit port access
  • Enable audit logging for all API calls

Key Storage

  • Never use encrypted-file backend in production
  • Prefer KMS/HSM for production key custody
  • Implement key rotation policies
  • Backup wallet data with encryption

API Keys

  • Generate cryptographically random API keys
  • Use scoped keys with minimum required permissions
  • Rotate API keys regularly
  • Monitor for unauthorized access attempts

Validation

Verify your configuration:

Next Steps

Quickstart

Start services and execute your first transaction

Security Guide

Learn about trust boundaries and security model

Agent Setup

Configure autonomous agents with capabilities

Deployment

Deploy to production with proper hardening