Get Started

Introduction

Theazo is agent infrastructure for AI companies. It sits between your product and the compute providers that run your agents — handling isolation, multi-tenancy, billing, observability, and orchestration so you can focus on what your agents actually do.

Who is Theazo for?

Theazo is B2B2C infrastructure. You are AgentCo — a company building AI agents for your users. Your users trigger agent runs. Theazo is the control plane that manages those runs: provisioning sandboxes, enforcing per-user spend limits, streaming logs, and producing billing data you can pass through to your customers.

You install the theazo SDK in your backend. Your users never see Theazo directly — they interact with your product, and Theazo powers the agent layer underneath.

quickstart.ts
import { Theazo } from class="cb-str">'theazo'

const theazo = new Theazo({ apiKey: process.env.THEAZO_API_KEY! })

// Create an isolated session for one of your users
const session = await theazo.sessions.forUser(class="cb-str">'user_123', {
  limits: {
    maxCost: { amount: class="cb-num">500, currency: class="cb-str">'usd', period: class="cb-str">'day' },
    maxAgents: class="cb-num">3,
  },
})

// Run an agent inside that session
const result = await session.run(class="cb-str">'researcher', class="cb-str">'analyze competitor pricing')

console.log(result.output)  class="cb-cmt">// agent's response
console.log(result.cost)    class="cb-cmt">// { amount: 42, currency: 'usd' }

What Theazo does

Theazo provides the operational layer between your application code and the raw compute providers (E2B, Fly.io, Docker) where agents execute.

Compute isolation

Every agent runs in its own sandbox — a microVM with a filesystem, optional browser, and network isolation. Agents from different users never share state.

Multi-tenant sessions

Sessions scope everything — agents, costs, logs, snapshots — to a single end-user. Per-user spend limits are enforced atomically via Redis counters.

Observability

Structured logs, traces, and metrics stream in real-time via WebSocket and SSE. Every tool call, model invocation, and state transition is recorded.

Billing and cost controls

Metered usage (compute minutes, model tokens, storage) with per-session limits. Export to Stripe, CSV, or JSON for pass-through billing to your users.

Orchestration primitives

Workflows (DAG execution), fleets (batch dispatch), teams (multi-agent coordination), approvals (human-in-the-loop), scheduling, knowledge (RAG), and a tool registry — all built on top of the infrastructure layer.

The 2x2 product matrix

Theazo decomposes into two independent axes: compute (where agents run) and orchestration (how agents think and coordinate). You can use either layer independently or both together.

product-matrix.txt
                    Managed compute          BYOI compute
                    (Theazo provisions)      (Your E2B / Fly / Docker)
                 ┌─────────────────────┬─────────────────────────────┐
  Managed        │                     │                             │
  orchestration  │   Full Platform     │   Primitives-only (BYOI)   │
  (Theazo loop)  │   Everything        │   Your infra, our brains   │
                 │   handled           │                             │
                 ├─────────────────────┼─────────────────────────────┤
  Your           │                     │                             │
  orchestration  │   Infra-only        │   Not a customer            │
  (LangGraph,    │   Our sandboxes,    │   You own both layers       │
   CrewAI, etc)  │   your agent code   │                             │
                 └─────────────────────┴─────────────────────────────┘

The bottom-right quadrant is not a Theazo customer — if you own both compute and orchestration, Theazo adds no value. Every other combination is a valid use case.

Three customer types

Full Platform

Theazo manages everything: provisioning sandboxes, running the model loop (model call, tool dispatch, model call), billing compute and tokens. You call session.run() and get back a result. This is the simplest integration and highest operational leverage.

full-platform.ts
const theazo = new Theazo({ apiKey: class="cb-str">'th_live_...' })
const session = await theazo.sessions.forUser(class="cb-str">'user_123')
const result  = await session.run(class="cb-str">'researcher', class="cb-str">'find pricing data')

Infra-only (your orchestration, our compute)

You already have a working agent framework — LangGraph, CrewAI, AutoGen, or your own loop. You need isolated, observable, billed compute without rewriting your orchestration. Use agent.exec() to run arbitrary code inside Theazo sandboxes. Theazo meters compute time only — model tokens are billed by your provider directly.

infra-only.ts
const theazo  = new Theazo({ apiKey: class="cb-str">'th_live_...' })
const session = await theazo.sessions.forUser(class="cb-str">'user_123')
const agent   = await session.agents.create({ browser: false })

// Run your LangGraph code inside a Theazo sandbox
const result = await agent.exec({
  lang: class="cb-str">'python',
  code: `
from langgraph.graph import StateGraph
# ... your existing agent logic
  `,
})

BYOI Primitives (your compute, our orchestration)

You have your own E2B or Fly.io account and want to keep paying your provider directly. Theazo orchestrates agents on your infrastructure — running the model loop, enforcing limits, streaming logs — and charges a small orchestration fee. Best margin profile for both parties.

byoi-primitives.ts
const theazo = new Theazo({
  apiKey: class="cb-str">'th_live_...',
  compute: {
    provider: class="cb-str">'e2b',
    credentials: { apiKey: process.env.E2B_API_KEY! },
  },
})

// Agents provision on YOUR E2B account
const session = await theazo.sessions.forUser(class="cb-str">'user_123')
const result  = await session.run(class="cb-str">'researcher', class="cb-str">'scrape competitor pricing')

Architecture

Theazo is a control plane, not a compute provider. Think of it like Terraform for agent compute: it does not run VMs — it manages them across multiple backends through a unified adapter layer.

architecture.txt
┌─────────────────────────────────────────────────────┐
│  Your Application (AgentCo)                         │
│  ┌───────────────────────────────────────────────┐   │
│  │  theazo SDK                                   │   │
│  └───────────────────┬───────────────────────────┘   │
└──────────────────────┼───────────────────────────────┘
                       │ HTTPS / WebSocket
┌──────────────────────┼───────────────────────────────┐
│  Theazo Control Plane                                │
│  ┌─────────────┐  ┌──────────────┐  ┌────────────┐  │
│  │ API Server  │  │ Task Worker  │  │ Event Proc  │  │
│  │ (stateless) │  │ (stateful)   │  │ (pub/sub)   │  │
│  └──────┬──────┘  └──────┬───────┘  └─────┬──────┘  │
│         │  Sessions, Billing, Observability, Routing │
│  ┌──────┴────────────────┴─────────────────┴──────┐  │
│  │           Provider Adapter Layer               │  │
│  └──────┬──────────────┬───────────────────┬──────┘  │
└─────────┼──────────────┼───────────────────┼─────────┘
          │              │                   │
     ┌────┴────┐    ┌────┴────┐         ┌────┴────┐
     │  E2B    │    │  Fly.io │         │ Docker  │
     │ (cloud) │    │ (cloud) │         │ (self)  │
     └─────────┘    └─────────┘         └─────────┘

The API Server is stateless — it handles CRUD, authentication, rate limiting, and enqueues async work. The Task Worker is stateful — it holds provider connections for active agents and runs the orchestrator loop. The Event Processor handles Redis pub/sub fan-out for real-time log streaming and webhook delivery.

The Provider Adapter Layer is the key abstraction. Every provider implements the same interface: create, exec, files, pause, resume, destroy. The scheduler routes agents to the best available provider based on capabilities, health, and circuit breaker state.

Theazo does NOT compete with E2B or LangGraph — it complements both. E2B provides sandboxed compute. LangGraph provides agent orchestration. Theazo provides the control plane that makes either (or both) production-ready: multi-tenancy, billing, observability, cost limits, and operational tooling.

Next steps

Start with sessions to understand the multi-tenant isolation model, then move to agents for agent lifecycle and execution. If you are bringing your own compute or model provider, read the BYOI guide.

Was this page helpful?
Ask anything...⌘I