Skip to main content

Prerequisites

Fast Agent requires:
  • Python: 3.13.5 or higher (but less than 3.14)
  • uv: Astral’s fast Python package manager (recommended)
While you can use pip to install Fast Agent, we recommend using uv for the best experience. It’s significantly faster and handles dependency resolution more efficiently.
If you don’t have uv installed, install it first:
curl -LsSf https://astral.sh/uv/install.sh | sh
For more installation options, see the uv documentation.

Install Fast Agent

Install Fast Agent with uv:
uv pip install fast-agent-mcp
Verify the installation:
fast-agent --version

Using pip

If you prefer pip, you can install Fast Agent directly:
pip install fast-agent-mcp

Optional Dependencies

Fast Agent supports additional providers through optional dependencies:

Azure OpenAI

For Azure OpenAI with DefaultAzureCredential support:
uv pip install fast-agent-mcp[azure]

AWS Bedrock

For AWS Bedrock support:
uv pip install fast-agent-mcp[bedrock]

TensorZero Gateway

For TensorZero gateway support:
uv pip install fast-agent-mcp[tensorzero]

Textual UI

For Textual-based UI components:
uv pip install fast-agent-mcp[textual]

All Providers

To install support for all providers at once:
uv pip install fast-agent-mcp[all-providers]

API Keys Setup

Fast Agent needs API keys for the LLM providers you want to use. You can provide these in two ways: Set environment variables for your API keys:
export OPENAI_API_KEY="your-openai-key"
export ANTHROPIC_API_KEY="your-anthropic-key"
export GOOGLE_API_KEY="your-google-key"

Configuration File

Alternatively, create a fastagent.secrets.yaml file:
fastagent.secrets.yaml
# FastAgent Secrets Configuration
# WARNING: Keep this file secure and never commit to version control

openai:
  api_key: your-openai-key-here

anthropic:
  api_key: your-anthropic-key-here

google:
  api_key: your-google-key-here

deepseek:
  api_key: your-deepseek-key-here

groq:
  api_key: your-groq-key-here
Never commit fastagent.secrets.yaml to version control. Add it to your .gitignore file.
Fast Agent looks recursively for fastagent.secrets.yaml, so you only need to manage this at the root folder of your agent definitions.

Azure Configuration

For Azure OpenAI, you’ll need additional configuration:
fastagent.secrets.yaml
azure:
  api_key: your-azure-key-here
  base_url: "https://your-resource-name.openai.azure.com/"
  azure_deployment: "gpt-4.1"  # Your model deployment name
  # api_version: "2024-10-21"  # Optional

Verify Installation

Test your installation with an interactive session:
fast-agent go
This starts an interactive Fast Agent session. Try asking a simple question to verify everything is working.
If you haven’t set up API keys yet, the fast-agent go command will prompt you for the required configuration.

Platform-Specific Notes

Windows

Windows users need a couple of configuration changes for the Filesystem and Docker MCP Servers. The necessary changes are detailed within the configuration files generated by fast-agent scaffold.

Linux

On Linux, Fast Agent automatically uses uvloop for better async performance. No additional configuration needed.

Next Steps

Now that Fast Agent is installed, you’re ready to build your first agent!

Quickstart Guide

Build your first Fast Agent in under 5 minutes

Troubleshooting

Python Version Issues

If you get Python version errors, ensure you’re using Python 3.13.5 or higher:
python --version
You can install a specific Python version with uv:
uv python install 3.13

Import Errors

If you encounter import errors, try reinstalling Fast Agent:
uv pip uninstall fast-agent-mcp
uv pip install fast-agent-mcp

API Key Errors

If you get API key errors, verify that:
  1. Your environment variables are set correctly
  2. Your fastagent.secrets.yaml file is in the current or parent directory
  3. The API keys are valid and have the necessary permissions

Getting Help

If you encounter issues: