Update a stack
Update a stack
PATCH/api/v1/stacks/{stack_id}
Changes the fields you send and leaves the rest as they are. Renaming a stack changes its model_id.
Body ParametersJSON
name: optional string
Display name. The stack is called through model_id, which is derived from the name, so renaming a stack changes its model_id.
minLength1
maxLength255
model: optional string
The model the stack serves: a hosted model id from GET /models?type=hosted.
minLength1
maxLength255
tools: optional array of string
Tools the stack runs on each request, by server_label from GET /tools, plus web_search and code_execution. Replaces the whole selection; send [] for none.
agentic_memory: optional boolean
Whether requests to the stack use agentic memory unless they set it themselves. Teams with zero data retention cannot turn it on.
Update a stack
curl https://api.prod.adaptionlabs.ai/api/v1/stacks/$STACK_ID \
-X PATCH \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ADAPTION_API_KEY" \
-d '{}'{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"object": "stack",
"name": "Support bot",
"model_id": "stack/support-bot",
"status": "draft",
"model": "glm-5.2",
"tools": [
{
"server_label": "slack",
"status": "enabled"
}
],
"agentic_memory": true,
"self_improvement": true,
"created_at": "2019-12-27T18:11:19.117Z",
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"object": "stack",
"name": "Support bot",
"model_id": "stack/support-bot",
"status": "draft",
"model": "glm-5.2",
"tools": [
{
"server_label": "slack",
"status": "enabled"
}
],
"agentic_memory": true,
"self_improvement": true,
"created_at": "2019-12-27T18:11:19.117Z",
"updated_at": "2019-12-27T18:11:19.117Z"
}