12 core packages, 85+ TypeScript modules

The backbone for AI-powered ecosystems

Substratum is the modular backend core that orchestrates models, agents, billing, and governance. The brain that connects WabiSabi CLI, Lifeflow Web, and your own products.

OpenAI-compatibleMulti-modelToken EconomySelf-hosted

One backend, multiple frontends

Developer tool

WabiSabi CLI

AI development assistant in your terminal. Code faster with contextual help, vibe coding, and agent commands.

Backend core

Substratum Core

API Gateway, model orchestration, agent engine, billing, security, and memory. The brain of the ecosystem.

Web experience

Lifeflow Web

Conversational AI interface with chat, workflows, and team collaboration. The user-facing experience.

OpenAI-compatible API

Drop-in replacement for any OpenAI integration

Point your existing code to Substratum. No SDK changes needed.

substratum gateway
# Just change the base URL — everything else stays the same
$ curl http://localhost:3001/v1/chat/completions \
-H "Authorization: Bearer $TOKEN" \
-d '{"model": "qwen3-coder-next",
"messages": [{"role": "user", "content": "Build a REST API"}],
"stream": true}'
# TheOracle routes to best available model automatically
→ Model: qwen3-coder-next (local Ollama)
→ Latency: 12ms routing + 340ms inference
→ Tokens: 1,247 used (charged to account)
→ Fallback chain: glm-4.7-flash → kimi-k2.5 → gpt-4o-mini
$ _

12 modular packages, one unified core

Every component is independently deployable. Mix and match modules to build your ideal AI infrastructure.

API Gateway

OpenAI-compatible API gateway built on Hono. Drop-in replacement for any OpenAI integration with authentication, rate limiting, and request routing.

TheOracle

Intelligent model router. Automatically selects the best model for each task across Qwen, Kimi, GLM, OpenAI, Anthropic, and local Ollama models.

Agent Engine

Build, Plan, and Search agents with hierarchical subagent delegation. Autonomous task decomposition and multi-agent collaboration.

Token Economy

Complete billing system with token purchasing, usage tracking per model, partner/reseller commissions, and community license management.

RAM Memory

Persistent memory system with short-term, long-term, and working memory. Agents retain context across sessions and share knowledge.

Security & Governance

JWT authentication, role-based access control, audit logging, and encryption. Enterprise-grade security built into every layer.

TheOracle Router

One API, every model

TheOracle intelligently routes each request to the best available model. Local-first with automatic cloud fallback. No vendor lock-in.

Local-first: Prioritizes Ollama models for speed and privacy
Auto-fallback: If primary fails, seamlessly switches to next provider
Task-aware: Code generation routes to Qwen, reasoning to Kimi, fast tasks to GLM
Custom endpoints: Any OpenAI-compatible API works as a provider
OllamaLocal
Qwen 3, Llama 3.2, Mistral, CodeLlama
KimiCloud
K2.5 (200K context), Vision
GLMCloud
GLM-4.7 Flash (1M context)
OpenAICloud
GPT-4o, GPT-4o Mini
AnthropicCloud
Claude 3.5 Sonnet, Haiku
DeepSeekCloud
DeepSeek Chat

Built-in token economy

Monetize your AI platform from day one. Token billing, partner commissions, and community licensing — all managed by Substratum.

Token Billing

Per-model usage tracking. Users purchase tokens and consume them based on actual model costs.

Partner Reseller

Three-tier commission system: Simple (10%), Compute (20%), Platinum (30%). Monthly payouts.

Community Licenses

Trial, Basic, Pro, and Platinum tiers. Manage organizations, teams, and member roles.

Real-time Metering

Every API call tracked. Per-endpoint, per-model, per-agent billing with 99.99% accuracy.

Agent Engine

Autonomous agents with hierarchical delegation

Three specialized agent types that decompose tasks, delegate to subagents, and aggregate results. Powered by BullMQ for reliable task orchestration.

Build Agent

Code generation, file management, git operations, testing, and dependency resolution.

file_writecode_analyzergit_managertest_runner

Plan Agent

Task decomposition, risk analysis, timeline building, resource estimation, and milestone planning.

task_decomposerrisk_analyzertimeline_builder

Search Agent

Web research, document analysis, code search, paper summarization, and fact checking.

web_fetchdoc_analyzercode_searchfact_checker
Runtime
Bun
Framework
Hono
Language
TypeScript
Queue
BullMQ
Database
PostgreSQL
Vectors
ChromaDB

Simple, transparent pricing

Start free with local models. Scale up as your platform grows.

Starter

$0/forever

For individual developers exploring AI

  • 3 active agents
  • Local models via Ollama
  • 50K tokens/month
  • Community support
  • Basic analytics
Get Started
Most Popular

Pro

$49/month

For professional developers and small teams

  • 20 active agents
  • All cloud model providers
  • 500K tokens/month
  • Priority support
  • Partner reseller access
Get Started

Team

$149/month

For growing organizations

  • 100 active agents
  • 2M tokens/month
  • Community management
  • Team memory sharing
  • Custom workflows
Get Started

Enterprise

Custom

For large-scale deployments

  • Unlimited agents
  • On-premise deployment
  • SSO & SAML
  • Dedicated infrastructure
  • SLA guarantee
Get Started

Ready to power your AI ecosystem?

Deploy Substratum as your AI backbone. One backend, unlimited frontends, complete control.