All Products
Search
Document Center

AI Coding Assistant Lingma:Archive an agent

Last Updated:Jul 03, 2026

Archive an agent so it is hidden from the default listing while remaining accessible by ID.

Request headers

Header

Required

Description

Authorization

Yes

Bearer <PAT>

Path parameters

Parameter

Type

Required

Description

agent_id

string

Yes

Unique agent identifier.

Request body

No request body is required.

Example request

curl -X POST "https://api.qoder.com.cn/api/v1/cloud/agents/agent_019eXXXX.../archive" \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK

{
  "type": "agent",
  "id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "name": "doc-test-agent-updated",
  "description": "Used for API documentation testing",
  "model": "ultimate",
  "system": "You are the updated documentation testing assistant.",
  "instructions": "You are the updated documentation testing assistant.",
  "tools": [],
  "mcp_servers": [],
  "default_environment": "",
  "version": 2,
  "created_at": "2026-05-18T15:26:39.61669Z",
  "updated_at": "2026-05-18T15:27:22.698411Z"
}

Response fields

Returns the full agent object after archival. The updated_at field is refreshed to the time of the archive operation.

Field

Type

Description

type

string

Always "agent".

id

string

Unique agent identifier.

name

string

Agent name.

description

string

Agent description.

model

string

Model identifier.

instructions

string

System prompt.

system

string

Alias of instructions. Deprecated; use instructions.

tools

array

Tool configuration.

mcp_servers

array

MCP server configuration.

default_environment

string

Default runtime environment.

version

integer

Current version number.

created_at

string

Creation time in ISO 8601.

updated_at

string

Last update time in ISO 8601. Refreshed on archive.

Errors

HTTP

Type

Trigger

401

authentication_error

The PAT is invalid or expired.

403

permission_error

Caller lacks permission to archive this agent.

404

not_found_error

No agent exists with the given ID.

See Errors for the full error envelope.

Archive vs. delete

Action

Effect

Recoverable

Archive

The agent is hidden from the default listing; data is retained.

Yes (unarchive supported).

Delete

The agent is permanently removed.

No.

Notes

  • Archival is a soft delete; agent data remains in the system.

  • Archived agents are excluded from the default response of GET /v1/agents.

  • Archived agents are still retrievable via GET /v1/agents/{agent_id}.

  • The operation is idempotent; archiving an already-archived agent does not raise an error.