Appearance
Your First Playbook
In this tutorial you will build a simple playbook that takes a topic as input, asks an AI to write a one-paragraph summary, and returns the result. No external services, no credentials.
Time: ~10 minutes
What you'll use: Studio UI, ai_prompt step
Step 1: Create the playbook
- In Studio, go to Playbooks in the left sidebar
- Click New Playbook
- Set the name:
My First Playbook - Set Trigger type to
manual - Set Output key to
summary - Click Save
Step 2: Add an input
Inputs are values you supply when you trigger the playbook. You define them by using them in a step — there's nothing to configure upfront.
Your playbook will accept a topic input. You'll reference it in the next step as {{.inputs.topic}}.
Step 3: Add an ai_prompt step
- Click Add step
- Choose step type: ai_prompt
- Set Output key:
summary - In the Prompt field, enter:
Write a single paragraph (3-5 sentences) summarising the following topic for a general audience.
Topic: {{.inputs.topic}}- Leave the model as the default
- Click Save step
Step 4: Run the playbook
- Click Run (or Trigger manually)
- In the inputs panel, add:
- Key:
topic - Value:
The history of the bicycle
- Key:
- Click Run
The run appears in Run History. Click on it to see:
- Status: success or failed
- Step outputs: expand each step to see what it returned
- Final output: the value of the step whose
output_keymatches the playbook'soutput_key(summary)
Step 5: Inspect the output
Open the run and expand the ai_prompt step. You'll see:
- Input: the rendered prompt with
{{.inputs.topic}}replaced - Output: the paragraph the AI wrote
- Tokens used and cost
What's next?
- Add a second step — try chaining an
export_outputstep afterai_promptto format the result as HTML - Version-control it — see Provision & CLI to save this as a YAML file
- Write a test — see Testing to add an assertion that the output is never empty
- Explore step types — see Step Types for what else you can do