Introducing Routines: You Can Now Write the Code Behind Your Deck Tasks

A published t-mobile.com routine in the Deck console, showing its details, expected output and code

Most teams guide their agents with prompts and let Deck decide how the work gets done. Some want to own exactly how their agents navigate and perform their tasks, down to the code running them. As of today, they can.

Let’s review why routines are useful, how to build them, what’s different about Deck routines — and whether it’s the right approach for you.

Why routines

Every Deck task works like an API contract for a system that has no API. You define the input it takes and the output it returns, and your code gets the same JSON back from every website.

In agent mode, you describe the task in a prompt and Deck works out the steps behind that contract. Deck also keeps those steps working when a portal changes. For many teams, that’s all they need.

A routine opens those steps up. It’s a fixed set of steps that Deck runs the same way every time, and each step is code your team can read and change: the path the agent takes through the website, where it enters each input and what output it returns.

How to build routines

You can build routines within your Deck console, or with your own coding agent through the Deck CLI or API. Both end with a routine your team can read, change and run on Deck.

Let Deck build the first draft

Pick a task and a portal, and Deck writes the first version of the code your agent will run while you watch in the live view. It saves the code once it finishes the run. Your team can then review it, change what it needs to and save it, without leaving the console.

Write it yourself in Playwright

Run the task once, and Deck leaves the browser signed in. Your team writes the code against it, by hand or with a coding agent like Claude Code or Codex, and tests it until it returns the right output. Then you save it, and every run of that task on that portal uses it.

Editing a routine's code in the Deck console, with its version history below

Both paths are covered step by step in our docs: Author routines.

What’s different about Deck routines

Deck is infrastructure built to help agents succeed inside systems made for people, and getting in and staying in is its specialty. That’s what changes when you run routines on Deck instead of on a remote browser alone.

On a remote browser, the browser is yours, and so is everything around it: the credentials, the MFA prompts, the bot defences.

With routines, Deck still handles authentication and keeps the session alive.

You own the stepsDeck owns the session
The path the agent takes through the portalSigning in with credentials stored in Deck Vault
Where it enters each inputKeeping the session alive for the whole run
What the routine returnsHandling interruptions mid-run, like MFA prompts and password notices
Which outcome it reports when something’s missingGetting past bot defences with stealth mode

Your routine doesn’t contain a line of login code. Deck signs in, handles MFA if the portal asks for it and hands your routine a signed-in page.

Who routines are for

Routines are for engineering teams that want to own exactly how the Deck agent navigates, and not just what it returns. These teams usually share three traits:

Who routines aren’t for

Routines aren’t for teams that want the work done without managing exactly how it gets done. Three signs agent mode is the better fit:

Here’s a practical test: A routine is code, and code needs an owner. If you don’t plan to put an engineer on it, agent mode is the better fit.

You don’t have to choose

Routines offer an additional way to run your agents on Deck. And the good news is that you don’t have to choose one mode for all your integrations. You pick per task and portal, so a team can run agent mode across a long tail of portals and switch the three that matter most to routines.

Ready to run computer use agents in production?

Deck is the infrastructure platform for computer use agents. Backed by Infinity Ventures, Better Tomorrow Ventures, and others.

See how Deck works → Talk to our team →