documentation/docs/tutorials/recipes-tutorial.md
goose recipes are files that contain all the details to allow goose to do one specific task. Since they are contained in just one file, they are easy to share through all the normal ways we share files, including version management systems like git. Let's get started with the simplest recipe possible.
The simplest recipe is basically just a prompt. This might seem not all that useful—after all I can just share my prompt on Slack or email—but it turns out that the most important reason users can't get agents to do what they want is that their prompts are too short and that they don't iterate enough on those prompts. Keeping prompts in a text file helps with both these things.
Here's a recipe that will plan a trip to Europe:
title: Trip planner
description: Plan your next trip
prompt: |
Help the user plan a trip to Europe for 14 days.
Create a detailed itinerary that includes:
- places to visit
- activities to do
- local cuisine to try
- a rough budget estimate
You can run it from the command line using:
goose run --recipe trip.yaml
goose recipes have a section where you can specify which extensions goose can use during execution. goose will only use the ones you specify.
Let's say we want to make sure we have good weather during our Europe trip. We can just add a weather extension (this example uses the weather-mcp-server by TuanKiri under the MIT License) to our recipe, modify the prompt a bit and now goose will check the weather before adding a city to our trip.
title: Trip planner
description: Plan your next trip
prompt: |
Help the user plan a trip to Europe for 14 days. Create a detailed itinerary that includes:
- places to visit
- activities to do
- local cuisine to try
- a rough budget estimate
Ensure that the user has good weather throughout their trip. Optimize their trip based on the forecast in potential locations.
extensions:
- type: stdio
name: weathermcpserver
cmd: /Users/svega/Development/weather-mcp-server/weather-mcp-server
args: []
timeout: 300
description: "Weather data for trip planning"
env_keys:
- WEATHER_API_KEY
We can make our recipes dynamic by adding parameters. Parameters are variables that are provided by the user of our recipes. They each have a data type and a requirement field that defines if they are required, optional or provided by the user. We can generalize our trip recipe by adding a parameter for the destination and the length of the trip:
parameters:
- key: destination
input_type: string
requirement: required
description: Destination for the trip. Should be a large region with multiple climates.
- key: duration
input_type: number
requirement: required
description: Number of days for the trip.
Recipes use a template system that lets you insert variables like {{ destination }} which get filled in with the actual values you provide. Once you've updated the prompt with the right details, you can run your new recipe like this to get a plan for a 14 day trip to Africa:
goose run --recipe trip.yaml --params destination=Africa --params duration=14
By default, goose uses the temperature and model you've already chosen, which usually works just fine. But sometimes you might want more control. For example, when performing a subjective task like planning a trip, it can help to turn up the temperature setting. Think of temperature like a creativity dial - the higher it is, the more varied and unexpected the results. If the first suggestion isn't quite right, the user can just run the recipe again to get a new one.
You can also specify which AI provider and model to use for a specific recipe:
settings:
goose_provider: "anthropic"
goose_model: "claude-sonnet-4-20250514"
temperature: 0.8
The available settings are:
goose_provider: The AI provider (e.g., "anthropic", "openai")goose_model: The specific model nametemperature: Controls creativity/randomness (0.0-1.0, higher = more creative)These settings will override your default goose configuration when this recipe runs.
Sometimes, you'll want to give the agent access to extra information without cramming all that data into the prompt. Instead of pasting everything in, you can keep the data in a separate file and point the recipe to it.
To help with this, recipes include a built-in variable called {{ recipe_dir }}, which lets you reference files stored alongside your recipe. For example, you could download the UNESCO list from Kaggle and use it in your travel planning recipe.
Then we reference the file in our prompt like:
prompt: |
You can use the \{\{ recipe_dir \}\}/unesco.csv file to
check information on UNESCO world heritage sites to
include in your travel plan.
We also need to specify an extension to read files:
extensions:
- type: builtin
name: developer
display_name: Developer
timeout: 300
bundled: true
Here we add the Developer extension which provides the ability to read files for relevant information.
:::info Example Recipe Output
<details> <summary>View detailed 10-day European itinerary</summary>Based on the UNESCO World Heritage site information and the current weather forecasts, here's a detailed 10-day European itinerary:
This itinerary takes you through three of Europe's most beautiful and culturally rich countries: France, Italy, and the Czech Republic. You'll experience world-class museums, UNESCO World Heritage sites, delicious cuisine, and vibrant local culture.
Day 1: Arrival in Paris
Weather forecast: Pleasant temperatures around 27°C (81°F), partly cloudy
Day 2: Paris Highlights
Weather forecast: Warm at 31°C (88°F), clear skies
Day 3: Versailles Day Trip
Weather forecast: Warm at 30°C (86°F), slight chance of rain
Day 4: Travel to Rome
Weather forecast: Hot at 35°C (95°F), clear skies
Day 5: Ancient Rome
Weather forecast: Hot at 35°C (95°F), mostly sunny
Day 6: Vatican City
Weather forecast: Hot at 34°C (93°F), partly cloudy
Day 7: Travel to Prague
Weather forecast: Pleasant at 29°C (84°F), partly cloudy
Day 8: Prague Castle and Lesser Town
Weather forecast: Cooler at 22°C (72°F), chance of thunderstorms
Day 9: Jewish Quarter and Cultural Sites
Weather forecast: Pleasant at 24°C (75°F), mostly sunny
Day 10: Departure
Weather forecast: Pleasant at 24°C (75°F), mostly sunny
Accommodation (9 nights)
Transportation
Attractions & Activities
Food & Dining
Miscellaneous
Grand Total
This itinerary offers a perfect blend of history, culture, and cuisine across three distinct European regions. The weather should be excellent for sightseeing, with mostly sunny days and warm temperatures. Enjoy your European adventure!
</details>:::
Check out the Recipes guide for more docs, tools, and resources to help you master goose recipes.