One application.
Many AI providers.
AIRTP is a protocol layer that isolates application logic from both AI providers and transport details. Applications communicate with a consistent session interface. Provider adapters translate requests into provider-specific APIs, while the transport layer handles reliable message delivery. Switching providers or transports requires no changes to application code.
Start with the TLDR;TLDR;
Provider Independence
Application code targets the AIRTP protocol—not a vendor SDK. Adapters map AIRTP semantics to each provider.
Transport Independence
WebSocket, HTTP, local IPC, pipes, or future transports all fit behind a consistent session interface.
Protocol Features
Capability negotiation, envelopes, streaming, chunking, and reassembly are protocol concepts—not provider-specific code.
Core ideas
Interactive Layered Architecture
Each layer has a single responsibility. Select a layer in the diagram to explore its role and better understand how AIRTP separates application logic from provider-specific implementations.
- Application — business logic, workflows, and prompts.
- Session Layer — session lifecycle, routing, streaming state.
- Provider Adapter — translates AIRTP messages into provider APIs.
- Transport — WebSocket, HTTP, local IPC, or future transports.
- AI Provider — the endpoint performing inference.
Protocol Flow Animation
AIRTP represents communication through structured protocol messages—not direct provider SDK calls. Requests travel downward through the stack while streamed responses move upward through the same session.
Open Session
Negotiate Capabilities
Send Envelope
Receive Stream
Complete Session
Provider Independence
Applications communicate with a stable protocol—not a vendor SDK. Adapters isolate provider-specific differences, allowing seamless provider switching without changes to business logic.
| Concern | Application | Adapter |
|---|---|---|
| Authentication | None | Provider-specific |
| Request Format | AIRTP Envelope | Translation |
| Streaming | Session Events | Protocol Mapping |
| Error Handling | Unified | Normalization |
| Model Selection | Logical Capability | Provider Mapping |
Application
│
▼
send(envelope)
│
▼
AIRTP Session
│
▼
Adapter
├── Provider A
├── Provider B
├── Provider C
└── Future Provider
Adding a new provider requires implementing an adapter—not changing application code.
Transport Independence
AIRTP is transport-agnostic. Message delivery, streaming, and session semantics remain consistent regardless of how bytes move between peers.
Capability Negotiation
Capabilities are negotiated at session initialization. Applications express requirements, and adapters advertise supported features. This negotiation results in a mutually accepted feature set.
| Capability | Status |
|---|---|
| Streaming | Enabled |
| Structured Output | Enabled |
| Tool Calling | Enabled |
| Audio | Unavailable |
| Vision | Optional |
Client
│
├── supported_features[]
│
▼
Session Layer
│
├── intersect()
│
▼
Provider Adapter
│
├── provider_capabilities[]
│
▼
Negotiated Session
Negotiation enables AIRTP to expose the strongest common feature set without requiring application changes for each provider.
Message Envelope Visualization
Every AIRTP exchange is represented as a structured envelope. Metadata is separate from the application payload, allowing adapters to translate semantics while preserving the user’s intent.
Chunking & Reassembly
Large payloads and streamed responses are transported in ordered chunks. The session layer tracks sequence numbers, verifies completion, and reassembles messages before delivering them to the application.
Why chunk?
- Handles arbitrarily large responses.
- Enables progressive streaming to the application.
- Improves resilience across diverse transports.
- Provides deterministic ordering with sequence numbers.
- Enables resumable sessions.