> For the complete documentation index, see [llms.txt](https://docs.adaptiveap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adaptiveap.com/developer/reference/tech-stack.md).

# Tech Stack

Adaptive is built on a set of focused, production-proven services. This page describes the layers of the stack that are relevant to developers integrating with the platform, why each was chosen, and where to find official documentation.

***

## Stack overview

| Layer                          | Technology                           | Why we use it                                                                                                             |
| ------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| **API backend**                | FastAPI + Python                     | High-throughput async ASGI framework with first-class Pydantic validation and auto-generated OpenAPI schemas              |
| **Real-time voice and chat**   | LiveKit                              | Open-source WebRTC platform purpose-built for AI voice agents, with managed cloud, native SIP, and open client SDKs       |
| **Primary datastore**          | PostgreSQL on Railway                | Reliable managed PostgreSQL with automated backups, point-in-time recovery, and private networking                        |
| **Authentication**             | Supabase Auth                        | Fully managed auth layer with email/password, magic links, SSO (SAML/OIDC), MFA, and SCIM provisioning                    |
| **OAuth token management**     | Nango                                | Multi-tenant OAuth proxy that handles token storage, refresh, and scoping for 100+ third-party integrations               |
| **LLM inference**              | OpenAI, Anthropic, LiveKit Inference | Multiple provider support for GPT-4 class and Claude models; LiveKit Inference for low-latency voice turn-around          |
| **Text-to-speech**             | ElevenLabs, LiveKit TTS              | High-quality, low-latency voice synthesis with custom voice cloning for branded agent personas                            |
| **Speech-to-text**             | LiveKit STT (Deepgram)               | Streaming STT optimised for conversational latency inside LiveKit rooms                                                   |
| **Vector knowledge retrieval** | Pinecone + OpenAI Vector Stores      | Fast ANN vector search for RAG; Pinecone for persistent named namespaces, OpenAI Vector Stores for model-native retrieval |
| **File and audio storage**     | Cloudflare R2                        | S3-compatible object storage with no egress fees and global edge caching                                                  |
| **Telephony**                  | Twilio                               | Programmable voice, SMS, MMS, and WhatsApp with Adaptive's SIP bridge to LiveKit                                          |
| **Video avatars**              | Tavus                                | AI video avatar generation for visual agent personas                                                                      |

***

## Layer detail

### FastAPI + Python

FastAPI's async-first design is a natural fit for an AI agent platform where most request handlers are I/O-bound — waiting on LLM calls, database queries, or third-party APIs. Pydantic validation runs at the schema layer before any business logic executes.

**Official docs:** [fastapi.tiangolo.com](https://fastapi.tiangolo.com) · [docs.pydantic.dev](https://docs.pydantic.dev)

### LiveKit

LiveKit underpins all real-time audio and chat in Adaptive — the agent worker runs as a LiveKit Agent, rooms are created per session, and all clients (web widget, custom apps) join via LiveKit SDKs. The native SIP support enables the Twilio Media Streams bridge for phone channels.

**Official docs:** [docs.livekit.io](https://docs.livekit.io)

### PostgreSQL on Railway

Every Adaptive resource — agents, sessions, channels, knowledge metadata, secrets — lives in PostgreSQL. Railway's managed offering provides automated backups with point-in-time recovery and a private networking layer that keeps the database off the public internet.

**Official docs:** [railway.app/docs](https://railway.app/docs) · [postgresql.org/docs](https://www.postgresql.org/docs/)

### Supabase Auth

Supabase Auth handles user registration, login, session management, SSO, MFA, and SCIM. Adaptive stores no passwords itself — all credential management is delegated to Supabase. RS256-signed JWTs carry the `organisation_id` claim used for access scoping throughout the API.

**Official docs:** [supabase.com/docs/guides/auth](https://supabase.com/docs/guides/auth)

### Nango

Nango runs as an OAuth proxy layer sitting between Adaptive and every third-party integration. When a user connects a service (e.g., Salesforce), Nango manages the consent flow, stores the access and refresh tokens in an encrypted vault, and returns a valid token on demand. Adaptive never touches raw OAuth credentials.

**Official docs:** [docs.nango.dev](https://docs.nango.dev)

### OpenAI + Anthropic

Adaptive routes LLM inference to OpenAI (GPT-4 class) and Anthropic (Claude) based on agent configuration. Both providers are contracted under data processing agreements that prohibit use of customer data for model training.

**Official docs:** [platform.openai.com/docs](https://platform.openai.com/docs) · [docs.anthropic.com](https://docs.anthropic.com)

### ElevenLabs

ElevenLabs provides the text-to-speech pipeline for voice agents, offering natural-sounding synthesis with support for custom voice cloning so agents can have a distinctive, branded voice.

**Official docs:** [elevenlabs.io/docs](https://elevenlabs.io/docs)

### Pinecone + OpenAI Vector Stores

Agent knowledge sources are embedded and stored in Pinecone (persistent, named namespaces per knowledge component) or OpenAI Vector Stores (for model-native file search). At run-time, the RAG layer performs a semantic search, retrieving the most relevant chunks before each LLM inference call.

**Official docs:** [docs.pinecone.io](https://docs.pinecone.io) · [platform.openai.com/docs/assistants/tools/file-search](https://platform.openai.com/docs/assistants/tools/file-search)

### Cloudflare R2

Audio recordings from voice sessions, file uploads for knowledge sources, and exported data are stored in Cloudflare R2. Access is controlled with time-limited signed URLs. There are no egress fees, which matters at scale for audio-heavy deployments.

**Official docs:** [developers.cloudflare.com/r2](https://developers.cloudflare.com/r2)

### Twilio

Adaptive uses Twilio for voice (programmable SIP, inbound/outbound calls), SMS, MMS, and WhatsApp channels. Inbound Twilio webhooks are validated using Twilio's HMAC signature verification before any call processing begins.

**Official docs:** [twilio.com/docs](https://www.twilio.com/docs)

### Tavus

Tavus generates AI-powered video avatar personas for agents deployed in video-capable contexts. Agents can be given a consistent visual identity, with lip-sync matched to ElevenLabs TTS output.

**Official docs:** [docs.tavus.io](https://docs.tavus.io)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.adaptiveap.com/developer/reference/tech-stack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
