All Products
Search
Document Center

Tablestore:Build Wiki

Last Updated:Sep 24, 2026

Use the IngestWiki interface to freeze the current sources and asynchronously build a new set of Wiki pages. The currently published pages remain readable until the new build is successfully published.

Prerequisites

  • An AgentStorage instance has been created and is in the normal state, and the instance endpoint and instance name have been obtained.

  • An API Key has been created.

  • Wiki operations use the full three-segment Agent Scope (appId/tenantId/agentId). Each segment must be non-empty, cannot be *, can be up to 128 bytes in length, and cannot contain /. Do not pass runId.

  • Sources are stored in the /.wiki/raw/ directory under a specific memoryStoreName and three-segment Agent Scope. Uploads and builds use the same appId, tenantId, and agentId, and omit runId.

Wiki source files are written to the /.wiki/raw/ directory described above through the AddItem operation, using the same three-segment Agent Scope as the build and omitting runId. This is an exception to the Scope rule for file operations; other file operations require the full four-segment Scope (including runId). For more information, see Create a file. Upload example:

{
  "type": "memoryfile",
  "memoryStoreName": "agent_memory",
  "scope": {
    "appId": "app-001",
    "tenantId": "user-001",
    "agentId": "assistant"
  },
  "path": "/.wiki/raw/payment-spec.md",
  "content": "# Payment rules\nA refund requires the order number.\n"
}

Request parameters

Field

Type

Required

Description

memoryStoreName

string

Yes

The name of the memory store.

scope

object

Yes

The full three-segment Agent Scope. The rules are the same as for GetWiki.

clientToken

string

No

The idempotency token, up to 256 bytes. The same source and token allow safe retries.

dreamActionRefs

array

No

The Dream artifact references to include in this build, up to 100 entries.

dreamActionRefs[].dreamId

string

Yes

The ID of the completed Dream, up to 128 bytes.

dreamActionRefs[].actionId

string

Yes

The ID of the applied artifact action, up to 128 bytes.

dreamActionRefs only takes effect for this build. References must belong to the same memory store and Agent, and correspond to applied, still-valid Skill or Profile artifacts; duplicate references are rejected.

Request example

When using API Key authentication, pass the instance name and API Key through the x-ots-instancename and x-ots-apikey request headers.

curl -X POST https://<endpoint>/IngestWiki \
  -H "x-ots-instancename: <instance-name>" \
  -H "x-ots-apikey: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
  "memoryStoreName": "agent_memory",
  "scope": {
    "appId": "app-001",
    "tenantId": "user-001",
    "agentId": "assistant"
  },
  "clientToken": "payment-wiki-20260904"
}'

Response

Field

Description

status

The initial status of the new build, typically pending; can be ready when the sources have not changed.

reused

Whether an existing build was reused based on the same clientToken.

skipped

Whether the build was skipped because the sources had not changed.

{
  "status": "pending",
  "reused": false,
  "skipped": false
}

The build is an asynchronous process. After it is initiated, poll the latestBuild.status returned by GetWiki until it becomes ready or fails. If no source is available, a 400 VALIDATION_ERROR is returned.