Back to VAELTUS

Developer Docs

SDK integration guide, API reference, and contract documentation for the VAELTUS AI Agent Observability & Guardrails Protocol.

Launch Dashboard
litepaper

What is VAELTUS?

VAELTUS is an observability and guardrails layer for autonomous AI agents operating onchain. It gives builders a way to register agents, stream operational events, enforce spend and permission policies, and anchor critical traces to Base for tamper-resistant auditability.

Agent SDK

Logs tool calls, transactions, reasoning events, errors, and heartbeats from your agent runtime.

Backend API

Validates API keys, stores events in Supabase, checks guardrails, and fires alerts.

Dashboard

Gives operators live status, incident triage, analytics, and policy controls.

Smart Contracts

Registry identity, budget governor primitives, circuit breaker state, and event hash anchoring on Base.

Free First: The MVP is 100% free. Token utility ($VLTS) is activated after product traction. Revenue in early phases comes from trading fees via Clanker LP.

sdk

SDK Integration Guide

Installation

npm install @vaeltus/sdk

Quick Start

agent.ts
import { Vaeltus } from '@vaeltus/sdk';

// Initialize the SDK with your agent credentials
const agent = new Vaeltus({
  agentId: process.env.AGENT_ID!,
  apiKey: process.env.VLTS_API_KEY!,
  guardrails: {
    maxSpendPerHourUsd: 100,
    allowedTools: ['swap', 'bridge', 'transfer'],
    blockedAddresses: ['0x...'],
    maxTxPerMinute: 10,
  },
  failMode: 'open', // continue on API errors
});

// Connect and start heartbeating
await agent.connect();

// Log tool calls with type-safe helpers
await agent.logToolCall('uniswap_swap', { tokenIn: 'ETH', amount: '1.0' }, { txHash: '0x...' });

// Log onchain transactions
await agent.logTransaction('0xabc...', 'base', '0xOwner', {
  to: '0xContract',
  valueUsd: 50.0,
  method: 'swap',
});

// Wrap reasoning steps with trace()
const { result } = await agent.trace('plan-yield-route', async () => {
  return computeOptimalRoute(pools);
});

// Log errors
await agent.logError('Unexpected slippage', { expected: 0.5, actual: 2.1 });

Available Methods

connect()

Start heartbeat and verify agent is live.

disconnect()

Stop heartbeat and send final status.

logEvent(event)

Log any agent event with guardrail checking.

logToolCall(tool, in, out?)

Convenience wrapper for tool_call events.

logTransaction(hash, chain, from)

Convenience wrapper for transaction events.

logError(message, ctx?)

Log critical error with context.

trace<T>(name, fn)

Wrap async reasoning spans with timing.

startHeartbeat()

Start periodic liveness heartbeats.

checkBudget(amount)

Pre-check if spend would violate limits.

checkToolAllowed(tool)

Pre-check if a tool is permitted.

checkAddress(addr)

Pre-check if a destination is blocked.

api

API Reference

All requests require an Authorization: Bearer vlts_... header (SDK writes) or a valid wallet session cookie (dashboard writes).

MethodEndpointAuthDescription
POST/api/agents/registerwallet sessionRegister a new agent. Returns agentId and apiKey.
GET/api/agents/:idAPI key or sessionFetch agent status, heartbeat state, and budget usage.
PATCH/api/agents/:idwallet sessionPause, resume, circuit-break, or reset an agent.
POST/api/agents/:id/eventsAPI keyLog an agent event (tool_call, transaction, reasoning, error, heartbeat).
POST/api/agents/:id/heartbeatAPI keySend a liveness heartbeat.
POST/api/agents/:id/api-keywallet sessionRotate the agent API key.
DELETE/api/agents/:id/api-keywallet sessionRevoke the agent API key.
GET/api/guardrails/:agentIdwallet sessionFetch guardrail configuration.
PUT/api/guardrails/:agentIdwallet sessionUpdate guardrail rules.
GET/api/dashboardwallet sessionSnapshot of all agents, events, guardrails, and alerts for the connected wallet.
PATCH/api/alerts/:idwallet sessionAcknowledge a single alert.
PATCH/api/alertswallet sessionAcknowledge all alerts (bulk).
POST/api/cron/heartbeat-monitorCRON_SECRETSweep stale heartbeats and auto circuit-break agents (called by Vercel Cron).
contracts

Smart Contracts

VaeltusRegistry

Register agents onchain with owner binding and role-based access control.

BudgetGovernor

Enforce per-hour and per-day spend limits that sync with offchain guardrail edits.

EventAnchor

Immutably anchor keccak256 event hashes to Base. Tamper-proof audit trail.

CircuitBreaker

Emergency halt mechanism with owner-controlled resume and onchain state.

Deploy to Base Sepolia

# Set your private key and relayer addresses in .env.local
# Then run:
forge script contracts/script/Deploy.s.sol \
  --rpc-url https://sepolia.base.org \
  --broadcast \
  --verify \
  --etherscan-api-key $BASESCAN_API_KEY

After deployment, update NEXT_PUBLIC_REGISTRY_ADDRESS, NEXT_PUBLIC_BUDGET_GOVERNOR_ADDRESS, NEXT_PUBLIC_EVENT_ANCHOR_ADDRESS in .env.local.

local-setup

Local Development

Prerequisites

  • Node.js 20+
  • Foundry (forge, cast)
  • Supabase account (free tier works)

Commands

# Install dependencies
npm install

# Copy and fill environment variables
cp .env.example .env.local

# Run Supabase migrations (requires supabase CLI)
supabase db push

# Start dev server
npm run dev

# Run web tests
npm run lint --workspace=apps/web
npm run test:api --workspace=apps/web

# Build SDK
npm run build --workspace=packages/sdk
npm run test --workspace=packages/sdk

# Run contract tests
forge test -vvv