Assistant Update API
Update an existing Assistant programmatically
Updates an existing Assistant in your workspace. Only the fields you provide will be updated, allowing for partial updates without affecting other configuration.Documentation Index
Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
Use this file to discover all available pages before exploring further.
AGENT_API scope and access to the Assistant you want to update.Update Behavior
The update endpoint uses partial update semantics with specific behavior for different field types:- Partial updates - Only fields provided in the request are updated; omitted fields remain unchanged
- Array fields replace -
actions,inputFields,conversationStarters, andattachmentscompletely replace existing values when provided - Empty arrays - Send
[]to remove all actions/fields/attachments - Null handling - Send
nullforemojito clear it. Fordescriptionandinstruction, send an empty string""to clear them - Unchanged fields - Fields not included in the request retain their current values
Request Parameters
Set any of the parameters below to overwrite the assistant’s current settings. Fields you omit stay unchanged. OnlyassistantId is required.
| Parameter | Type | Required | Description |
|---|---|---|---|
assistantId | string | Yes | UUID of the assistant to update |
name | string | No | Assistant name (1-80 characters) |
description | string | No | Description (max 500 chars, "" to clear) |
emoji | string | No | Emoji icon (null to clear) |
instruction | string | No | System prompt (max 40000 chars, "" to clear) |
model | string | No | Model UUID |
creativity | number | No | Temperature between 0 and 1 |
conversationStarters | string[] | No | Suggested prompts (replaces existing) |
actions | array | No | Actions (replaces existing) |
inputFields | array | No | Form fields (replaces existing) |
attachments | string[] | No | Attachment UUIDs (replaces existing) |
webSearch | boolean | No | Enable web search |
imageGeneration | boolean | No | Enable image generation |
dataAnalyst | boolean | No | Enable code interpreter |
canvas | boolean | No | Enable canvas |
extendedThinking | boolean | No | Enable extended thinking mode |
Actions Configuration
Each action in theactions array should contain:
actionId(required) - UUID of the action from an enabled integrationrequiresConfirmation(optional) - Whether to require user confirmation before executing
Input Fields Configuration
ForinputFields array structure, see the Create Assistant API documentation.
Examples
Updating Basic Properties
Validation Rules
The API enforces several validation rules:- Assistant access - Your API key must have access to the assistant
- Workspace match - Assistant must belong to the same workspace as your API key
- Model - If provided, must be in your workspace’s active models list
- Actions - If provided, must belong to integrations enabled in your workspace
- Attachments - If provided, must exist in your workspace and not be deleted
- Name - If provided, must be between 1-80 characters
- Description - If provided, maximum 500 characters
- Instruction - If provided, maximum 40000 characters
- Creativity - If provided, must be between 0 and 1
Response Format
Success Response (200 OK)
Error Handling
Best Practices
actions or attachments, always include existing items you want to keep, as the entire array is replaced.- Fetch before update - If you need to preserve existing array values, fetch the current Assistant configuration first
- Incremental updates - Update only the fields that need to change
- Validate attachments - Ensure attachment UUIDs are valid before including them
- Test actions - Verify actions belong to enabled integrations before updating
- Handle errors gracefully - Implement proper error handling for validation failures
Migrating to Agents API
The new Agents API offers improved compatibility with modern AI SDKs. The update endpoint has similar functionality with updated parameter names. See the equivalent endpoint in the Agents API:- Agent Update API - Uses
agentIdinstead ofassistantId
Authorizations
API key as Bearer token. Format "Bearer YOUR_API_KEY"
Body
UUID of the agent to update
Updated name
1 - 255Updated description (null to clear)
256Updated emoji icon (null to clear)
Updated system prompt (null to clear)
16384Updated input type for the agent
PROMPT, STRUCTURED Model ID to use (see Models for Agent API)
Updated temperature
0 <= x <= 1Updated array of suggested prompts (replaces existing)
Updated array of actions (replaces existing)
Updated array of form fields (replaces existing)
Updated array of attachment UUIDs (replaces existing)
Updated web search capability setting
Updated image generation capability setting
Updated code interpreter capability setting
Updated canvas capability setting