Model Features and History Saving
Models in fast-agent are specified with a model string, that takes the format provider.model_name.<reasoning_effort>
Precedence
Model specifications in fast-agent follow this precedence order (highest to lowest):
- Explicitly set in agent decorators
- Command line arguments with
--modelflag - Default model in
fastagent.config.yaml
Format
Model strings follow this format: provider.model_name.reasoning_effort
- provider: The LLM provider (e.g.,
anthropic,openai,azure,deepseek,generic,openrouter,tensorzero) - model_name: The specific model to use in API calls (for Azure, this is your deployment name)
- reasoning_effort (optional): Controls the reasoning effort for supported models
Examples:
anthropic.claude-3-7-sonnet-latestopenai.gpt-4oopenai.o3-mini.highazure.my-deploymentgeneric.llama3.2:latestopenrouter.google/gemini-2.5-pro-exp-03-25:freetensorzero.my_tensorzero_function
Reasoning Effort
For models that support it (o1, o1-preview and o3-mini), you can specify a reasoning effort of high, medium or low - for example openai.o3-mini.high. medium is the default if not specified.
gpt-5 additionally supports a minimal reasoning effort.
Aliases
For convenience, popular models have an alias set such as gpt-4o or sonnet. These are documented on the LLM Providers page.
Default Configuration
You can set a default model for your application in your fastagent.config.yaml:
History Saving
You can save the conversation history to a file by sending a ***SAVE_HISTORY <filename> message. This can then be reviewed, edited, loaded, or served with the prompt-server or replayed with the playback model.
File Format / MCP Serialization
If the filetype is json, then messages are serialized/deserialized using the MCP Prompt schema. The load_prompt, load_prompt_multipart and prompt-server will load either the text or JSON format directly.
This can be helpful when developing applications to:
- Save a conversation for editing
- Set up in-context learning
- Produce realistic test scenarios to exercise edge conditions etc. with the Playback model