agentport

Guide · Routines

Schedule an AI coding agent on your computer with cron

A routine is a saved prompt that runs on a schedule, on the computer where AgentPort is installed. This guide covers creating one, picking a cron time, choosing a permission mode, and reading the chat when it finishes.

What you need

The Free plan covers 1 computer. Pro is $27/month for up to 3. You pay the AI provider yourself. See pricing.

Create a routine

Open the computer, click the Routines tab, then Add a routine. You save a prompt, an assistant, a folder, and a permission mode.

  1. Name. A label for the list, such as Weekday build check.
  2. What should it do? The prompt, written the way you would type it in chat. That text is what gets sent.
  3. Assistant. Grok (Grok Build) or Antigravity. Codex CLI and Claude Code are not listed yet. They are on the roadmap.
  4. Folder. The project. On a normal install those folders are under ~/agentport-workspaces. That Docker layout is covered in Self-hosted AI coding agent on your own server with Docker.

A morning prompt can report what changed since yesterday and whether tests look healthy. A nightly one can run tests and try a small fix on a branch, without pushing. Summarizing open pull requests needs the GitHub CLI signed in under Connectors. The agent only has that folder and those logins.

Pick a schedule

Under When, use a preset or type the cron line. Timezone starts as your browser's zone. The run is second 0 of that local minute.

Weekday mornings at 09:00, every day at 21:30, and every hour:

0 9 * * 1-5
30 21 * * *
0 * * * *

Sunday is 0 or 7. Six fields and names such as JAN are rejected. If both the day-of-month and the weekday are restricted, either one can match. Read Next three times before you save. On a clock change, a missing local time is skipped and a repeated hour fires once.

The schedule runs on your computer, not on Cloudflare, and it survives a restart and update-node.sh. Run now does not move the next time. Switching the routine off and on again schedules only the next future slot.

Choose a permission mode

The field How much can it do on its own? saves Auto or Always approve. Ask first is not available, because nobody is there to tap Allow.

The form says this outright. This runs when you are not here. Ask first is not available. Auto still stops for edits and commands, and if you don't answer, those are denied. Always approve lets the agent edit files and run commands on its own.

For Grok, both modes are listed. Auto still waits on edits and commands, then denies them after 10 minutes if nobody answers. Use Always approve when the job must edit or run tools while you are away. Keep the work in git and read the diff before you push.

For Antigravity the editor lists only Always approve. It cannot pause for a yes, and Auto would skip commands that need approval. The form says Antigravity can't pause, so this uses Always approve. Pick that when the job needs tools.

Where it runs

The agent runs in Docker on your computer. The browser connects straight to that machine over a secure WebSocket. The cloud handles sign-in, your plan, and the machine list. The cron, the prompt, and the chat stay on the computer. Close the tab and open the same chat later from a phone: Use an AI coding agent from your phone.

Read the result

Each run is one normal chat. History shows the status, the time in that timezone, and a short answer. Open chat continues the session. The list keeps the last 50 runs. Finished completed the turn. Didn't finish is an error or a restart mid-run. Stopped was cancelled. Skipped means that routine was already running. Missed means the computer was away too long to catch up. Missed and skipped rows have no chat. Two routine runs can go at once on one computer.

Peaceful mode only quiets the chat you open, and it leaves the routine's saved permission mode as it is.

The computer has to stay on

The timer sits in AgentPort on that machine. Sleep or shutdown pauses it. Back within an hour, it runs the latest missed slot once. A longer gap is a single Missed row.

Closing the laptop only works when the agent is on some other machine that stays awake. The laptop, or a phone, is then just the window. That setup is in Keep Grok Build running after you close your laptop.

Webhooks are coming soon

An HTTP call that starts a routine is on the roadmap. It is not part of 0.10.0. The editor shows the line Webhooks are coming soon. Use a schedule until that ships. You read the outcome in History.

FAQ

Does the routine keep running if I close the browser?

Yes. The schedule and the agent live on your computer. Open AgentPort later, including from a phone, and use Open chat. The computer still has to stay on.

What happens if the computer is off at the scheduled time?

Back within an hour, it runs the latest missed slot once. A longer gap is one Missed row, not a stack of catch-up runs.

Why can't I save Ask first on a routine?

Ask first waits for an approval. The form only saves Auto or Always approve. On Grok, an unanswered Auto step is denied after 10 minutes and the turn continues.

Which permission mode should an Antigravity routine use?

Always approve. Auto is not offered, because Antigravity cannot pause for a yes and would skip commands that need approval. Read the git diff when you are back.

Can a webhook start a routine today?

No. HTTP triggers are coming soon, on the roadmap. Version 0.10.0 runs a cron schedule. The editor has no webhook setup.

Will an update delete my routines?

No. update-node.sh replaces the container and keeps the data volume that holds routines and chats. Grok and Antigravity logins stay on the computer too.

Can I schedule Codex CLI or Claude Code this way?

Not inside AgentPort yet. The Assistant menu is Grok and Antigravity. Both CLIs are on the roadmap. On your own server, see Run Codex CLI and Claude Code on a VPS, and use them from your phone.

Does AgentPort's cloud see the prompt or the answer?

No. The browser connects straight to your computer. The cloud keeps sign-in, the plan, and the machine list. The prompt and the chat stay on that machine.

Try it on your own computer

The Free plan covers 1 computer. Pro is $27/month for up to 3. You bring the AI login and pay that provider directly.