Edit the draft by sending only the fields you want to change. If the configuration changes, a new version is created. Publish it to apply those settings to your contacts; until then, the publication does not change.
The configuration sections you want to change, directly in the body. Send only the ones that change. See partial changes
-
note
string
Version note, up to 500 characters
-
{ "instructions": "You are the sales assistant for Acme Store. Answer in under 80 words.", "guardrails": { "message": "I can only help with store topics." }, "note": "Shorter answers"}
Changes are applied as follows:
An object is merged with the current one: the fields you don't send stay as they are.
A list, a string or any other value (including null) replaces the current one. instructions is a string, so it is replaced as a whole. To change a single subagent without sending the list, use Link a subagent.
The result is validated as a whole. If anything isn't valid, nothing is saved.
true if the change created a version. false if the configuration ended up the same: no version is created and the draft doesn't move
draft
The version the draft ended up on after the change
version
The created version, with the fields from List versions. With changed: false, the version the draft was already on
Errors
Status
details.code
When
400
INVALID_REQUEST
The body doesn't have the expected shape, for example it includes an unknown section
403
FORBIDDEN
The credential can't edit this agent
404
AGENT_NOT_FOUND
The agent doesn't exist in the workspace or was deleted
422
INVALID_CONFIG
An unknown field or an invalid value. details.issues lists the field path for each problem. Also when model isn't a model Platica knows, or when you send a name from the earlier shape, such as runtime: the message says where it is now
422
INVALID_SUBAGENT_LINK
subagents adds a link to an agent that doesn't exist in the workspace or was deleted, or to the same agent. A link the draft already had isn't checked again when saving
422
UNSUPPORTED_REASONING_EFFORT
model or a model in fallbackModels asks for a reasoning level it doesn't accept. details.supportedEfforts lists the supported values
422
MODEL_FALLBACKS_REQUIRE_OWN_KEY
fallbackModels adds a fallback the agent didn't have and the workspace has no own key connected. Keeping, removing or reordering the ones it already has, or emptying the list, doesn't need a key. See fallback models
Notes
If two people edit the draft at once, the last change wins; the previous one stays in the version history.