Supercharge Your Agents: Build AI Workflows in Minutes with Fast-Agent
Unlock the power of sophisticated AI agents and workflows with fast-agent, the first framework offering complete MCP feature support, including sampling. Ready to build effective agents using Anthropic and OpenAI models? This guide shows you how.
Why Choose Fast-Agent?
- Rapid Development: Create agents and workflows in minutes.
- MCP Native: Leverages MCP (Model-Controller-Presenter) architecture directly.
- Multi-Modal Support: Handles images and PDFs with ease.
- Simple Syntax: Focus on prompts and MCP Servers, not boilerplate code.
- Easy Testing: Passthrough and playback LLMs streamline Python glue-code development.
Kickstart Your Agent Development
Ready to jump in? Here's how to get started:
- Install:
uv pip install fast-agent-mcp
- Setup:
fast-agent setup
(creates example agent and config files) - Run:
uv run agent.py
- Specify Model:
uv run agent.py --model=o3-mini.low
- Explore:
fast-agent quickstart workflow
(for building effective agents examples)
Pro-Tip: Windows users may need configuration changes for Filesystem and Docker MCP Servers. Details are in the configuration files.
Building Basic Agents: It's Easier Than You Think
Defining an agent is incredibly straightforward with fast-agent. Just use the @fast.agent
decorator!
Now, interact with your agent:
Or, engage in interactive chat:
Combining Agents with MCP Servers
The real power of fast-agent comes from combining agents into workflows using MCP Servers. This lets you create complex chains of actions without tedious coding.
- Use
fast-agent quickstart workflow
to generate example workflows. - fast-agent searches for configuration files in the current and parent directories.
Mastering Workflows: Chain, Parallel, and More
Fast-Agent offers several powerful workflow types to orchestrate your agents.
- Chain: Execute agents sequentially. Great for tasks that require a specific order of operations.
- Parallel: Run agents simultaneously for faster processing or ensembling diverse LLM outputs.
- Human Input: Agents can request help from a real person to handle ambiguous situations or complex decisions.
- Evaluator-Optimizer: Refine content iteratively, using one agent to generate and another to evaluate quality.
- Router: Route messages to the most appropriate agent based on content analysis.
- Orchestrator: Decompose complex tasks into sub-tasks and distribute them among available agents.
Deep Dive: Agent Features and Customization
Calling Agents:
- Flexibly call agents using names or default configurations.
- Use
send
orprompt
functions for interactive sessions.
Defining Agents:
- Customize agents with names, instructions, MCP servers, models, and more.
- Control chat history, request parameters, and human input capabilities.
Multimodal Magic: Handling Images and PDFs
Fast-Agent excels at handling multimodal data. Add resources to prompts using the inbuilt prompt-server or MCP Types directly.
MCP Prompts and Sampling: Fine-Tuning for Success
- Use
apply_prompt(name, arguments)
for MCP Prompts. - Configure sampling LLMs per client/server pair in
fastagent.config.yaml
.
Ready to Revolutionize Your AI Development?
Fast-agent is your key to unlocking rapid, efficient, and sophisticated AI agent development. Build multi-modal workflows, leverage powerful features, and create intelligent solutions in minutes. Start building effective agents today!