---
title: "Update Agent Documents"
method: POST
path: "/api/agents/{agent_id}/update-documents"
tags: ["agent-documents"]
---

# Update Agent Documents

`POST /api/agents/{agent_id}/update-documents`

## Request

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

Process new documents for an existing agent.

Extracts text, analyzes with AI, merges with existing doc_context and
current workspace content, updates character_json, and triggers
workspace refresh if the agent is active.

## Path parameters

- `agent_id` string, uuid, required

## Request body

- UpdateAgentDocumentsRequest
  - `document_keys` string[], required
  - `description` string

## Response `200`

Successful Response

- UpdateAgentDocumentsResponse
  - `doc_context` object, required
  - `workspace_refreshed` boolean, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/tintin-x/apis/tintin-api.md) · [All operations](https://skmtc.dev/tintin-x/apis/tintin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tintin-x/apis/tintin-api/revisions/8839a8d0a66c?raw)
