---
title: "List routines [read]"
method: GET
path: "/routines"
---

# List routines \[read\]

`GET /routines`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/routines`
- Auth: HTTP bearer

## Query parameters

- `cursor` string
- `limit` integer
- `session_id` string

## Response `200`

OK

- object
  - `items` Routine[], required
    - `id` string: rtn_… identifier
    - `name` string
    - `description` string, nullable
    - `metadata` object
    - `target` object: {type:"new_session", agent, environment_id?, vault_ids?, reuse_session?} — a fresh session per fire (CMA parity); with reuse_session: true the first fire starts the session and every later fire posts into it (a new one only once it is archived or deleted; a fire while it is working or waiting on a person is skipped) · {type:"session", session_id} — a turn into the existing session every fire (busy target skips with session_busy_error)
    - `initial_events` object[]
    - `schedule` object, nullable: 5-field POSIX cron + IANA timezone, wall-clock matching, minute granularity; null = manual-run only
      - `type` 'cron'
      - `expression` string
      - `timezone` string
      - `last_run_at` string, nullable
      - `upcoming_runs_at` string[]: ≤5 upcoming fire times; empty once archived
    - `budget` object, nullable: Per-run cap (RFC-0080 shape): copied onto each new session (mode new_session) or granted as a per-fire delta allowance consumed+budget (mode session). Clearable.
    - `status` 'active' | 'paused'
    - `paused_reason` object, nullable: {type:"manual"} | {type:"error", error:{type}, consecutive_failures, message?} — non-null exactly when paused. A routine pauses itself after 3 runs in a row fail with an error that the next run would repeat, insufficient_credits_error included (the wallet that pays for it is empty); add credit, then unpause.
    - `archived_at` string, nullable
    - `created_at` string
    - `updated_at` string
  - `cursor` string, nullable
  - `hasMore` boolean

## Other responses

- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 5 info
  - added the new optional `query` request parameter `session_id`
  - added the optional property `error/request_id` to the response with the `default` status
  - the response property `error` became required for the status `default`
  - the response property `error/code` became required for the status `default`
  - …1 more

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/routines/get.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/8280a065ef6a?raw)
