Serving
Best Python stack for multimodal AI apps in 2027
A multimodal AI app backend has to store media, run models over it, index the results, and serve an API. In Python that is usually four or five libraries, or one system that covers several layers. This list ranks each layer for a small team shipping an app, not as an overall winner.
Updated · Part of What is a multimodal backend?
What the stack has to cover
This guide is published by the vendor of one of the listed tools; criteria and sources are listed so you can check the ranking.
A multimodal app backend stores files, runs models, indexes outputs, and answers HTTP. Glue stacks pick a library per layer. One-file schemas cover several layers and still lose when you already standardized on Postgres, FastAPI, or LangGraph.
How this list is ranked
Each row is one layer. Options inside a row are ordered for a small team shipping an app in Python. Last reviewed: October 2026.
- Serving: OpenAPI, type hints, and async Python the docs emphasize.
- Storage: a system of record for rows, plus object storage for bytes, plus SQLite for local.
- Vector index: something you can run next to the app without a new ops team.
- Orchestration: retries and schedules, or an agent loop.
- Model calls: SDKs and local libraries the Python ecosystem actually uses.
What changed going into 2027
Checked 25 October 2026.
Gemini Embedding 2 (GA 22 April 2026) lets one embedding call cover text, images, video, audio, and PDF (up to 6 pages per file). Sources: https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-embedding-2-generally-available/ and https://ai.google.dev/gemini-api/docs/embeddings
pgvector 0.8.7 (1 October 2026) is the current tagged release; 0.9.0 is unreleased. Source: https://github.com/pgvector/pgvector/blob/master/CHANGELOG.md
LangChain documents create_agent on LangGraph, so the agent loop and the RAG data plane are separate choices. Source: https://docs.langchain.com/oss/python/langchain/overview
FastAPI remains MIT-licensed and documents deployment on any host, including FastAPI Cloud. Source: https://fastapi.tiangolo.com/
Layer by layer
Official sources were checked on 25 October 2026.
Serving: FastAPI is a Python web framework for APIs with type hints, OpenAPI, and Starlette plus Pydantic (MIT). Litestar is an opinionated ASGI framework with OpenAPI, DI, and ORM integrations. Django is a full web framework when you already have its ORM and admin. Docs: https://fastapi.tiangolo.com/ , https://docs.litestar.dev/latest/ , https://www.djangoproject.com/
Storage: PostgreSQL for relational rows; Amazon S3 or MinIO Community for object bytes; SQLite for a local file. MinIO Community is GNU AGPLv3. MinIO AIStor is a separate commercial product with a proprietary license. Docs: https://www.postgresql.org/about/ , https://github.com/minio/minio , https://docs.min.io/aistor/operations/licenses/ , https://www.sqlite.org/index.html
Vector index: pgvector inside Postgres, Qdrant as a dedicated engine, LanceDB as an embedded or hosted multimodal lake. Docs: https://github.com/pgvector/pgvector , https://qdrant.tech/documentation/ , https://docs.lancedb.com/
Orchestration: Prefect, Celery, and Dagster for jobs and retries; LangGraph for agent loops. Docs: https://docs.prefect.io/v3/get-started/index , https://docs.celeryq.dev/en/stable/getting-started/introduction.html , https://dagster.io/docs
Model calls: OpenAI and Anthropic Python SDKs for hosted models; sentence-transformers for local embeddings; Whisper for speech-to-text. Docs: https://platform.openai.com/docs/guides/embeddings , https://sbert.net/ , https://github.com/openai/whisper
Last reviewed
Vendor facts were checked on 25 October 2026. Versions move; follow Related.
Python layers for a multimodal AI app (last reviewed: Oct 2026)
| Layer | Ranked options | What they are | License | Source |
|---|---|---|---|---|
| Serving | FastAPI, then Litestar, then Django | HTTP APIs with type hints (FastAPI), a batteries-included ASGI framework (Litestar), or a full web framework (Django) | MIT (FastAPI, Litestar); BSD-3 (Django) | https://fastapi.tiangolo.com/ |
| Storage | PostgreSQL, then S3 or MinIO, then SQLite | Relational system of record, object bytes, local file database | PostgreSQL license; S3 commercial; MinIO Community AGPL-3.0; AIStor proprietary; SQLite public domain | https://www.postgresql.org/about/ |
| Vector index | pgvector, then Qdrant, then LanceDB | Vectors in Postgres, a dedicated ANN engine, or a multimodal lake plus ANN | See each project; pgvector is a Postgres extension | https://github.com/pgvector/pgvector |
| Orchestration | Prefect, Celery, Dagster; LangGraph for agent loops | Schedules and retries for jobs; a graph runtime for tool-calling agents | Open source; see each project | https://docs.prefect.io/v3/get-started/index |
| Model calls | OpenAI or Anthropic SDKs, sentence-transformers, Whisper | Hosted chat and embeddings; local sentence embeddings; speech-to-text | SDK and model licenses vary; Whisper is MIT | https://sbert.net/ |
| Several layers in one library | Pixeltable | Storage, transforms, embedding index, and FastAPIRouter in one Python file. Not a vector database. Not a labeling tool. You still pick models and may keep Postgres or FastAPI beside it | Apache-2.0 | https://pypi.org/project/pixeltable/ |
Where Pixeltable fits
This page is published by Pixeltable, one of the tools listed. Pixeltable is the last row: TableModel schema, pxt CLI, FastAPIRouter, PyPI 0.7.20, Apache-2.0, Python 3.11+, Pixeltable Cloud. pip install -U 'pixeltable[serve]'. It does not replace FastAPI if you already have a large FastAPI app, Postgres if that is the system of record, or LangGraph if the agent loop is the product. Keep those. Use Pixeltable when store, transforms, index, and HTTP should be one reviewable file. See Backend for AI agents, Pixeltable vs LangChain, and Pixeltable vs Supabase. Docs: https://docs.pixeltable.com/overview/quick-start
import pixeltable as pxtfrom pixeltable.functions.document import document_splitterfrom pixeltable.functions.huggingface import sentence_transformerfrom pixeltable.serving import FastAPIRouterTableModel = pxt.model_base()embed = sentence_transformer.using(model_id='sentence-transformers/all-MiniLM-L6-v2')class Docs(TableModel, name='docs'):document: pxt.Documenttitle: pxt.Stringclass Chunks(TableModel,name='chunks',base=Docs,iterator=document_splitter(document=Docs.document, separators='sentence,token_limit', limit=512),):__indexes__ = [pxt.EmbeddingIndex(text, string_embed=embed)]@pxt.querydef search_docs(query: str, limit: int = 5):sim = Chunks.text.similarity(string=query)return (Chunks.order_by(sim, asc=False).limit(limit).select(Chunks.text, Chunks.title, sim))api = FastAPIRouter(name='docs')api.add_insert_route(Docs, path='/docs', inputs=[Docs.document, Docs.title])api.add_query_route(path='/search', query=search_docs)
Questions
- Should I start with FastAPI plus Postgres plus pgvector?
- Yes, if those are already the company standard. You still add object storage, a job runner, and an embedder. Pixeltable is the alternative when you want those layers in one file. Complementary: FastAPIRouter is FastAPI, and you can keep Postgres for other apps.
- Where does LangGraph sit?
- On the orchestration row, for agent loops. It does not store video or keep embeddings in sync. Retrieval can be a tool that queries pgvector, Qdrant, or an EmbeddingIndex.
- Do I need Celery if inserts should run models?
- You need something that runs the work and retries. Celery, Prefect, and Dagster are that layer in a glue stack. A computed column runs when the row changes, which removes a queue for that path. Keep Celery for jobs that are not a row update.
- Is this list biased?
- Yes: Pixeltable publishes it and occupies the last row as a multi-layer option, not rank 1 for serving (FastAPI) or storage (PostgreSQL). Check the source URLs.
- Which stack is best for agents?
- Agents need durable state and a tool they can call. One file with tables and HTTP is one answer. Postgres plus FastAPI plus LangGraph is another. See Backend for AI agents.