Skip to content

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

  1. In Studio, go to Playbooks in the left sidebar
  2. Click New Playbook
  3. Set the name: My First Playbook
  4. Set Trigger type to manual
  5. Set Output key to summary
  6. 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

  1. Click Add step
  2. Choose step type: ai_prompt
  3. Set Output key: summary
  4. In the Prompt field, enter:
Write a single paragraph (3-5 sentences) summarising the following topic for a general audience.

Topic: {{.inputs.topic}}
  1. Leave the model as the default
  2. Click Save step

Step 4: Run the playbook

  1. Click Run (or Trigger manually)
  2. In the inputs panel, add:
    • Key: topic
    • Value: The history of the bicycle
  3. 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_key matches the playbook's output_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_output step after ai_prompt to 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