Requires Python 3.12+ and uv.
# Install or upgrade the CLI
uv tool install -U fast-agent-mcp
# Verify providers, OAuth, and terminal capabilities
fast-agent check
# Start an interactive coding session with shell + programmatic tool calling
fast-agent -xCommon launch flags:
# Pick a model and enable shell + built-in subagents
fast-agent --model opus -xx
# Connect directly to a remote MCP server (Streamable HTTP with OAuth)
fast-agent --url https://huggingface.co/mcp
# Enable built-in image generation and inline terminal rendering
fast-agent --image-gen
# Auto-configure local models via llama.cpp
fast-agent model llamacppInside a session, run shell commands with !, attach MCP servers with /mcp connect, manage skills with /skills, and install plugins with /plugins add. See the Installation & Quick Start Guide.
Instead of serializing dozens of tool round-trips through the context window, fast-agent lets models write concise async Python executed inside a fast pydantic-monty sandbox:
- Concurrent orchestration: batch independent shell commands, file reads, and MCP calls with
asyncio.gather(...), then filter and aggregate before returning a compact summary. - On-demand Tool Search (
search_tools) &/tools select: large MCP tool catalogs stay deferred behind deterministic BM25F lexical search (--ptc), keeping prompts lean while preserving full static type-checking inside the sandbox. Connect to a server likefast-agent -x --url https://huggingface.co/mcpand run/tools selectto inspect typed Python stubs, check token budgets, and attach specific functions (^tool:<name>) on demand. - Persistent cell state: keep structured intermediate values across sandbox turns via
store()/load().
See CLI Reference (fast-agent go) and Configuration.
Every harness decision in fast-agent is validated on Terminal-Bench and DeepSWE across open-weights and proprietary models — benchmarked directly against leading harnesses (Codex, Claude Code, Grok Build, mini-SWE-agent) with published ATIF traces, per-trial costs, and atif-scan audits. On the Terminal-Bench 4.1 subset, fast-agent with GPT-6.1 Sol reaches 62.1% at $95 — outscoring Codex on the same model and approaching top Claude Code runs at ~10× lower cost.
Explore interactive leaderboards, model comparisons, and raw trial traces at fast-agent.ai/benchmarks.
fast-agent runs in your real primary terminal buffer — never trapping you in an alternate-screen TUI:
- Native scrollback & copy-paste: full terminal scrollback, native mouse selection, true ANSI colors, and themeable syntax highlighting.
- Modern terminal protocols: OSC 133 prompt marks (jump between turns in Kitty, Ghostty, WezTerm, iTerm2), OSC 7501 live lifecycle status, and DEC Mode 2026 synchronized output for a flicker-free inline prompt and completion menu.
- Fast terminal diagnostics: verify color depth, protocol support, and inline image capabilities anytime with
fast-agent check terminal.
Run fast-agent -x inside Herdr / herdr-core (hc) for persistent terminals and live multi-agent orchestration:
- Automatic detection: reports live
working/idle/blockedstatus over OSC 7501 and tracks child workers across git worktrees and remote machines. - Human-in-the-loop takeover: every worker runs in a real terminal you can inspect, steer, or take over at any time.
- Prompt-cache keep-warm: automatically keeps your provider prompt cache warm while waiting on long-running workers without mutating conversation history.
Read the Herdr Guide and Prompt-Cache Keep-Warm Guide.
fast-agent is a full-featured Model Context Protocol client and server runtime covering Streamable HTTP, STDIO, OAuth, Elicitations, Sampling with Tools, Skills over MCP (io.modelcontextprotocol/skills with SHA-256 manifest verification), and MCP Events (SEP-3415 poll and push streams).
Run /mcp status to inspect negotiated protocol era (modern / legacy), live POST (JSON) & POST (SSE) activity timelines, capability badges, and extension availability:
Try these hosted servers right from an interactive session:
| Server | Demonstrates | Connect Command |
|---|---|---|
| MCP Events Test Lab | SEP-3415 poll/push event streams, replay, revocations (source) | /mcp connect https://mcp-events.fast-agent.ai/mcp --name events |
| MCP Tasks Playground | SEP-2663 async jobs, input_required, cancellation, TTL |
/mcp connect https://mcp-tasks.fast-agent.ai/mcp --name tasks |
| WebCam MCP | Webcam capture, screenshots, and live MCP Events | /mcp connect "https://webcam.fast-agent.ai/mcp?user=<id>" |
| Hugging Face MCP | Streamable HTTP, OAuth, SSE progress, Skills over MCP | /mcp connect https://huggingface.co/mcp --name hf |
See MCP Transport Diagnostics, Skills over MCP, and MCP Events.
Pass --image-gen (or --image-gen=<model>) for built-in generate_image and edit_image tools across OpenAI/Codex, xAI, and Google. Generated images render inline via Kitty, Sixel, or halfcell graphics and scroll naturally with your terminal history — verify graphics support with fast-agent check terminal --image:
Extend fast-agent with lightweight Python plugins installed globally or per-project (fast-agent plugins add <name> or /plugins add inside a session):
- Composable extensions: add custom slash commands, tab-completers, tools, and post-turn hooks/displays without forking the harness.
- Cross-workspace session management (
session-finder): index and search past sessions across repositories and worktrees by text, directory, or time window, read structured transcript excerpts, and jump straight back into live or archived sessions in Herdr or via resume commands. - Usage & cost analytics (
usage-tracker):/stats,/cost, and/performancewith per-turn cost/TTFT bars and a multi-machine SQLite ledger, plusedit-assistant(/peek,/edit-last).
fast-agent plugins add usage-tracker
fast-agent plugins add session-finderSee the Plugins Guide.
Full guides, configuration references, and API docs live at fast-agent.ai:
| Topic | Link |
|---|---|
| Getting Started & Installation | fast-agent.ai/getting_started |
Models, Providers & Local Overlays (llama.cpp, HF, Codex, Anthropic, OpenAI, Gemini, xAI) |
fast-agent.ai/models |
| Agents, Workflows & AgentCards | fast-agent.ai/agents |
| MCP Client, Server, OAuth, Events & Skills | fast-agent.ai/mcp |
| Editor Integration (ACP — Zed, JetBrains, Neovim) | fast-agent.ai/acp |
| Agent Skills & Context Compaction | fast-agent.ai/guides/skills · Compaction |
| Benchmarks & Published Traces | fast-agent.ai/benchmarks |
| Community & Support | Discord · Issues |
Apache 2.0 — see LICENSE.




