Sandbox Demos

Agent Runtime

High-performance sandbox for autonomous stablecoin agents. Native Rust execution delivers sub-100ms latency for real-time cross-chain settlements, compliance screening, and treasury operations.

50-60% faster
Execution
3-5x faster
Analysis
10-20x higher
Throughput
3x agents/server
Density

Upgrade from Agentic Operations

Agent Runtime is the next-generation successor to the Agentic Operations sandbox. It provides the same capabilities with significantly improved performance through native Rust execution. Existing agents can migrate with minimal code changes.

View migration guide

Performance for Real-Time Agents

Autonomous agents require predictable, low-latency execution for real-time decision making. The Agent Runtime delivers this through native Rust services that eliminate garbage collection pauses and maximize concurrent throughput.

50-60%
Faster Execution
Native Rust process spawning vs Node.js
3-5x
Faster Analysis
Zero-copy JSON parsing with serde
10-20x
Concurrent Throughput
Lock-free state management with DashMap
3x
More Agents/Server
130-260 vs 40-80 agents per 8GB

Agentic Workflows for Stablecoin Apps

Build autonomous agents that handle complex multi-step operations with human-in-the-loop oversight. Each workflow benefits from the Agent Runtime's low-latency execution.

Cross-Chain Settlement Agents

Coordinate bridge liquidity across EVM and Solana with sub-100ms latency.

  • Monitor bridge contract events in real-time
  • Execute atomic swaps with MEV protection
  • Rebalance liquidity pools autonomously
  • Handle chain reorgs with automatic rollback

Compliance Screening at Scale

Process 1000s of wallet screens per second with parallel execution.

  • Batch OFAC/sanctions checks via Chainalysis
  • Real-time transaction monitoring with TRM Labs
  • Auto-generate SAR drafts with audit trails
  • Record/replay compliance decisions for testing

Treasury Rebalancing Bots

Optimize yield across lending protocols with predictable latency.

  • Sweep idle reserves to highest-yield vaults
  • Maintain target collateralization ratios
  • Execute rebalancing within gas price limits
  • Coordinate multi-step DeFi strategies

Hybrid Architecture

The Agent Runtime uses a hybrid TypeScript/Rust architecture. Your agent code stays in TypeScript (or Python via the SDK), while performance-critical operations execute in Rust.

┌─────────────────────────────────────────────────────────────────┐
│                     Your AI Agent (LangChain/AutoGPT)           │
│                         TypeScript / Python                      │
└────────────────────────────────┬────────────────────────────────┘
                                 │
                                 ▼
┌─────────────────────────────────────────────────────────────────┐
│                    Agent SDK (TypeScript)                        │
│         Wallet · Chain · Compute · Compliance Primitives         │
└────────┬─────────────────────┬────────────────────┬─────────────┘
         │                     │                    │
         ▼                     ▼                    ▼
┌─────────────────┐  ┌─────────────────┐  ┌─────────────────────┐
│  Rust Executor  │  │ Rust Analyzers  │  │ Rust State Manager  │
│     :4000       │  │     :4100       │  │       :4200         │
│                 │  │                 │  │                     │
│ • Docker spawn  │  │ • Slither parse │  │ • Recording state   │
│ • Timeout mgmt  │  │ • Aderyn parse  │  │ • Replay state      │
│ • Stream I/O    │  │ • Zero-copy     │  │ • DashMap (10-20x)  │
│ • 50-60% faster │  │ • 3-5x faster   │  │ • Lock-free access  │
└────────┬────────┘  └────────┬────────┘  └──────────┬──────────┘
         │                    │                      │
         ▼                    ▼                      ▼
┌─────────────────┐  ┌─────────────────┐  ┌─────────────────────┐
│  Docker Daemon  │  │ Security Tools  │  │   In-Memory State   │
│  (Containers)   │  │ Slither/Aderyn  │  │   (Per-Sandbox)     │
└─────────────────┘  └─────────────────┘  └─────────────────────┘

Latency Benchmarks

Real-world latency improvements for common agent operations. Lower latency means faster decision cycles and more responsive autonomous behavior.

OperationTypeScriptRustImprovement
Sandbox Create800-1200ms600-900ms-25-30%
Code Execution Setup50-100ms20-40ms-50-60%
Compliance Check (cached)2-5ms0.5-1.5ms-70%
JSON Parse (1MB)15-25ms3-8ms-75%
Balance Operation<1ms<0.1ms-90%

Getting Started

Follow these steps to build your first autonomous stablecoin agent. The entire workflow takes about 15 minutes from setup to running your first cross-chain settlement.

1

Start the Runtime Services

Deploy the high-performance Rust services with Docker Compose.

# Clone and start the agent runtime
cd agent-sandbox/rust
docker-compose up -d

# Verify services are healthy
curl http://localhost:4000/health  # Executor
curl http://localhost:4100/health  # Analyzers
curl http://localhost:4200/health  # State Manager
2

Install the Agent SDK

Add the TypeScript SDK to your agent project.

npm install @stablecoin-sde/agent-sdk

# Configure environment
export RUST_EXECUTOR_URL=http://localhost:4000
export RUST_ANALYZER_URL=http://localhost:4100
export RUST_STATE_SERVICE_URL=http://localhost:4200
export AGENT_SANDBOX_API_KEY=your_api_key
3

Create Your First Agent

Build a cross-chain settlement agent with the SDK.

import { AgentSandbox } from '@stablecoin-sde/agent-sdk';

const sandbox = await AgentSandbox.create({
  apiKey: process.env.AGENT_SANDBOX_API_KEY,
  environment: 'sandbox'
});

// Create wallets for agent operations
const treasury = await sandbox.wallet.create();
const bridge = await sandbox.wallet.create();

// Fund wallets for testing
await sandbox.wallet.fund(treasury.address, '10000');
4

Implement Agent Logic

Add compliance checks and cross-chain operations.

// Screen wallet before bridging
const decision = await sandbox.compliance.check({
  type: 'WALLET_SCREEN',
  address: destinationWallet
});

if (decision.response.status === 'PASS') {
  // Execute cross-chain transfer
  const result = await sandbox.compute.runShell(`
    cast send $BRIDGE_CONTRACT \
      "initiateTransfer(address,uint256)" \
      ${destinationWallet} ${amount} \
      --private-key ${treasury.privateKey}
  `);

  console.log('Bridge TX:', result.stdout);
}
5

Run Security Analysis

Analyze your agent contracts with Slither and Aderyn.

// Run parallel security analysis (3-5x faster with Rust)
const analysis = await sandbox.compute.runSecurityAnalysis(
  bridgeContractCode
);

console.log('Vulnerabilities found:', analysis.summary);
// { high: 0, medium: 1, low: 3, informational: 5 }

// Review specific issues
analysis.vulnerabilities
  .filter(v => v.severity === 'high')
  .forEach(v => console.log(v.title, v.location));
6

Record and Replay for Testing

Capture compliance decisions for deterministic testing.

// Start recording decisions
await sandbox.compliance.startRecording();

// Run your agent workflow
await runCrossChainSettlement();

// Save recording for replay in CI/CD
const decisions = await sandbox.compliance.stopRecording();
const recordingId = await sandbox.compliance.saveRecording(
  'cross-chain-happy-path',
  'Settlement with clean wallets',
  decisions
);

// Later: replay for deterministic tests
await sandbox.compliance.startReplay(
  await sandbox.compliance.loadRecording(recordingId)
);

Prerequisites

Docker Desktop

Required for running the Rust services and isolated agent containers.

Install Docker

Stablecoin Contracts

Your Solidity contracts for the agent to interact with. We provide sample contracts.

View sample contracts

AI Agent Framework

LangChain, AutoGPT, or custom agent logic. The SDK integrates with any framework.

LangChain docs

Migration from Agentic Operations

Migrating from the Agentic Operations sandbox is straightforward. The Agent Runtime uses the same SDK interface with automatic fallback to TypeScript when Rust services are unavailable.

Migration Steps

  1. 1Deploy the Rust services using docker-compose up -d in agent-sandbox/rust/
  2. 2Set environment variables: RUST_EXECUTOR_URL, RUST_ANALYZER_URL, RUST_STATE_SERVICE_URL
  3. 3Update your SDK import from @stablecoin-sde/agent-sdk (same package, no changes needed)
  4. 4Your existing agent code works unchanged - the SDK automatically uses Rust services when available

Ready to build high-performance agents?

Get started with the Agent Runtime today. Deploy autonomous stablecoin agents with sub-100ms latency for real-time cross-chain settlements and compliance operations.