FastAgentic

Quickstart

From an empty directory to an agent serving REST, MCP, and A2A — in about ten minutes.

1. Install

Python 3.10+ is required.

pip install fastagentic

2. Wrap an agent in an endpoint

One decorator emits every protocol surface. This example uses PydanticAI; swap the adapter for LangGraph, CrewAI, or LangChain.

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."""
    ...

3. Run it

# start the app (REST + MCP + A2A all come up together)
fastagentic run app:app --reload

#   POST /research           REST + streaming SSE
#   MCP tool  research       for Claude / Cursor
#   A2A skill research       for other agents

4. Go to production

Add durability and governance when you're ready. The production deployment guide walks through StepTracker backends, cost budgets, and observability.

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.