Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

fast-agent-stack

PyPI Python CI License: MIT

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


License

MIT

Release files for fast-agent-stack 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fast-agent-stack 0.1.0a1
File Size Uploaded
fast_agent_stack-0.1.0a1.tar.gz 990.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fast-agent-stack 0.1.0a1
File Interpreter ABI Platform
fast_agent_stack-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / fast_agent_stack-0.1.0a1.tar.gz

Download URL fast_agent_stack-0.1.0a1.tar.gz
Size 990.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9b7a8ecea439667f2d8211a93303b0b95703664b9a4d7d2c5299a79bc80f74cc
BLAKE2b-256 checksum
How to use checksums
3ae2d35b7d3664b13add32f9773dc53b21895d26848f564cf714593168865e81
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / fast_agent_stack-0.1.0a1-py3-none-any.whl

Download URL fast_agent_stack-0.1.0a1-py3-none-any.whl
Size 118.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77107b7271dce8c246d5994a176a910be5ce95cf388ecb8fb80da761dd533b90
BLAKE2b-256 checksum
How to use checksums
2407683dc57220697db05d43b3690be76b1a43acd0ec1d5734814d362552e9b1
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page