Skip to main content
Uses a model to write a candidate fact_instruction for an agent in a workspace and returns it. The draft is not saved: review and edit it, then save it with Update Agent Memory Settings. The current instruction stays in effect until you do. Drafting is a single synchronous call to a model. It usually returns within about 15 seconds and takes longer for a memory that holds many facts, so give your client a generous timeout. Each call gives a slightly different draft. If drafting fails, the request returns 500 with INTERNAL_ERROR; trying again usually works. A deleted agent cannot be drafted for: the request returns 404 with NOT_FOUND.

Path Parameters

string
required
Workspace identifier
string
required
Agent identifier

Request Body

The body is optional. Without one, the draft is written from the built-in default for agents.
string
What the draft should say, in any language, at most 2,000 characters.
string
default:"English"
Language to write the draft in, including its section headings, at most 64 characters. Give an English language name such as English, Simplified Chinese, Traditional Chinese or Japanese, not a locale code such as zh-CN.
boolean
default:"false"
Set to true to let the draft read the facts already stored in the agent’s memory in this workspace, so it describes what is actually being recorded. If there are none, the draft is written from the default.

Response

object