BotVibe
Technical Specification

The BotSpeak Protocol

An open protocol for normalized AI model communication. Script-aware tokenization, cross-provider cost normalization, and intelligent routing — formalized into a spec.

Protocol stack

Four layers. Zero ambiguity. Every AI request normalized from transport to billing.

L0

Transport

HTTP/2 + WebSocket

Dual-channel communication for streaming and batch requests. Automatic protocol negotiation.

L1

Encoding

UTF-8 + Script-Aware Tokenization

Native encoding for Devanagari, Arabic, and Cyrillic scripts. Token boundaries respect morphological units.

L2

Normalization

Unified Cost Schema

Cross-provider token cost normalization. Standardized billing units regardless of underlying model tokenizer.

L3

Routing

Intelligent Model Selection

Context-aware routing based on language, latency requirements, cost constraints, and compliance rules.

Normalized cost schema

Every response includes a standardized cost object. Compare GPT-4o vs Claude vs Gemini token costs in the same unit — regardless of their native tokenizer.

The normalized_cost field always uses BotVibe Standard Token Units (BSTU), enabling true apples-to-apples cost comparison.

{
  "model": "gpt-4o",
  "provider": "openai",
  "usage": {
    "prompt_tokens": 1247,
    "completion_tokens": 892,
    "total_tokens": 2139
  },
  "normalized_cost": {
    "bstu": 0.00427,
    "currency": "USD",
    "equivalent": 0.0213
  },
  "routing": {
    "region": "ap-south-1",
    "latency_ms": 142,
    "failover_used": false
  }
}