FastAgentic

How FastAgentic works

FastAgentic sits between your agent framework and your users. Every request flows through one pipeline — protocols, governance, durability — before it reaches your agent, and back again on the way out. Here's the full path, and the five steps to get there.

Clients
REST · MCP hosts (Claude, Cursor) · other A2A agents
Protocol surface
@agent_endpoint → REST route + MCP tool + A2A skill, one shared schema
Governance
OAuth2/OIDC · RBAC · per-tenant cost budgets · PII masking · audit log
Durability
StepTracker checkpoints · run_opaque · Redis / Postgres / S3
Adapter
PydanticAI · LangGraph · CrewAI · LangChain · custom Runnable
Your agent
reasoning, tools, and model calls — unchanged

The same pipeline runs in reverse for the response — including token streaming, cost accounting, and checkpoint commits.

Five steps to production

  1. 1
    Install

    Add FastAgentic to your project with pip install fastagentic. It brings FastAPI and the adapter interfaces with it.

  2. 2
    Wrap your agent

    Pass your existing PydanticAI, LangGraph, CrewAI, or LangChain agent to the matching adapter — or run_opaque() to wrap it unchanged.

  3. 3
    Declare an endpoint

    Decorate an async function with @agent_endpoint. FastAgentic emits a REST route, an MCP tool, and an A2A skill from that single definition.

  4. 4
    Configure durability & governance

    Point StepTracker at Redis, Postgres, or S3, and set auth, RBAC, cost budgets, and PII masking through configuration.

  5. 5
    Run and observe

    Start the app; OpenTelemetry spans, structured logs, and per-run cost tracking flow to Langfuse, Portkey, or Datadog automatically.

One file. Every protocol.

A PydanticAI agent, exposed over REST, MCP, and A2A — with auth, durability, and cost tracking baked in. That's it. That's the app.

main.py
from fastagentic import App, agent_endpoint
from fastagentic.adapters import PydanticAIAdapter
from pydantic_ai import Agent

agent = Agent("openai:gpt-4o", system_prompt="You are a helpful research assistant.")

app = App(title="Research Service")

@agent_endpoint("/research", adapter=PydanticAIAdapter(agent))
async def research(query: str) -> str:
    """Answer research questions with cited sources."""
    ...

# One decorator gives you:
#   POST /research              (REST + streaming SSE)
#   MCP tool  research(query)   (Model Context Protocol)
#   A2A skill research          (Agent-to-Agent)
#   + auth, cost tracking, checkpoints, OpenTelemetry

Need FastAPI, LangGraph, or agent platform expertise?

Neul Labs — the team behind FastAgentic — takes on a limited number of consulting engagements each quarter. We help teams ship agents to production, fix broken LangGraph pipelines, and design governance for multi-tenant LLM platforms.