The deployment layer for agentic applications. Build agents with anything. Ship them with FastAgentic.
Project description
FastAgentic
Build agents with anything. Ship them with FastAgentic.
FastAgentic is the deployment layer for agentic applications. It transforms agents built with PydanticAI, LangChain, LangGraph, or CrewAI into production-ready services with REST, MCP, and streaming interfaces—plus authentication, policy, observability, and durability baked in.
FastAgentic is not an agent framework. It deploys them.
┌─────────────────────────┐ ┌─────────────────────────┐
│ Your Agent Logic │ │ FastAgentic │ REST, MCP, SSE, WebSocket
│ ───────────────── │ ──► │ (Deployment Layer) │ ──► Auth, Policy, Telemetry
│ PydanticAI │ │ │ Durability, Cost Control
│ LangGraph │ │ One decorator = │
│ CrewAI │ │ Production service │
│ LangChain │ │ │
└─────────────────────────┘ └─────────────────────────┘
Supported Adapters
| Framework | Adapter | Best For |
|---|---|---|
| PydanticAI | PydanticAIAdapter |
Type-safe agents, structured outputs |
| LangGraph | LangGraphAdapter |
Stateful graph workflows, cycles |
| CrewAI | CrewAIAdapter |
Multi-agent collaboration |
| LangChain | LangChainAdapter |
Chains, LCEL runnables |
| Custom | BaseAdapter |
Your own framework |
What You Get
| Without FastAgentic | With FastAgentic |
|---|---|
| Write REST endpoints manually | @tool, @agent_endpoint decorators |
| Build MCP server from scratch | Automatic MCP schema fusion |
| Implement auth middleware | OAuth2/OIDC built-in |
| Add streaming yourself | SSE/WebSocket/MCP streaming |
| Build checkpoint system | Redis/Postgres/S3 durability |
| Instrument observability | OTEL traces and metrics |
| Track costs manually | Automatic cost logging |
| Write deployment scripts | fastagentic run |
Should You Use FastAgentic?
Yes, if you:
- Need to expose agents via REST and/or MCP protocols
- Require production governance (auth, policy, cost control, audit)
- Want to use multiple agent frameworks behind a unified interface
- Care about durability, streaming, and observability
Not yet, if you:
- Are experimenting with agent logic locally
- Have a single internal consumer with no governance needs
- Need an agent framework first (use PydanticAI, LangChain, etc.)
Installation
# Core installation
pip install fastagentic
# Or with uv (recommended)
uv add fastagentic
# With specific adapter support
uv add "fastagentic[pydanticai]"
uv add "fastagentic[langgraph]"
uv add "fastagentic[crewai]"
# With integrations
uv add "fastagentic[langfuse]" # Observability
uv add "fastagentic[portkey]" # AI Gateway
uv add "fastagentic[lakera]" # Security guardrails
# Everything
uv add "fastagentic[all]"
Quick Start
from fastagentic import App, agent_endpoint, prompt, resource, tool
from fastagentic.adapters.langgraph import LangGraphAdapter
from models import TicketIn, TicketOut, triage_graph
app = App(
title="Support Triage",
version="1.0.0",
oidc_issuer="https://auth.mycompany.com",
telemetry=True,
durable_store="redis://localhost:6379",
)
@tool(
name="summarize_text",
description="Summarize ticket text into key points",
scopes=["summaries:run"],
)
async def summarize(text: str) -> str:
...
@resource(name="run-status", uri="/runs/{run_id}", cache_ttl=60)
async def fetch_run(run_id: str) -> dict:
...
@prompt(name="triage_prompt", description="System prompt for support ticket triage")
def triage_prompt() -> str:
return """
You are a support triage assistant.
Ask clarifying questions when urgency or impact is ambiguous.
"""
@agent_endpoint(
path="/triage",
runnable=LangGraphAdapter(triage_graph),
input_model=TicketIn,
output_model=TicketOut,
stream=True,
durable=True,
mcp_tool="triage_ticket", # Expose as MCP tool
a2a_skill="support-triage", # Expose as A2A skill
)
async def triage(ticket: TicketIn) -> TicketOut:
...
Run the framework with both ASGI and MCP entry points:
# Start the HTTP server
fastagentic run
# Or run as MCP server (for Claude Desktop, etc.)
fastagentic mcp serve app:app
The command boots the FastAPI application, registers MCP discovery metadata, and exposes streaming endpoints for agent workflows.
First-Class Integrations
FastAgentic integrates with best-of-breed tools for specialized concerns:
from fastagentic import App
from fastagentic.integrations import (
LangfuseIntegration, # Observability & tracing
PortkeyIntegration, # AI Gateway (200+ LLMs)
LakeraIntegration, # Security guardrails
Mem0Integration, # Intelligent memory
)
app = App(
title="My Agent",
integrations=[
LangfuseIntegration(
public_key="pk-...",
secret_key="sk-...",
),
LakeraIntegration(
api_key="lak-...",
block_on_detect=True, # Block prompt injection
),
Mem0Integration(
api_key="m0-...",
auto_search=True, # Auto-inject relevant memories
),
]
)
| Integration | Purpose | Features |
|---|---|---|
| Langfuse | Observability | Tracing, analytics, prompt management |
| Portkey | AI Gateway | 200+ LLMs, fallbacks, caching |
| Lakera | Security | Prompt injection, PII detection |
| Mem0 | Memory | Semantic memory, auto-extraction |
Reliability Patterns
Built-in patterns for production resilience:
from fastagentic import App, RetryPolicy, CircuitBreaker, RateLimit
app = App(
title="Resilient Agent",
retry_policy=RetryPolicy(
max_attempts=3,
backoff="exponential",
retry_on=["rate_limit", "timeout"],
),
rate_limit=RateLimit(
rpm=60,
tpm=100000,
by="user",
),
)
How It Fits Together
+-----------------------------------------------------------+
| FastAgentic |
|-----------------------------------------------------------|
| @tool, @agent_endpoint, @resource, @prompt decorators |
| Schema fusion (Pydantic -> OpenAPI + MCP + A2A) |
| Unified Auth (OIDC/JWT -> MCP + A2A Auth Bridge) |
| Observability (OTEL traces, metrics, cost logs) |
| Policy (rate limits, quotas, roles, tenancy) |
| Streaming (SSE, WebSocket, MCP, gRPC) |
| Durable jobs (Redis/Postgres checkpoints) |
| Agent Registry (internal + external A2A agents) |
+-----------------------------------------------------------+
| Adapter Layer (PydanticAI, LangGraph, CrewAI, etc.) |
+-----------------------------------------------------------+
| Core Stack (FastAPI, AsyncSQLAlchemy, OTEL SDK) |
+-----------------------------------------------------------+
Protocol Alignment
- MCP specification (2025-11-25) with Tasks, Extensions, and OAuth support
- A2A protocol (v0.3) for agent-to-agent collaboration and discovery
- OpenAPI 3.1 JSON schemas derived from Pydantic models
- OAuth2/OIDC bearer authentication with scoped policies
- Streaming surfaces: Server-Sent Events, WebSocket, and MCP event streaming
Developer Tooling
| Command | Description |
|---|---|
fastagentic run |
Start the ASGI server |
fastagentic new |
Scaffold a new application with sample modules |
fastagentic info |
Show information about the current app |
fastagentic agent chat |
Interactive CLI for agent testing |
fastagentic agent query |
Send single queries (scriptable) |
fastagentic mcp serve |
Run as MCP stdio server (for Claude Desktop) |
fastagentic mcp schema |
Print MCP schema (tools, resources, prompts) |
fastagentic a2a card |
Print A2A Agent Card |
fastagentic test contract |
Verify OpenAPI and MCP schema parity |
Roadmap Highlights
- v0.1: Core decorators, MCP schema fusion, adapters, SSE streaming
- v0.2: Reliability patterns, MCP stdio, first-class integrations (Langfuse, Portkey, Lakera, Mem0)
- v0.3: Policy engine, cost tracking, audit logging
- v0.4: Advanced prompt management, human-in-the-loop actions
- v0.5: Cluster orchestration, distributed checkpointing
- v1.0: Python SDK, PII detection, dashboard & metrics, production readiness checker
- v1.1: New adapters (Semantic Kernel, AutoGen, LlamaIndex, DSPy), template ecosystem
- v1.2: Interactive Agent CLI for testing and development
Contributing
# Clone the repository
git clone https://github.com/fastagentic/fastagentic.git
cd fastagentic
# Install dependencies with uv
uv sync --extra dev
# Run tests
uv run pytest tests/ -v
# Run linting
uv run ruff check src/
Learn More
Getting Started
Templates
Adapters
- Adapters Overview
- PydanticAI Adapter
- LangGraph Adapter
- CrewAI Adapter
- LangChain Adapter
- Custom Adapters
Protocols
Operations
- Operations Guide
- Deployment (Docker, K8s, Serverless)
- Configuration Reference
- Observability
- Security & Compliance
Developer Tools
- Agent CLI - Interactive testing and development
Reference
Project details
Release history Release notifications | RSS feed
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 fastagentic-1.0.0.tar.gz.
File metadata
- Download URL: fastagentic-1.0.0.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9240c82e94ced5cfd42afccd5e1a777949ee5d775fc8b5bac448e58b3cc2bce
|
|
| MD5 |
c48244b60b2f2f0162efb937c54e5e2d
|
|
| BLAKE2b-256 |
a76f1e7f6884f1cc298d1965de9e17dbae99da6db7bb06796590cfb8b9b7d5b2
|
Provenance
The following attestation bundles were made for fastagentic-1.0.0.tar.gz:
Publisher:
release.yml on neul-labs/fastagentic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastagentic-1.0.0.tar.gz -
Subject digest:
c9240c82e94ced5cfd42afccd5e1a777949ee5d775fc8b5bac448e58b3cc2bce - Sigstore transparency entry: 801445059
- Sigstore integration time:
-
Permalink:
neul-labs/fastagentic@f95e2ed699e7a34fe84456f3d45d25f76159af19 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/neul-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f95e2ed699e7a34fe84456f3d45d25f76159af19 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file fastagentic-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fastagentic-1.0.0-py3-none-any.whl
- Upload date:
- Size: 220.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c98f0e6833761aa77512a7936c29d9bf6a4ebb88f16c33c68e58f884eb1fcbc
|
|
| MD5 |
146edaead80379629035475faa2a33fe
|
|
| BLAKE2b-256 |
3f7178eee22ef261dfe9016e967dcf979075598e356869aaaa7369fb5cf0788a
|
Provenance
The following attestation bundles were made for fastagentic-1.0.0-py3-none-any.whl:
Publisher:
release.yml on neul-labs/fastagentic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fastagentic-1.0.0-py3-none-any.whl -
Subject digest:
0c98f0e6833761aa77512a7936c29d9bf6a4ebb88f16c33c68e58f884eb1fcbc - Sigstore transparency entry: 801445115
- Sigstore integration time:
-
Permalink:
neul-labs/fastagentic@f95e2ed699e7a34fe84456f3d45d25f76159af19 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/neul-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f95e2ed699e7a34fe84456f3d45d25f76159af19 -
Trigger Event:
workflow_dispatch
-
Statement type: