---
title: "List an agent's routines"
method: GET
path: "/v1/personal-agents/{id}/routines"
tags: ["Agents"]
---

# List an agent's routines

`GET /v1/personal-agents/{id}/routines`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/personal-agents/{id}/routines`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

An agent has an owner, a name, a brief that says how it works, and rules for which tools it can use. Every change to the brief or tool policy makes a new version. An agent does its work through routines. A routine is a Cloud Automation that belongs to the agent, so it also appears in the Automation capabilities; each run starts from the agent's brief and can use only what the agent's tool policy allows. The owner can share the agent with teammates. Managers can change who can collaborate. The owner must approve changes a manager proposes to the brief, tool policy or routines. Collaborators can use the agent and ask for changes. Runs started by a teammate are private. Scheduled runs use the owner’s accounts and share their results with the team. Returns the 100 newest routines.

## Path parameters

- `id` string, required

## Response `200`

Routines returned, newest first.

- PersonalAgentRoutineList
  - `items` AutomationDetail[], required
    - `automation` Automation, required
      - `id` string, required
      - `organizationId` string, required
      - `ownerMemberId` string, required
      - `name` string, required
      - `state` 'active' | 'inactive' | 'needs_attention' | 'archived', required
      - `currentRevisionId` string, required
      - `nextDueAt` integer, nullable, required
      - `latestRunAt` integer, nullable, required
      - `latestSuccessfulRunId` string, nullable
      - `latestSuccessfulResult` unknown
      - `needsAttentionReason` AutomationNeedsAttentionReason, nullable, required
        - `code` 'owner_membership_lost' | 'model_access_lost' | 'provider_unavailable' | 'connect_access_unavailable' | 'openwork_web_access_required' | 'execution_runtime_unavailable', required
        - `message` string, required
        - `occurredAt` integer, required
      - `agentId` string, nullable
      - `createdAt` integer, required
      - `updatedAt` integer, required
      - `archivedAt` integer, nullable, required
    - `revision` AutomationRevision, required
      - `id` string, required
      - `automationId` string, required
      - `version` integer, required
      - `instructions` string, required
      - `schedule` union, required
        - object
          - `kind` 'once', required
          - `timezone` string, required
          - `at` integer, required
        - object
          - `kind` 'daily', required
          - `timezone` string, required
          - `hour` integer, required
          - `minute` integer, required
        - object
          - `kind` 'weekly', required
          - `timezone` string, required
          - `daysOfWeek` integer[], required
          - `hour` integer, required
          - `minute` integer, required
        - object: Every everyHours hours on the hour, counted from startHour on each listed day (0 = Sunday) and stopping before endHour, in timezone. Needs the organization's every-few-hours schedules.
          - `kind` 'interval', required
          - `timezone` string, required
          - `everyHours` integer, required
          - `daysOfWeek` integer[]
          - `startHour` integer
          - `endHour` integer
        - object: Runs offsetMinutes (negative is before) from the start or end of each meeting on the owner's primary Google Calendar: timed meetings they accepted or organize, with someone else invited. Cloud Automations only; needs Google Calendar connected and the organization's before-and-after-meeting Automations.
          - `kind` 'calendar', required
          - `timezone` string, required
          - `edge` 'start' | 'end', required
          - `offsetMinutes` integer, required
          - `rule` object
            - `withExternalAttendees` boolean
            - `titleIncludes` string
        - object
          - `kind` 'event', required
      - `model` object, required
        - `providerId` string, required
        - `modelId` string, required
        - `variant` string, nullable
      - `action` union
        - object
          - `kind` 'agent', required
          - `instructions` string, required
          - `model` object, required
            - `providerId` string, required
            - `modelId` string, required
            - `variant` string, nullable
        - object
          - `kind` 'saved_script', required
          - `script` object, required
            - `pluginId` string, required
            - `configObjectId` string, required
            - `configObjectVersionId` string, required
          - `input` unknown
      - `executionTarget` 'desktop' | 'cloud'
      - `workspaceId` string, nullable
      - `agentRevisionId` string, nullable
      - `maximumRuntimeMs` integer, required
      - `digest` string, required
      - `createdAt` integer, required
    - `latestRun` AutomationRun, nullable, required
      - `id` string, required
      - `automationId` string, required
      - `revisionId` string, required
      - `trigger` 'scheduled' | 'recovery' | 'manual', required
      - `scheduledFor` integer, nullable, required
      - `idempotencyKey` string, required
      - `status` 'queued' | 'claimed' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped', required
      - `leaseOwner` string, nullable, required
      - `leaseExpiresAt` integer, nullable, required
      - `heartbeatAt` integer, nullable, required
      - `attemptCount` integer, required
      - `executionTarget` 'desktop' | 'cloud', required
      - `executionThread` AutomationExecutionThread, nullable, required
        - `id` string, required
        - `threadKind` 'automation', required
        - `executionLocation` 'desktop' | 'cloud', required
        - `automationId` string, required
        - `automationRunId` string, required
        - `engineKind` string, required
        - `nativeThreadId` string, nullable
        - `workspaceId` string, nullable
      - `providerId` string, required
      - `modelId` string, required
      - `modelVariant` string, nullable
      - `startedAt` integer, nullable, required
      - `finishedAt` integer, nullable, required
      - `error` AutomationError, nullable, required
        - `code` 'owner_membership_lost' | 'model_access_lost' | 'provider_unavailable' | 'connect_access_unavailable' | 'openwork_web_access_required' | 'execution_runtime_unavailable' | 'connection_action_required' | 'execution_failed' | 'execution_timed_out' | 'runner_unavailable' | 'cancelled' | 'lease_lost' | 'internal_error', required
        - `message` string, required
        - `retryable` boolean, required
      - `resultSummary` string, nullable, required
      - `codemodeReceiptId` string, nullable
      - `validatedResult` unknown
      - `triggerContext` AutomationRunTriggerContext, nullable
        - `kind` 'calendar_meeting', required
        - `eventId` string, required
        - `title` string, nullable, required
        - `start` integer, required
        - `end` integer, required
        - `attendeeDomains` string[], required
        - `externalAttendees` integer, required
        - `link` string, nullable, required
      - `usage` AutomationUsage, required
        - `inputTokens` integer, nullable, required
        - `outputTokens` integer, nullable, required
        - `costMicros` integer, nullable, required
      - `createdAt` integer, required
      - `updatedAt` integer, required

## Other responses

- `404`: Not found.

## Changes

- **2026-12-02** `b20ab6931f6a`: 1 breaking
  - added `subschema #6` to the `items/items/revision/schedule` response property `oneOf` list for the response status `200`
- **2026-11-26** `bc0092687a7b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/personal-agents/:id/routines/get.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
