Create a deputy and a mission
Hire an agent once and give it a job it can do again and again. A deputy is a standing worker with its own environment, its own memory, and its own identity on every run. A mission is a named job for that deputy: a prompt with inputs, saved and versioned. Each time a mission launches, you get a run.
Do this when you find yourself typing the same kind of task twice: triage new issues, review a pull request, update dependencies every week.
Available when your administrator enables runs and deputies.
Before you start
- Any member can create a deputy for themselves. To create one for a team, you lead that team. To create one for the whole organization, you are an admin or owner.
- You have a manifest the deputy will run in. If you have none, see Create a manifest.
Create the deputy
- In the left rail, open Deputies, then click New deputy.
- Enter a Name, for example “Release Warden”.
- Enter a Description: what this deputy is for. It is required, and it is what makes a list of deputies easy to read.
- Under Manifest, choose the manifest its runs start from. You can bind one later, but the deputy cannot run until you do.
- If an Owner field is shown, choose Just me, a team, or Everyone in the organization. The default is Just me.
- Click Create.
The toast says “Hired” and the deputy’s name. Click the deputy to open its page. The About card there holds its time budget, concurrency limit, manifest, and compute, which you can change at any time.
Create a mission
-
On the deputy’s page, in the Missions card, click New mission.
-
Enter a Name, for example
triage-issue. -
Write the Prompt. Put a variable wherever the prompt needs a value, with the
{{.key}}syntax:Triage issue {{.issue}} in repo {{.repo}}. Label it, find the probable cause in the code, and post a summary as a comment.For a key with a hyphen, write
{{index . "my-key"}}.Reach a field inside an object with dots, for example
{{ .data.object.id }}from a payment event or{{ .issue.user.login }}from a GitHub issue. Each full path is its own input, nameddata.object.id. Go through a list with{{ range .issue.labels }}{{ .name }} {{ end }}. See Use webhook data in a mission. -
Check the Inputs panel. Marshal finds each variable in the prompt and lists it by its full path. For each one, pick a type (string, number, boolean, enum, url, object, or array) and whether it is required. An optional input can have a default. You enter an object or array input as JSON. An input the prompt only loops over, such as
{{ range .labels }}, starts as an array. -
Optional: set a Time budget in minutes. Leave it empty to use the deputy’s budget. The maximum is 1440 minutes.
-
Optional: set a Run title, for example
Triage {{.repo}}#{{.issue}}. It names each run in the Runs list. -
Click Create.
The mission starts as a draft, at version 1.
Try it, then activate it
- On the mission’s row, click Dry run. Fill in the inputs and check Rendered prompt (dry run). Nothing starts. You see exactly what the agent would get.
- When the prompt reads right, click Activate on the row, and confirm with Activate and go live. The dialog names the version that goes live, so you see what will run unattended.
- Click Launch, fill in the inputs, and click Launch. Each input is listed by its full path, such as
data.object.id. - In the toast “Mission launched”, click Open run.
Change the prompt later and the mission gets a new version. Each run keeps the version that started it.
When the deputy is at its limit
A deputy at its concurrency limit never drops a conversation. Answering a parked run, waking it, the end-of-run nudge and Continue wait for a free slot, keep your message and the whole conversation, and start by themselves when a slot frees. Waiting continuations go ahead of waiting fresh launches, oldest first.
You see them in three places:
- The deputy’s Waiting to start card, as
continuation of <run id>, with the limit that holds it and how many runs are in flight. - A banner on the page of the run being continued.
- The CLI.
marshal runs continuesays the continuation is waiting, exits 0 and prints how to cancel.marshal runs listshows it with its status and reason.
A continuation of a parked run waits as long as it takes. A Continue on a finished run expires after 24 hours. To cancel one, run marshal runs cancel <id> with its ql_ id. Cancelling a waiting answer or wake ends that run like stopping it. Cancelling the Continue of a finished run leaves that run unchanged.
From the CLI
You create deputies and missions in the web app. From the CLI, you list them and launch them:
marshal deputies list
marshal deputies missions release-warden
marshal deputies launch release-warden --mission triage-issue \
--input repo=acme/api --input issue=42 --follow
marshal deputies launch billing-desk --mission invoice-paid \
--input data.object.id=in_1Q2w3E --follow--missionis required.marshal deputies missions <deputy>lists the slugs.--input key=valuecan repeat, once per input. A dotted key such asdata.object.idfills that field inside the object.--notes "..."adds extra instructions for this run only.--followstreams the run’s output.
What you should see
- The deputy on the Deputies page, with its description and mission count.
- The mission in the Missions card, first as a draft, then active with a Launch button.
- After a launch: the run page, with the deputy and mission in the header and the agent’s work in Activity. In the CLI:
run <run-id> launched (<deputy> / <mission>). - If the deputy is at its concurrency limit, or the mission has reached its own, the toast says “Queued” and the launch starts when a run finishes.
Next
Let it run without you: run a mission on a schedule or event.