Migrating AI Colleagues

🚧

Coming Soon — Guided AOP Migration

We are actively building a guided flow to copy AOPs across environments. This flow will automatically handle pre-requisites like Skills, Workflow Apps, and Integration connections — significantly reducing the manual effort described in this guide. Stay tuned for updates.

Overview

Leena AI supports a multi-environment setup — Staging, UAT, and Production — so your team can build and test AI Colleague configurations safely before rolling them out to employees. Each environment runs as a separate bot instance within a shared bot cluster.

This guide walks you through the step-by-step process of promoting your AI Colleague setup from one environment to the next (e.g., Staging → UAT → Production). It covers the correct order of operations and the actions required for each component.


What Needs to Move

An AI Colleague setup consists of several interconnected components. Each component has its own migration path:

ComponentMigration MethodNotes
Integrations / ConnectorsManual setupCredentials and endpoints often differ across environments. Must be configured first.
Workflow ApplicationsAutomated (via Workflows Studio)Use the built-in App Migration feature. See documentation →
SkillsVaries by skill typeMain blocker — requires careful handling based on skill category. See detailed guidance below.
AI Colleagues (AICs)Manual recreationCreate and configure each AIC in the target environment.
AOPsManual recreationRebuild or copy AOP instructions in the target environment.

Recommended Migration Order

Follow this sequence to avoid dependency issues:

Integrations → Workflow Apps → Skills → AI Colleagues → AOPs

Each step depends on the one before it. For example, Skills reference Workflow Apps and Integrations, so those must exist in the target environment first. Similarly, AOPs reference Skills, so Skills must be set up before AOPs.


Step 1: Set Up Integrations and Connectors

Why this comes first: Skills, Workflow Apps, and AOPs rely on integration connections (e.g., Workday, ServiceNow, Jira, SFTP) to execute actions. These connections must be live and authenticated in the target environment before anything that depends on them can work.

What to do:

  1. Go to Integrations in the target environment's dashboard.
  2. For each integration your AI Colleague uses in the source environment, create a new connection in the target environment.
  3. Enter the target environment's credentials — these will typically differ from your source environment (different API keys, OAuth apps, service accounts, endpoints, etc.).
  4. Authenticate and verify each connection is active.

Important: Make a note of which integrations you've set up and their connection names. You'll need to map these during Workflow App migration and when recreating Skills.


Step 2: Migrate Workflow Applications

Why this comes second: Many Skills are backed by Workflow Apps. The Workflow App must exist in the target environment before you can create or link the corresponding Skill.

What to do:

Leena AI provides an automated migration flow for Workflow Applications. The detailed process is documented here: App Migrate & Clone Options →

In summary:

  1. In Workflows Studio, locate the application you want to migrate.
  2. Select Migrate from the app's options menu.
  3. Select the target bot — only bots within the same cluster are available. Details →
  4. Review warnings — the system flags any hardcoded values or potential issues. Details →
  5. Map configurations — the system extracts all environment-specific dependencies (Audiences, Users, Connections, Master Tables, DoA Datasets) and asks you to map each one to its equivalent in the target environment. Details →
  6. Complete migration — the system creates a new Draft version of the app in the target environment with all references remapped. Details →
  7. Review and publish — open the migrated app in the target environment, verify the configuration, and publish it.

You can track all migrations via Migration History. Details →

Tip: If you want to copy an app within the same environment (e.g., to create a variant), use the Clone option instead. Details →


Step 3: Recreate Skills

Skills are the main blocker during migration because the actions required depend on the type of skill. There is no one-click migration for all skill types — each category needs to be handled differently.

Understanding Skill Types

Skill TypeCategoryWhat It Does
Workflow SkillsWORKFLOWSTriggers a Workflow Application (conversational form, webview, or list view)
API SkillsAPIMakes custom HTTP calls (GET/POST) to external services
MCP SkillsMCPConnects to external tools via Model Context Protocol through the Integrations layer
Employee DirectoryDefaultSearches employee data — auto-provisioned per bot
Other Default SkillsDefaultSystem capabilities (web search, data analysis, etc.) — auto-provisioned

Workflow Skills

Effort: Low — These are auto-created when you link them.

Once the Workflow App has been migrated (Step 2), you can create the corresponding Workflow Skill in the target environment:

  1. Go to AIC Studio → Skills in the target environment.
  2. Click Add Skill → select Workflows as the category.
  3. The dropdown will show all migrated and published Workflow Apps available in this environment. Select the relevant app.
  4. The system automatically determines the best interaction mode (conversational, form agent, or webview) based on the form complexity.
  5. Configure the skill name, description, slug, and execution scope.
  6. If the workflow is asynchronous (long-running, involves approvals), enable Wait for callback.
  7. Save and enable the skill.

Key check: Make sure the Workflow App is published (not just in Draft) before creating the skill. Draft apps won't appear in the workflows list.

API Skills

Effort: Medium to High — These must be recreated manually.

API Skills make direct HTTP calls to external endpoints. Since URLs, authentication headers, and API keys typically differ between environments, these cannot be automatically migrated.

What to do:

  1. In the source environment, open each API Skill and note down its configuration:
    • HTTP method (GET / POST)
    • Endpoint URL
    • Headers (including auth tokens)
    • Query parameters
    • Path parameters
    • Request body schema
    • Which parameters are static ("const") vs. dynamic ("input" — filled by the AI)
  2. In the target environment, create a new API Skill with the equivalent configuration:
    • Update the endpoint URL to the target environment's API endpoint
    • Update authentication credentials (API keys, tokens, service account headers)
    • Keep the JSON schema structure the same unless the target API differs
  3. Use the Test API Skill feature to validate the configuration before enabling it.
  4. Match the skill name, slug, and description so that AOPs referencing it by name will work correctly.

Common pitfalls:

  • Forgetting to update hardcoded environment-specific URLs
  • Using source environment API keys/tokens that don't work in the target
  • Mismatching the skill slug — AOPs reference skills by identifier, so keep slugs consistent

MCP Skills

Effort: Medium — Requires re-linking to target environment connections.

MCP Skills connect to external tools (e.g., Jira, Salesforce, ServiceNow) through the Integrations layer. The application and connection IDs are environment-specific, so these skills must be recreated.

What to do:

  1. Ensure the required integration application is authenticated in the target environment (this should be done in Step 1).
  2. In the target environment, go to AIC Studio → Skills → Add Skill.
  3. Select MCP as the category.
  4. Browse the available integration applications and select the correct one.
  5. Choose the authenticated connection.
  6. Select the specific tools/actions you want to expose (or import all).
  7. Save — the system will automatically sync the tool definitions from the MCP server.
  8. Match the skill name and slug to what was used in the source environment.

Note: If the MCP server exposes OAuth-based tools (tools that require end-user login), verify that the OAuth flow works correctly in the target environment.

Default Skills (Employee Directory, Web Search, etc.)

Effort: None — These are automatically provisioned.

Default skills like Employee Directory, Web Search, Data Analysis, and Loop Executor are system-managed and automatically available in every bot environment. No migration action is needed.

However, if you've customized the configuration of the Employee Directory skill (e.g., which fields to use for semantic search, profile key mappings), verify these settings in the target environment and reconfigure if needed.


Step 4: Create AI Colleagues

AI Colleagues themselves need to be manually created in the target environment.

What to do:

  1. In the source environment, note down each AI Colleague's configuration:
    • Name and description
    • Avatar and persona settings
    • Enabled/disabled status
    • Any custom orchestrator-level settings
  2. In the target environment, go to AIC Studio and create each AI Colleague with the same configuration.
  3. Ensure the AIC is in Active status once configured.

Tip: If you have multiple AICs (e.g., "HR Assistant", "IT Helper", "Finance Bot"), create all of them before moving to AOPs, since AOPs are assigned to specific AICs.


Step 5: Rebuild AOPs

AOPs (Agent Operating Procedures) are the instructions that tell an AI Colleague how to behave, which skills to use, and how to handle specific scenarios. These must be rebuilt manually in the target environment.

What to do:

  1. In the source environment, open each AOP and copy or note down:
    • AOP name and identifier
    • AOP type (Primary / Helper)
    • Instruction text (the core prompt)
    • Referenced Skills (by name or identifier)
    • Referenced AOPs (if the AOP calls other AOPs)
    • Audience restrictions (if any)
    • Schedule configuration (if applicable)
  2. In the target environment, create each AOP under the correct AI Colleague:
    • Paste the instruction text
    • Re-link the Skills — make sure the skill names/identifiers match what you created in Step 3
    • Re-link any AOP cross-references
    • Configure audiences (these are environment-specific — set them up fresh in the target)
    • Set up schedules if needed
  3. Publish the AOP to make it active.

Important considerations:

  • Audiences are environment-specific. Even if the audience names are the same, they have different internal IDs across environments. Always select audiences from the target environment's audience list.
  • Skill references in AOP instructions use the skill's name or identifier. If you kept the same slugs and names in Step 3, the references will resolve correctly.
  • Test each AOP using the Workbench in the target environment before making it available to users.

Post-Migration Checklist

After completing all steps, validate your setup in the target environment:

  • Integrations: All connections are authenticated and active
  • Workflow Apps: Migrated apps are published (not in Draft)
  • Workflow Skills: Linked to the correct migrated Workflow Apps
  • API Skills: Endpoints, credentials, and schemas are correct for the target environment
  • MCP Skills: Connected to the right integration applications and connections; tools are synced
  • AI Colleagues: All AICs are created and active
  • AOPs: All AOPs are published, referencing the correct skills and audiences
  • End-to-end test: Run representative queries through the Workbench to verify skills execute correctly
  • Audience verification: Confirm that audience-scoped AOPs and Skills resolve to the correct user groups in the target environment

Frequently Asked Questions

Can I automate the entire migration? Currently, Workflow App migration is automated. For other components (Skills, AICs, AOPs), manual recreation is required because configuration values (credentials, audiences, connection IDs) are environment-specific.

What if I forget to migrate a Workflow App before creating its Skill? The Workflow App won't appear in the Skills dropdown. Migrate and publish the Workflow App first, then create the skill.

Do I need to recreate Default Skills? No. Default Skills (Employee Directory, Web Search, Data Analysis, etc.) are automatically available in every environment.

What happens to in-flight workflows during migration? Migration creates a new Draft version in the target environment. It does not affect running workflows in either the source or target environment.

Can I migrate between environments that are not in the same cluster? No. Workflow App migration is restricted to bots within the same cluster. For cross-cluster setups, all components must be manually recreated.