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.
goose recipes have a section where you can specify which [extensions](/docs/guides/recipes/recipe-reference#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](https://github.com/TuanKiri/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.
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:
```yaml
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:
```sh
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.
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](https://www.kaggle.com/datasets/ramjasmaurya/unesco-heritage-sites2021?resource=download) and use it in your travel planning recipe.
Then we reference the file in our prompt like:
```yaml
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:
```yaml
extensions:
- type:builtin
name:developer
display_name:Developer
timeout:300
bundled:true
```
Here we add the [Developer extension](/docs/mcp/developer-mcp) 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:
# 10-Day European Adventure 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.
1.**Weather**: Based on forecasts, pack for warm weather in all destinations, with temperatures ranging from 20-35°C (68-95°F). Bring a light jacket for cooler evenings in Prague.
2.**Currency**: Euros (€) for France and Italy, Czech Koruna (CZK) for the Czech Republic.
3.**Transportation**: Purchase metro/public transport passes in each city to save money.
4.**Reservations**: Book major attractions in advance to avoid long lines, especially the Louvre, Vatican Museums, and Eiffel Tower.
5.**Water**: Carry a refillable water bottle, especially in Rome where temperatures will be hot.
6.**Language**: Learn a few basic phrases in each language, though English is widely spoken in tourist areas.
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!