---
title: "Archive an agent"
method: DELETE
path: "/v1/personal-agents/{id}"
tags: ["Agents"]
---

# Archive an agent

`DELETE /v1/personal-agents/{id}`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/personal-agents/{id}`
- 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. Archiving also archives the agent's routines, so nothing keeps running. Run history is kept.

## Path parameters

- `id` string, required

## Response `200`

Agent archived.

- PersonalAgentDetail
  - `agent` PersonalAgent, required
    - `id` string, required
    - `organizationId` string, required
    - `ownerMemberId` string, required
    - `memberId` string, nullable
    - `name` string, required
    - `state` 'active' | 'archived', required
    - `currentRevisionId` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `archivedAt` string, date-time, nullable, required
    - `pausedAt` string, date-time, nullable: Set while an organization admin has paused the agent: nothing of it runs until it is resumed.
  - `revision` PersonalAgentRevision, required
    - `id` string, required
    - `agentId` string, required
    - `version` integer, required
    - `brief` string, required: The agent's definition, as Markdown: who it is, what it does, how it reports. Every run of the agent starts from it.
    - `toolPolicy` PersonalAgentToolPolicy, required
      - `connections` object
      - `tools` object
    - `defaultExecutionTarget` 'desktop' | 'cloud', required
    - `monthlyBudgetMicros` integer, nullable, required: Monthly spending limit in millionths of a US dollar. Recorded now; not enforced yet.
    - `digest` string, required
    - `createdAt` string, date-time, required
  - `routineCount` integer, required
  - `role` 'owner' | 'manager' | 'collaborator': What the caller may do with this agent.
  - `owner` PersonalAgentPerson, nullable
    - `memberId` string, required
    - `name` string, required
  - `sharedWith` PersonalAgentShare[]
    - `memberId` string, required
    - `name` string, required
    - `role` 'manager' | 'collaborator', required
    - `createdAt` string, date-time, required
  - `routines` PersonalAgentRoutineSummary[]
    - `id` string, required
    - `name` string, required
    - `state` 'active' | 'inactive' | 'needs_attention' | 'archived', 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
    - `nextDueAt` string, date-time, nullable, required
    - `latestRun` object, nullable, required
      - `id` string, required
      - `status` 'queued' | 'claimed' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped', required
      - `createdAt` string, date-time, required
      - `finishedAt` string, date-time, nullable, required
  - `spend` PersonalAgentSpend
    - `monthMicros` integer, required
    - `unpricedTokens` integer, required
    - `budgetMicros` integer, nullable, required: Monthly spending limit in millionths of a US dollar. Recorded now; not enforced yet.
    - `ownerBudgetMicros` integer, nullable, required: Monthly spending limit in millionths of a US dollar. Recorded now; not enforced yet.
    - `adminBudgetMicros` integer, nullable, required: Monthly spending limit in millionths of a US dollar. Recorded now; not enforced yet.
    - `overBudget` boolean, required
  - `openRequestCount` integer
  - `audience` PersonalAgentAudience
    - `organization` boolean, required
    - `autoAddOrganization` boolean, required
    - `teams` object[], required
      - `teamId` string, required
      - `name` string, required
      - `autoAdd` boolean, required
  - `listed` boolean: False when the caller can use the agent through their organization or a team but has not opened it and it was not added for them: offer it, do not list it.
  - `canShare` boolean: Whether the caller may share this agent now: their role allows it and the organization lets them.

## Other responses

- `403`: Only the owner can archive the agent.
- `404`: Not found.

## Changes

- **2026-12-02** `b20ab6931f6a`: 1 breaking
  - added `subschema #6` to the `routines/items/schedule` response property `oneOf` list for the response status `200`
- **2026-11-30** `8084fcf7429e`: 1 info
  - added the optional property `agent/memberId` to the response with the `200` status
- **2026-11-26** `bc0092687a7b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/personal-agents/:id/delete.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)
