Get Started

Bring Your Own Infrastructure

Use all of Theazo, or just the parts you need. Plug your own compute provider, your own model API key, or run your existing agent framework inside Theazo sandboxes — paying only for the orchestration layer.

The 2x2 matrix

Theazo decomposes into two independent layers: compute (where agents run) and orchestration (how agents think and act). You can mix and match each axis.

Compute axis

Orchestration axis

Managed compute

Theazo provisions VMs

Managed orchestration

Theazo runs the model loop

Full Platform

Theazo handles everything. Compute billed per minute, model tokens billed to Theazo's account. Highest margin for Theazo, lowest operational burden for you.

Your orchestration

LangGraph, CrewAI, etc.

Infra-only

Your agent code runs inside Theazo sandboxes. You call agent.exec() to run arbitrary code. Theazo bills compute time only. Best early entry point.

Compute axis

Orchestration axis

BYOI compute

Your E2B / Fly / Docker account

Managed orchestration

Theazo runs the model loop

Primitives-only (BYOI)

Theazo orchestrates agents on your compute account. You pay your provider directly. Theazo charges a small orchestration fee. Best margin profile.

Your orchestration

LangGraph, CrewAI, etc.

Not a customer

If you own both layers, Theazo adds no value. You don't need us.

BYOI compute

Connect your own E2B, Fly.io, or Docker account. Agents run in your infrastructure under your quotas. You pay the compute provider directly at their rates. Theazo charges only for orchestration — sessions, billing data, observability, primitives.

E2B

E2B provides isolated microVMs with browser support. Best for tasks involving web scraping, UI automation, and general code execution.

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

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

// Agents now 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')

Fly.io

Fly.io offers Firecracker microVMs with fast cold starts and persistent volumes. Best for long-running stateful agents and agents that need to persist files across multiple runs.

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

const theazo = new Theazo({
  apiKey: class="cb-str">'th_live_...',
  compute: {
    provider: class="cb-str">'fly',
    credentials: {
      apiKey: process.env.FLY_API_KEY!,
      org:    class="cb-str">'my-org',
    },
  },
})

Self-hosted Docker

Run agents on your own Docker host or Kubernetes cluster. Useful for air-gapped environments, on-prem compliance requirements, or cost-sensitive workloads where you already operate compute.

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

const theazo = new Theazo({
  apiKey: class="cb-str">'th_live_...',
  compute: {
    provider: class="cb-str">'docker',
    credentials: {
      host:    class="cb-str">'tcp://your-docker-host:2376'our-docker-host:2376',
      tlsCert: process.env.DOCKER_TLS_CERT!,
      tlsKey:  process.env.DOCKER_TLS_KEY!,
    },
  },
})

Multiple providers with fallback

Supply an ordered list of providers. Theazo routes to the first healthy provider that meets the agent's requirements. If that provider is over quota or circuit-broken, traffic automatically spills to the next.

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

const theazo = new Theazo({
  apiKey: class="cb-str">'th_live_...',
  compute: [
    {
      provider: class="cb-str">'e2b',
      priority: class="cb-num">1,         class="cb-cmt">// try first
      credentials: { apiKey: process.env.E2B_API_KEY! },
    },
    {
      provider: class="cb-str">'fly',
      priority: class="cb-num">2,         class="cb-cmt">// fallback
      credentials: {
        apiKey: process.env.FLY_API_KEY!,
        org:    class="cb-str">'my-org',
      },
    },
  ],
})

BYOI models

Use your own Anthropic, OpenAI, or OpenRouter API key. Model token costs are billed directly to your provider account. Theazo still records token counts for observability and per-user cost attribution, but does not add a markup on tokens.

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

const theazo = new Theazo({
  apiKey: class="cb-str">'th_live_...',

  models: {
    provider: class="cb-str">'anthropic',
    credentials: {
      apiKey: process.env.ANTHROPIC_API_KEY!,
    },
  },
})

// You can also specify BYOI models per-session for multi-tenant setups
// where each customer has their own API key
const session = await theazo.sessions.forUser(class="cb-str">'user_123', {
  models: {
    provider: class="cb-str">'openai',
    credentials: {
      apiKey: process.env.OPENAI_API_KEY!,
    },
  },
})

Infra-only mode

You have an existing agent framework — LangGraph, CrewAI, AutoGen, or your own loop — and you want isolated, observable, billed compute without rewriting your orchestration. Infra-only mode is for you.

Call agent.exec() to run arbitrary code inside the sandbox. Your code runs synchronously, the sandbox is isolated, and Theazo meters compute time.

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

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 agent code inside the Theazo sandbox
const result = await agent.exec({
  lang: class="cb-str">'python',
  code: `
from langgraph.graph import StateGraph
from theazo_sandbox import log, complete

def researcher(state):
    log(class="cb-str">"Searching for information...")
    # ... your logic here
    return { class="cb-str">"result": class="cb-str">"..." }

graph = StateGraph(dict)
graph.add_node(class="cb-str">"researcher", researcher)
graph.set_entry_point(class="cb-str">"researcher")

app = graph.compile()
output = app.invoke({ class="cb-str">"task": class="cb-str">"${task}" })
complete(output[class="cb-str">"result"])
  `,
})

console.log(result.stdout)
// { amount: 8, currency: 'usd' } — compute time only, no model markup
console.log(result.cost)
In infra-only mode, Theazo does not run the model loop. The managedLoop flag is false. You are billed only for compute minutes — there are no model token charges from Theazo. Your model provider bills you separately.

theazo/sandbox inside exec()

Install theazo-sandbox in your agent's Python or TypeScript runtime to emit structured logs, progress updates, and spans back to the Theazo observability pipeline.

inside-sandbox.py
# Inside your exec() code (Python)
pip install theazo-sandbox

from theazo_sandbox import log, span, progress, complete

log(class="cb-str">"Starting analysis", level=class="cb-str">"info")

with span(class="cb-str">"fetch_data"):
    data = fetch_competitor_pages()  # your logic

progress(class="cb-num">50, class="cb-str">"Fetched data, now analyzing...")

with span(class="cb-str">"analyze"):
    result = analyze(data)

complete(result)   # signals successful completion to Theazo
log(msg, level?)voidEmit a structured log line. Appears in the Theazo Logs dashboard.
span(name)ContextManagerOpen a trace span. Use as a context manager.
progress(pct, label?)voidEmit a progress update (0–100). Surfaced in the dashboard.
complete(output)voidSignal successful completion and provide the final output.

Cost structure

What Theazo charges versus what your provider charges depends on your configuration. All cost objects use integer cents — never strings.

Full Platform (managed compute + managed models)

ComputeTheazo billPer-minute rate billed to your Theazo account. ~$0.05–0.15 / hr per sandbox.
Model tokensTheazo billToken costs routed through Theazo's OpenRouter account with a small markup.
PrimitivesTheazo billFlat orchestration fee per workflow run, fleet dispatch, approval cycle.
StorageTheazo billPer-GB/month for snapshot and artifact storage.

BYOI compute + managed models

ComputeProvider billPaid directly to E2B / Fly / Docker at their rates. Theazo takes no cut.
Model tokensTheazo billSame as Full Platform — Theazo's OpenRouter account.
PrimitivesTheazo billSame flat orchestration fee.
OrchestrationTheazo billSmall per-agent fee for session management, billing tracking, and observability.

BYOI compute + BYOI models

ComputeProvider billPaid directly to your compute provider.
Model tokensModel billPaid directly to Anthropic / OpenAI / etc. Theazo records counts for attribution.
PrimitivesTheazo billSame flat orchestration fee.
OrchestrationTheazo billPer-agent orchestration fee for sessions, observability, limits enforcement.

Infra-only (managed compute, your orchestration)

ComputeTheazo billPer-minute rate for sandbox uptime, same as Full Platform.
Model tokensYour billYour orchestration calls your model API directly. Theazo is not in the model path.
PrimitivesN/APrimitives are not available in infra-only mode (managedLoop=false).
Regardless of mode, result.cost always reflects only what Theazo charged — not what your provider charged separately. Build your per-user billing by summing result.cost plus your provider invoice, allocated by session.

Why not just use E2B directly?

If you use E2B (or any provider) directly, you own the full operational burden. Theazo adds the control plane layer.

CapabilityE2B aloneTheazo BYOI E2B
Isolated sandboxesYesYes
Per-user session isolationBuild itBuilt-in
Per-user cost trackingBuild itBuilt-in
Cost limits & auto-pauseBuild itBuilt-in
Structured observabilityBuild itBuilt-in
Webhooks on lifecycle eventsBuild itBuilt-in
Workflows & fleetsBuild itBuilt-in
Approvals / HITLBuild itBuilt-in
Multi-provider fallbackBuild itBuilt-in
Billing export (Stripe/CSV)Build itBuilt-in
Was this page helpful?
Ask anything...⌘I