---
title: "Update Library Agent"
method: PATCH
path: "/api/library/agents/{library_agent_id}"
tags: ["v2", "library", "private"]
---

# Update Library Agent

`PATCH /api/library/agents/{library_agent_id}`

Update the library agent with the given fields.

## Path parameters

- `library_agent_id` string, required

## Request body

- LibraryAgentUpdateRequest — Schema for updating a library agent via PUT. Includes flags for auto-updating version, marking as favorite, archiving, or deleting.
  - `auto_update_version` boolean, nullable — Auto-update the agent version
  - `graph_version` integer, nullable — Specific graph version to update to
  - `is_favorite` boolean, nullable — Mark the agent as a favorite
  - `is_archived` boolean, nullable — Archive the agent
  - `is_hidden` boolean, nullable — Whether to hide the agent from the library listing
  - `settings` GraphSettings
    - `human_in_the_loop_safe_mode` boolean
    - `sensitive_action_safe_mode` boolean
    - `builder_chat_session_id` string, nullable
  - `folder_id` string, nullable — Folder ID to move agent to (None to move to root)

## Response `200`

Successful Response

- LibraryAgent — Represents an agent in the library, including metadata for display and user interaction within the system.
  - `id` string, required
  - `graph_id` string, required
  - `graph_version` integer, required
  - `image_url` string, nullable, required
  - `creator_name` string, required
  - `creator_image_url` string, required
  - `status` 'COMPLETED' | 'HEALTHY' | 'WAITING' | 'ERROR', required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `last_run_at` string, date-time, nullable
  - `name` string, required
  - `description` string, required
  - `instructions` string, nullable
  - `input_schema` object, required
  - `output_schema` object, required
  - `credentials_input_schema` object, nullable, required — Input schema for credentials required by the agent
  - `has_external_trigger` boolean, required — Whether the agent has an external trigger (e.g. webhook) node
  - `has_human_in_the_loop` boolean, required — Whether the agent has human-in-the-loop blocks
  - `has_sensitive_action` boolean, required — Whether the agent has sensitive action blocks
  - `trigger_setup_info` GraphTriggerInfo
    - `provider` string, required — Provider name for integrations. Can be any string value, including custom provider names.
    - `config_schema` object, required — Input schema for the trigger block
    - `credentials_input_name` string, nullable, required
  - `new_output` boolean, required
  - `execution_count` integer
  - `success_rate` number, nullable
  - `avg_correctness_score` number, nullable
  - `recent_executions` RecentExecution[] — List of recent executions with status, score, and summary
    - `status` string, required
    - `correctness_score` number, nullable
    - `activity_summary` string, nullable
  - `can_access_graph` boolean, required — Indicates whether the same user owns the corresponding graph
  - `is_latest_version` boolean, required
  - `is_favorite` boolean, required
  - `folder_id` string, nullable
  - `folder_name` string, nullable
  - `is_hidden` boolean
  - `recommended_schedule_cron` string, nullable
  - `is_scheduled` boolean — Whether this agent has active execution schedules
  - `next_scheduled_run` string, nullable — ISO 8601 timestamp of the next scheduled run, if any
  - `settings` GraphSettings
    - `human_in_the_loop_safe_mode` boolean
    - `sensitive_action_safe_mode` boolean
    - `builder_chat_session_id` string, nullable
  - `marketplace_listing` MarketplaceListing — Marketplace listing information for a library agent.
    - `id` string, required
    - `name` string, required
    - `slug` string, required
    - `creator` MarketplaceListingCreator, required — Creator information for a marketplace listing.
      - `name` string, required
      - `id` string, required
      - `slug` string, required

## Other responses

- `401` — Authentication required
- `422` — Validation Error

---

[API](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.net/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/versions/382041c7ecb2/schema)
