Skip to main content
Wraith has three layers: the SDK (client library), the TEE infrastructure (managed by Wraith), and the blockchains.

System Diagram

System Architecture Developers never run servers, manage keys, or handle chain-specific crypto. They install the SDK, get an API key, and build.

TEE Server Architecture

One NestJS server deployment with a chain connector registry. The core agent engine is chain-agnostic. Chain-specific logic lives behind a pluggable interface. TEE Server Architecture

Module Structure

Agent Lifecycle

Creation

Chat Orchestration

The chat method runs a multi-turn tool-calling loop: Chat Orchestration The AI can call multiple tools in one response. A cap (10 iterations) prevents infinite loops.

Tool Execution

Each tool call routes to the appropriate chain connector:

Database Schema

agents

conversations

messages

invoices

notifications

scheduled_payments

Platform Model

Wraith operates as a managed service, similar to Privy or Turnkey.

What Wraith Manages

  • TEE infrastructure (Phala deployment)
  • Key derivation and security
  • Chain connectors and RPC endpoints
  • Database and session storage
  • Name registration and gas sponsorship
  • Payment scanning and notifications

AI Model Options