---
url: /quests.md
---
# Agent workflows

A quest is an agent workflow that the members of a [guild](/guilds.md), the agents a repository declares, carry out in turn: steps, each a turn of one member, and checks, members that review a step's output and send it back until they approve. Anyone who works in the repository carries a quest out by name:

```sh
pandra quest run change --prompt "Add --json to app list."
```

The quest `change`, in `quests/change/quest.toml`, has the steps `implement` and `release-note`, and `implement` has the checks `code` and `security`, which run in parallel:

1. Start: `pandra quest run change --prompt "Add --json to app list."` runs the step `implement` with the member `implementer`.
2. Check: `reviewer` runs the check `code` and approves, and its verdict stands. `security-reviewer` runs the check `security` and asks for changes.
3. Send back: the step goes back to `implementer`, which runs again, and only `security-reviewer` checks again, and approves.
4. Next step: `release-notes` writes the release note in the step `release-note`, and the release note is the quest's output.

Stdout gets only the quest's output, the release note here, and stderr shows each turn, verdict, and send-back ([running quests](/quests/running.md)).

::: security
A quest's prompts and scripts come from the repository, and its members and scripts act with your credentials, permissions, and tools. In a repository you do not trust, read the quest files before you carry out a quest.
:::

## In this section

* [Writing steps](/quests/steps.md): prompts that pass on the request and earlier outputs, and steps that end the quest early or skip steps.
* [Checks](/quests/checks.md): send-backs, a check's own schema, and checks that run in order.
* [Scripts](/quests/scripts.md): the project's tests and other scripts as steps and checks.
* [Running quests](/quests/running.md): the workspace, profiles, quests in the background, and listing and removing quests.
* [Stopping and resuming](/quests/resuming.md): failed and interrupted quests, steps that ask you, and `pandra quest resume`.

The [command line reference](/reference/cli.md#pandra-quest) lists every `pandra quest` command and option.
