This guide explains how to migrate Assistants from one Langdock workspace to another using the Assistant API. This is useful when you want to replicate assistant configurations across different workspaces, move assistants during organizational restructuring, or create backup copies of your assistants.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.
Overview
The migration process involves two main steps:- Export: Retrieve the Assistant configuration from the source workspace using the assistant Get API
- Import: Create a new Assistant in the target workspace using the assistant Create API
Prerequisites
Before you begin, ensure you have:Two API keys with AGENT_API scope:- One API key for the source workspace (where the Assistant currently exists)
- One API key for the target workspace (where you want to migrate the Assistant)
- Access to the Assistant: Your source workspace API key must have access to the assistant you want to migrate
- Matching resources in target workspace (if applicable):
- The model will need to be manually adjusted in the Langdock UI after migration
- If the Assistant uses custom actions, those integrations must be enabled in the target workspace
- Attachments need to be re-uploaded separately (they are not transferred automatically)
Step 1: Export the Assistant from Source Workspace
Use the Assistant Get API to retrieve the complete configuration of your assistant:Understanding the Response
The Get API returns the complete Assistant configuration including:name,description,instruction- The Assistant’s identity and system promptemojiIcon- The emoji icon displayed for the Assistantmodel- UUID of the model being usedtemperature- Creativity setting (0-1)conversationStarters- Suggested prompts for usersinputType- Either “PROMPT” or “STRUCTURED”inputFields- Form field definitions (for STRUCTURED input type)webSearchEnabled,imageGenerationEnabled,codeInterpreterEnabled,canvasEnabled- Capability flagsactions- Custom integration actionsattachments- UUIDs of attached files
Step 2: Transform the Configuration
The Get API response uses slightly different field names than the Create API expects. You need to map the fields:Field Mapping Reference
| Get API Response Field | Create API Request Field |
|---|---|
name | name |
description | description |
emojiIcon | emoji |
instruction | instruction |
temperature | creativity |
inputType | inputType |
conversationStarters | conversationStarters |
webSearchEnabled | webSearch |
imageGenerationEnabled | imageGeneration |
codeInterpreterEnabled | dataAnalyst |
canvasEnabled | canvas |
inputFields | inputFields |
actions | actions |
attachments | attachments |
Step 3: Create the Assistant in Target Workspace
Use the Assistant Create API to create the assistant in the target workspace:Complete Migration Script
Here’s a complete script that combines all steps:Handling Special Cases
Actions (Custom Integrations)
Actions reference integrations that must be enabled in the target workspace. Action UUIDs are specific to each workspace’s integration setup.Attachments
Attachment UUIDs reference files stored in the source workspace. These files are not automatically transferred. To migrate attachments:- Download the files from the source workspace
- Re-upload them to the target workspace using the Upload Attachment API
- Update the Assistant with the new attachment UUIDs
OAuth Connections
Migrating Multiple Assistants
To migrate multiple Assistants, simply loop through a list of assistant IDs:Post-Migration Checklist
After migrating an Assistant, verify the following in the target workspace:- Assistant appears in the assistants list with correct name and emoji
- Description and instructions are correctly transferred
- Conversation starters are present
- Capabilities (web search, image generation, etc.) are correctly enabled
- Input fields are properly configured (for STRUCTURED input type)
- Manually configure any OAuth connections through the UI
- Re-upload and attach any necessary files
- Configure custom actions/integrations if needed
- Test the Assistant by sending a message
Limitations
Keep these limitations in mind when planning your migration:
- Attachments are not transferred - Files must be re-uploaded to the target workspace
- Actions may need reconfiguration - Integration action UUIDs are workspace-specific
- OAuth connections require manual setup - Cannot be configured via API
- Models require manual adjustment - The Assistant will use the workspace default model; adjust manually in the UI after migration
- Conversation history is not migrated - Only the Assistant configuration is transferred
Migrating to Agents API
The new Agents API offers improved compatibility with modern AI SDKs. The migration process is similar with updated parameter names. See the equivalent guide in the Agents API:- Agent Migration Guide - Uses
agentIdinstead ofassistantId
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.