Overview
Thefastagent.config.yaml file is the main configuration file for Fast Agent. It controls model selection, logging, MCP server connections, and various runtime behaviors.
Fast Agent searches for configuration files recursively from your current working directory upward, allowing you to maintain project-specific or global configurations.
File Discovery
Fast Agent looks for configuration files in the following order:- Project-level config:
fastagent.config.yamlin the current directory or any parent directory - Environment overlay:
<ENVIRONMENT_DIR>/fastagent.config.yaml(defaults to.fast-agent/fastagent.config.yaml)
Basic Configuration
Here’s a minimal configuration file:Model Configuration
Default Model
The default model for all agents. Can be overridden via
--model CLI flag or in agent definitions.Format: <provider>.<model_name>.<reasoning_effort> or <provider>.<model_name>?reasoning=<value>Examples:openai.o3-mini.lowanthropic.claude-3-5-sonnet-20241022gpt-5-mini.highsonnet(using model alias)
Model Aliases
Define namespaced model aliases for easier model management across your agent applications.Reference aliases using
$namespace.alias syntax:Execution Settings
Execution engine for the fast-agent application. Currently only
asyncio is supported.Base directory for fast-agent runtime data including session history, logs, and environment-specific configuration overlays.
Persist session history in the environment sessions folder.
Maximum number of sessions to keep in the rolling window.
Enable automatic sampling model selection if not explicitly configured for MCP servers.
Number of times to retry transient LLM API errors. Falls back to
FAST_AGENT_RETRIES env var.Logger Configuration
Logger output type. Options:
none, console, file, httpMinimum logging level. Options:
debug, info, warning, errorEnable or disable the progress display during agent execution.
Show chat User/Assistant messages on the console.
Show MCP server tool calls on the console.
Truncate display of long tool calls for better readability.
Streaming renderer for assistant responses. Options:
markdown, plain, noneChat message layout style for console output. Options:
classic, a3Path to log file when logger type is
file.HTTP Logger Transport
For remote logging:HTTP endpoint for event transport.
HTTP headers for event transport.
HTTP timeout in seconds for event transport.
Shell Execution Settings
Maximum seconds to wait for command output before terminating. Supports duration strings like
90s, 2m, 1h.Show timeout warnings every N seconds during long-running commands.
Use a PTY (pseudo-terminal) for interactive prompt shell commands, enabling colors and full-screen tools.
Maximum shell output lines to display (head/tail with ellipsis when truncated). Set to
null for no limit.Show shell command output on the console.
Policy when an agent shell working directory is missing or invalid. Options:
ask, create, warn, errorExpose a local
read_text_file tool (ACP-compatible signature) when shell runtime is enabled.Control which local file edit tool is exposed. Options:
auto: Usesapply_patchfor GPT-5/Codex models andwrite_text_fileotherwiseon: Always exposewrite_text_fileapply_patch: Always exposeapply_patchoff: Disable local file edit tools
MCP Timeline Display
Number of timeline buckets to render in MCP activity visualization.
Duration of each timeline bucket in seconds. Supports duration strings like
30s, 2m, 1h.MCP-UI Support
Where to write MCP-UI HTML files (relative to CWD if not absolute).
MCP-UI output mode. Options:
disabled, enabled, auto (auto opens browser)Skills Configuration
List of local directories to search for agent skills.
Single marketplace URL for skill discovery.
Multiple marketplace URLs for skill discovery.
OpenTelemetry Settings
Enable OpenTelemetry tracing for debugging and observability.
OTEL service name for tracing.
OTLP endpoint for tracing data.
Log spans to console for debugging.
Sample rate for tracing (1.0 = sample everything).
Environment Variable Substitution
You can reference environment variables in your configuration using${VAR_NAME} syntax:
${VAR_NAME:default_value}:
Complete Example
See Also
- MCP Servers - Configure MCP server connections
- Models - Provider-specific model configuration
- Secrets - Secure credential management
- OAuth - OAuth authentication for MCP servers
