This release is a pre-release and may not be stable for production use.
fast-agent-stack
Production infrastructure for AI agent applications, built on FastAPI.
fast-agent-stack gives you auth, database, vector search, background tasks, rate limiting, observability, and storage out of the box. Bring your own agent framework (Strands, Pydantic AI, LangGraph) or use the built-in @app.agent() for simple cases.
Quick Start
mkdir myproject && cd myproject
uv venv && source .venv/bin/activate
uv pip install fast-agent-stack
fas new myproject --preset agent
uv pip install -r pyproject.toml
fas migrate
fas dev
Visit http://localhost:8000/docs to see the interactive API.
Installation
# Core only
pip install fast-agent-stack
# With extras (mix and match)
pip install "fast-agent-stack[auth-jwt,db-postgres,vector-qdrant]"
# Full AI stack
pip install "fast-agent-stack[ai-full]"
Presets
Pick a preset and get a production-ready project in seconds:
| Preset | What you get |
|---|---|
minimal |
FastAPI app, SQLAlchemy, health checks, CLI |
standard |
+ JWT auth, SQLAdmin, Docker |
full |
+ rate limiting, background tasks, email, observability |
agent |
+ LLM backends, vector store, RAG pipeline, streaming |
fas new myproject --preset standard
Features
Infrastructure
- SQLAlchemy async + Alembic migrations
- Redis/Valkey: auth, rate limiting, response caching
- Background tasks (Dramatiq) + scheduler (Periodiq)
- Storage: S3, MinIO, local filesystem
- OpenTelemetry tracing (Jaeger backend)
- AWS / GCP secrets managers
Auth
- JWT + session auth backends, pluggable via settings
- RBAC: users, groups, permissions, API keys
- Redis JTI denylist, email verification, password reset
- SQLAdmin UI (optional)
Vector Search & RAG
- Vector stores: Qdrant, pgvector, OpenSearch, Weaviate
- Embedding backends: Bedrock, OpenAI, fastembed (local)
- RAG pipeline: chunk, embed, store / retrieve
- Document extraction: PDF, DOCX, XLSX, EML
AI / Agents
- Built-in
@app.agent()decorator for simple single-agent endpoints - LLM backends: AWS Bedrock, OpenAI, Anthropic, LiteLLM proxy
get_llm(settings)factory for one-line backend resolution- Framework integration guides for Strands Agents and Pydantic AI
Bring Your Own Agent Framework
fast-agent-stack's built-in @app.agent() covers simple cases (like FastAPI's BackgroundTasks). For serious agentic work, bring your own framework and use fast-agent-stack for the infrastructure:
# myproject/ai/agents/chat.py
from strands import Agent
from strands.models.litellm import LiteLLMModel
from myproject.ai.tools.search import search_docs
from myproject.settings import get_settings
_settings = get_settings()
def build_chat_agent():
model = LiteLLMModel(
model_id=f"openai/{_settings.llm_model}",
params={"api_key": _settings.llm_api_key, "api_base": _settings.llm_base_url},
)
return Agent(model=model, tools=[search_docs])
# myproject/routes.py
from fastapi.responses import StreamingResponse
@router.post("/agents/chat")
async def chat(body: ChatRequest) -> StreamingResponse:
return StreamingResponse(stream_chat(body.message), media_type="text/event-stream")
See the Strands Agents guide or Pydantic AI guide for full working examples.
Extras
# Auth
fast-agent-stack[auth-jwt] # JWT backend
fast-agent-stack[auth-session] # Session backend
# Database drivers
fast-agent-stack[db-postgres] # asyncpg
fast-agent-stack[db-sqlite] # aiosqlite
fast-agent-stack[db-mysql] # aiomysql
# LLM backends
fast-agent-stack[anthropic] # Anthropic SDK
fast-agent-stack[openai] # OpenAI SDK
fast-agent-stack[bedrock] # aioboto3 (AWS Bedrock)
fast-agent-stack[litellm] # LiteLLM proxy
# Vector stores
fast-agent-stack[vector-qdrant]
fast-agent-stack[vector-pgvector]
fast-agent-stack[vector-opensearch]
fast-agent-stack[vector-weaviate]
# Background tasks
fast-agent-stack[tasks] # Dramatiq + Redis broker
# Observability
fast-agent-stack[tracing] # OpenTelemetry + Jaeger
# Full AI bundle
fast-agent-stack[ai-full]
CLI
| Command | Description |
|---|---|
fas new <name> |
Scaffold a new project |
fas dev |
Dev server (127.0.0.1, auto-reload) |
fas run |
Production server (0.0.0.0, multi-worker) |
fas migrate |
Apply all migrations |
fas makemigrations |
Generate migration from model changes |
fas worker <module> |
Start Dramatiq worker |
fas scheduler <module> |
Start Periodiq scheduler |
fas createsuperuser |
Create a superuser account |
fas version |
Print installed version |
fastagentstack also works as the full-length alias.
Documentation
- Tutorial - Build a Document Q&A app step by step
- Framework Integration Guides - Strands Agents, Pydantic AI
- Getting Started
- Authentication & Authorization
- AI Module & Agents
- RAG Pipeline
- Storage & Extraction
- Background Tasks & Scheduling
- Rate Limiting & Observability
- Deployment
- Custom Backends
- Configuration Reference
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fast_agent_stack-0.1.0a1.tar.gz.
File metadata
- Download URL: fast_agent_stack-0.1.0a1.tar.gz
- Upload date:
- Size: 990.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b7a8ecea439667f2d8211a93303b0b95703664b9a4d7d2c5299a79bc80f74cc
|
|
| MD5 |
5cab3a076a60a9cb0cd3f27cb2e34740
|
|
| BLAKE2b-256 |
3ae2d35b7d3664b13add32f9773dc53b21895d26848f564cf714593168865e81
|
File details
Details for the file fast_agent_stack-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: fast_agent_stack-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 118.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77107b7271dce8c246d5994a176a910be5ce95cf388ecb8fb80da761dd533b90
|
|
| MD5 |
1ad87050b2c35b5cb4e08d5f4477692d
|
|
| BLAKE2b-256 |
2407683dc57220697db05d43b3690be76b1a43acd0ec1d5734814d362552e9b1
|