Creating Playbooks
Build a library of reusable prompts for your organization
What are Playbooks?
Playbooks are easily shareable, reusable prompts for repeated tasks
A playbook is like a custom system prompt for a repeated task. For example, if you need to have many different Devin sessions that each integrate the same third-party library but in different parts of your application, you might want a Playbook.
Playbooks are also easily shareable and reusable, so once anyone succeeds with Devin, others can more easily replicate that success!
We recommend using Playbooks when:
- You or your teammates will reuse the prompt on multiple sessions.
- You find yourself repeating the same reminders to Devin
- The use case may be relevant to others — in your organization or within the Devin user community.
Getting Started with Playbooks
Consider writing your first playbook with a simple multi-step task you want Devin to tackle.
- Create a document that outlines…
- The outcome you want Devin to achieve
- The steps required to get there
- Optional: Add sections like Procedure, Specifications, Advice, Forbidden Actions or Required from User
- Procedure: Outline the entire scope of the task. Include at least one step for setup, the actual task, and delivery.
- Specifications: Describe postconditions - what should be true after Devin is done?
- Advice: Include tips to correct Devin’s priors
- Forbidden Actions: Include any action Devin should absolutely not take
- Required from User: Describe any input or information required from the user
- Create the playbook directly in the web app by clicking “Create a new Playbook”. Alternatively, save a file with the file extension
.devin.md
and drag-and-drop it in the web app when starting a Devin session
Writing a Great Playbook
Procedure
The Procedure section should…
- Have one step per line, each line written imperatively
- Cover the entire scope of the task
- Include at least one step for setup, the actual task, and delivery
- Aim to make the steps Mutually Exclusive and Collectively Exhaustive
- Additional Tips
- Procedures should help you define the order of Devin’s action - like if/else/loops/goto in code
- Don’t make tasks too specific unless you really need to, this can reduce Devin’s ability to problem-solve
- Each procedure step should contain an action verb - e.g. Write, Navigate to, etc.
Advice and Pointers
Share advice and pointers with Devin if…
- You have a preferred way of completing the tasks
- The advice applies to the entire task, or multiple steps. Advice specific to one step should be written next to that step (e.g. as a sub-bullet)
- You are correcting Devin’s priors. Advice can function like comments on pseudocode that influence its execution.
Specifications
The Specifications section can be helpful to describe the postconditions of the playbook — what should be true once Devin is done?
What’s Needed From User
Think through anything necessary but outside of Devin’s control. For example, if the user needs to provide a token or information that is not publicly available to Devin.
Other Tips + Tactics
Iterate and improve through trial and error
Iterate and improve through trial and error
- Run 2+ Devins in parallel with the same playbook to quickly identify possible errors.
- If Devin needs help, chat with it to help it along. Then add to your playbook so Devin succeeds without intervention next time.
Tell Devin what good looks like
Tell Devin what good looks like
Be explicit about what the deliverable is & how Devin should communicate the fact that it’s done (e.g. what files to attach or links to share, if any)
Optimize how quickly your playbook takes to run
Optimize how quickly your playbook takes to run
Explore the different decisions Devin can make, and guide Devin down the most efficient path in the playbook.
Specific commands, incantations and strings are fair game
Specific commands, incantations and strings are fair game
- They can be the difference maker between a working playbook and a broken one.
- For example, the following can be a very good detail to include because alloy and tts-1 are probably not things Devin would’ve picked otherwise, and this guides Devin in a direction that is more likely to succeed!
Example Playbook
View example sessions using the playbook below here and here.