---
title: "Update Agent"
method: PUT
path: "/api/agents/{agent_id}"
tags: ["agents"]
---

# Update Agent

`PUT /api/agents/{agent_id}`

## Request

- Base URL: `https://api.maritime.sh` (the document declares no server; this is the origin it was published from)
- URL: `https://api.maritime.sh/api/agents/{agent_id}`
- Auth: HTTP bearer

Update agent metadata.

`instructions` (the persona) is routed to the MARITIME_INSTRUCTIONS env
var and takes effect at the agent's next restart — the runtime entrypoint
rewrites the persona block in AGENTS.md when the content changes. "" clears
it; null leaves it unchanged.

## Path parameters

- `agent_id` string, required

## Request body

- AgentUpdate
  - `name` string, nullable
  - `description` string, nullable
  - `instructions` string, nullable
  - `framework` string, nullable
  - `tier` string, nullable
  - `githubRepo` string, nullable
  - `autoPair` boolean, nullable
  - `exposedPort` integer, nullable
  - `healthCheckPath` string, nullable
  - `hasWebUi` boolean, nullable
  - `publicPlay` boolean, nullable

## Response `200`

Successful Response

- AgentResponse
  - `id` string, required
  - `name` string, required
  - `description` string, nullable
  - `instructions` string, nullable
  - `externalId` string, nullable
  - `framework` string, required
  - `tier` string, required
  - `status` string, required
  - `githubRepo` string, nullable
  - `autoPair` boolean
  - `exposedPort` integer, nullable
  - `healthCheckPath` string, nullable
  - `hasWebUi` boolean
  - `templateId` string, nullable
  - `publicPlay` boolean
  - `publicWeb` boolean
  - `publicUrl` string, nullable
  - `visibility` 'private' | 'public'
  - `webUrl` string, nullable
  - `desktopEnabled` boolean
  - `invocationCount` integer, required
  - `totalComputeSeconds` integer
  - `memMb` integer, nullable
  - `vcpus` number, nullable
  - `idleTtlSeconds` integer, nullable
  - `diskMb` integer, nullable
  - `computeMinutesLimit` number, nullable
  - `sleepPolicy` string
  - `lastStartedAt` string, date-time, nullable
  - `lastActiveAt` string, date-time, nullable
  - `statusChangedAt` string, date-time, nullable
  - `derivedImageTag` string, nullable
  - `browserbaseConfigured` boolean
  - `projectId` string, nullable
  - `projectRole` string, nullable
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `422`: Validation Error

---

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