AI Employee Export & Import
You can package an AI Employee, its workflow and the configuration that drives it, as a reusable template, then create a fresh AI Employee from that template in the same workspace or in another workspace in your hierarchy. This is how AI Employees move between teams and environments without copying them by hand. You can also export an AI Employee as a bundle file and import it elsewhere. This page covers what a template includes, how to export and import templates and bundles, and the version and permission rules that govern the flow.
Two ways to move an AI Employee. A template stays inside Ema: saving as a template exports, and creating an AI Employee from a template imports. Templates are workspace-scoped and travel across workspaces only through an explicit cross-workspace grant. A bundle is a JSON file you download from one workspace and upload in another. See Export and import with a bundle file.
Concepts
- Export = save as template. Snapshotting an AI Employee's workflow and configuration into a template, owned by your workspace.
- Import = create from template. Cloning a template into a brand-new AI Employee in the target workspace, with new identifiers.
- Grant. An explicit, one-directional permission that makes one workspace's template usable by a descendant workspace. Without a grant, a template is visible only inside the workspace that owns it.
- Clone. A same-workspace copy of an AI Employee. Useful for duplicating within one workspace; it does not cross workspace boundaries.
- Bundle. A JSON file that Export downloads and Import AI Employee or Update from package uploads. A bundle moves an AI Employee to any workspace you can upload to, and can update an existing AI Employee. See Export and import with a bundle file.
What a template includes
When you save an AI Employee as a template, Ema snapshots two things from the source workflow:
- The workflow definition: the directed acyclic graph (DAG) of typed agents that defines how the AI Employee runs, plus its interaction type (chat, dashboard, or voice (Beta)), description, and icon.
- A configuration snapshot: the settings that shape behavior, captured as a point-in-time copy:
| Included in the snapshot | What it is |
|---|---|
| EmaFusion™ model selection | The model mode, selected model IDs, any custom model configuration, and the optimization priority. |
| Data protection fields | The fields flagged for protection. |
| Glossary terms | The custom glossary attached to the AI Employee. |
| Conversation and feedback settings | Conversation context, feedback on/off, positive and negative feedback reasons, and comment capture. |
| Welcome experience | The welcome message and welcome buttons. |
| Provider preference | Whether the AI Employee uses your workspace's own model providers. |
| Recommended Knowledge Bases | The names and scopes of the knowledge base folders the source had attached, recorded as recommendations. |
| Custom metrics views | The AI Employee's metrics view graph, including root and drilldown dashboards, chart queries and presentation settings, and saved filter presets. |
| Custom event definitions | The exact custom metrics event and metric definitions referenced by the metrics view, including transitive dependencies. |
Orchestrator AI Employees have no workflow definition, so there is no DAG to snapshot. Exporting one carries its configuration and its list of connected AI Employees instead. See Orchestrator AI Employees.
What does not travel with a template
A template carries structure and configuration, not workspace data or live state. The following are intentionally not copied:
- Knowledge base content. Knowledge Base folder names and scopes are recorded as recommendations and recreated as empty folders on import; the documents and their embeddings are not. You populate the knowledge base in the target workspace.
- Run history, sessions, evaluations, and audit events. These belong to the source AI Employee and its workspace.
- Per-resource access grants and version history. The imported AI Employee starts fresh (see Version implications and Permission implications).
- Secrets and credentials. Integration connections and API keys are workspace-scoped and are never embedded in a template.
- Event observations and query results. Metrics view transfer carries configuration only; observed events, query results, and source publication history are never included.
Export: save an AI Employee as a template
From the AI Employee builder, use Save as template. You provide a name (unique within your workspace), a category, at least one "how to use" step, and optional description and benefits. Ema snapshots the current workflow DAG and configuration into a new template owned by your workspace.
Under the hood this is POST /templates with the source workflow_id. The new template's source_type is custom, and a template.created audit event is recorded. Saving a template requires the builder, builder_admin, or system_admin role.
POST /api/v1/workflow/templates
Content-Type: application/json
{
"workflow_id": "8f3a...",
"name": "Support Triage AI Employee",
"category": "Support",
"how_to_use": "1. Connect your ticketing knowledge base\n2. Publish",
"description": "Routes inbound tickets and drafts a first reply."
}
Curated templates are read-only. Templates Ema ships (source_type: curated) and the hidden starter templates cannot be edited or deleted. Only templates your workspace created (custom) can be updated, archived, or granted.
Metrics views in AI Employee export and import
AI Employee export, import, template installation, and the public clone action all carry the AI Employee's metrics view automatically. There is no separate metrics-view step.
Make a template available in another workspace
A custom template is visible only inside the workspace that created it. To use it in a different workspace, the owning workspace's System Admin grants it to a target workspace. Grants are subject to two hard rules:
- Descendant-only. The target must be a descendant of the granting workspace in the workspace hierarchy. You cannot grant to a sibling, a parent, or an unrelated workspace. A self-grant is rejected.
- System Admin only. Only a
system_adminof the owning workspace can create, list, or revoke a grant.
POST /api/v1/workflow/templates/{id}/grants
Content-Type: application/json
{ "target_tenant_id": "b21c..." }
Granting records a template.grant_created audit event; revoking records template.grant_revoked. Revoking a grant stops the target workspace from creating new AI Employees from the template; it does not affect AI Employees the target already imported, because those are independent copies.
This grant is the cross-workspace/cross-environment "transport." To move an AI Employee from one environment to another, save it as a template in the source workspace, grant the template to the destination workspace, and import it there.
Import: create an AI Employee from a template
In the target workspace, the builder can pick a template (a starter, a curated template, one the workspace owns, or one granted to it) and create a new AI Employee from it, optionally renaming it and assigning it to a group. Ema creates a brand-new workflow in the target workspace, copies the DAG definition, applies the configuration snapshot, recreates the recommended knowledge base folders as empty folders, and restores the metrics view graph along with its referenced custom event definitions.
Under the hood this is POST /templates/{id}/create-workflow. The platform first checks that the caller's workspace is allowed to see the template (it owns it, it is a starter or curated, or it has been granted); if not, the template appears as "not found." A successful import records a workflow.created audit event in the target workspace. Importing requires the builder, builder_admin, or system_admin role.
POST /api/v1/workflow/templates/{id}/create-workflow
Content-Type: application/json
{ "name": "Support Triage (EMEA)", "group_id": "g7d2..." }
The group_id field is optional. When provided, the imported AI Employee is placed directly into that group. Omit it to import without a group assignment.
After import, finish setup in the target workspace: populate the recreated knowledge base folders, connect any integrations the workflow expects, confirm the EmaFusion™ model selection resolves to models available in the target workspace, and publish.
Export and import with a bundle file
Templates stay inside Ema. To move an AI Employee as a file instead, export it as a bundle: a JSON file you download from one workspace and upload in another, for example to promote an AI Employee from a staging workspace to production. A bundle can create a new AI Employee or update one that already exists. An update replaces the AI Employee's workflow and configuration and keeps its identity, keys, and history.
Export a bundle
Open the AI Employee's ⋯ menu and choose Export. The dialog names the version it exports and lists what the bundle includes: Knowledge Bases, tag taxonomies, integrations, MCP servers, child AI Employees, schedules, webhook triggers, poll triggers, and events. Choose Download bundle to save the .json file. A bundle never carries credentials, document content, or history.
Import a bundle
- To create a new AI Employee, open the More actions (⋮) menu on the AI Employees list and choose Import AI Employee.
- To update an existing AI Employee, open its ⋯ menu and choose Update from package. The wizard targets that AI Employee and skips the Target step.
The import wizard has four steps: Upload (a bundle .json file under 50 MB), Target (create a new AI Employee or update an existing one), Review, and Done. An update needs a bundle of the same interaction type as the AI Employee it updates: for example, a chat bundle cannot update a voice AI Employee.
Review: connections
The Review step's Connections section lists each connection the bundle uses and the connection in this workspace that the import will use for it. A tag on each row says how that connection was chosen:
| Tag | How the connection was chosen |
|---|---|
| Kept | The import updates an existing AI Employee and keeps the connection it already uses. |
| Remembered | Your workspace chose this connection for the same connection in an earlier import. |
| Matched | This workspace has a connection with the same identifier or the same name. |
| Changed | You picked a different connection on this row. |
| Choose | No connection was found automatically. Pick one. |
You can change any row before you import. While a Choose row has connections to pick from, Import stays disabled. A row whose integration is new to this workspace, or that has no usable connection, shows a note instead of a picker and does not block the import: set up its connection after the import.
If a step in the AI Employee cannot use the connection you chose, the import stops with an error. Choose another connection and import again.
Review: trigger setting changes
When an import updates an existing AI Employee, the Review step lists its schedules, polls, and webhooks whose settings the import changes. Schedules, polls, and webhooks have one set of settings for all versions of an AI Employee, so these changes take effect when you import, including for the live version, even when the rest of the import lands as a draft.
Where an import lands
By default, an import goes live: the imported version becomes the active version as soon as you import.
When safe promotion is turned on for your workspace, an import lands as the draft instead, and the Review step says This import lands as a draft. The live and testing versions do not change; publish the draft when it is ready. A new AI Employee imported this way is a draft with no published version, and child AI Employees created from the bundle land the same way.
Two things always go live, even with safe promotion on:
- An Orchestrator AI Employee import.
- A voice AI Employee's call flow. A call flow has no draft, so the import publishes it even when the rest of the import lands as a draft.
Enabled per workspace. Safe promotion, which adds draft and testing stages before live (Promote to testing), is off by default. If the Review step never says the import lands as a draft, imports in your workspace go live. Contact your administrator to have it turned on.
Importing over a draft with local edits
When an import would land as the draft of an existing AI Employee, the Review step checks whether that draft was changed since the last publish or import. If it was, a warning says when the draft was last changed and what it was changed on top of: a published version or an earlier import. The import replaces the draft, and nothing is merged. The selected models, the file Knowledge Base, and the AI Employee's own triggers stay as they are.
Import stays disabled until you tick Replace my draft changes. If you re-validate the import, tick it again. This check applies only when an import lands as a draft (see Where an import lands).
Finish setting up
After the import, the Done step shows a Finish setting up checklist. An import copies definitions only, so the checklist lists what still needs attention on the imported AI Employee and its child AI Employees. Each item links to the page where you fix it, in a new tab, so the checklist stays open while you work.
| Item | What it means | What to do |
|---|---|---|
| Empty Knowledge Base | The import created this Knowledge Base. A bundle carries no documents, so it arrives empty. | Select Open knowledge base, then add documents or connect its sources so it can sync. |
| Trigger off | A schedule, webhook, or poll that the import left off. | Follow the link to the AI Employee builder and turn the trigger on in the Start step. For a webhook, first give its new URL to the sending app. For a poll, first choose its connections and run a fetch test. |
| Unresolved connection | No connection in this workspace was chosen for a connection the bundle uses. | Select Open app, then pick a connection. If the app is not in this workspace, choose Open apps to add it first. |
If the import landed as a draft, the checklist also notes that triggers run only the live version: publish the draft before you turn them on.
Editing an imported AI Employee
The first time you change an imported AI Employee, in the AI Employee builder or on its other tabs, a warning names the workspace it was imported from and reminds you that local changes make the next import harder. Make the change in the source workspace and export it again instead. A dismissed warning stays dismissed in that browser until the next import.
Voice AI Employees
Voice AI Employees export and import with the same bundle flow, including through Import AI Employee to create a new one. The bundle carries the published call flow, including its Call Open and Call Wrap configuration.
- Export needs a published call flow. Export appears in the ⋯ menu only to builders, and only once the voice AI Employee has a published version. If a voice AI Employee this one calls has no call flow that can be exported, the whole export fails.
- Format version 6. A bundle that contains any voice AI Employee, at the top or as a child, has format version 6. An Ema environment that does not support version 6 rejects the bundle rather than importing an empty AI Employee.
- Phone numbers do not travel. Each number routes to exactly one call flow. Claim a number for the imported AI Employee in the destination workspace.
- Training data does not travel. Generation projects, uploaded call transcripts, and SOP documents stay behind. The imported call flow works without them.
The call flow's references are carried in the bundle and rebound on import, like the workflow's:
| Call flow reference | On import |
|---|---|
| Knowledge Base search tools, with their tag filters. A call flow can use only Knowledge Bases this AI Employee owns; the export is refused otherwise. | Re-pointed at the imported Knowledge Bases. A Knowledge Base or tag filter that was not imported is removed, with a warning. |
| Integration and MCP tools | Re-pointed at the imported integrations and MCP servers. One the bundle does not carry is treated as built in to the environment and passes through unchanged. |
| Call another AI Employee tools. The called AI Employees travel as child AI Employees. | Re-pointed at the child AI Employees the import creates or reuses. |
| Call Open and Call Wrap. Their workflows travel as child AI Employees. | A new AI Employee gets its own copies; two AI Employees never share one. An update keeps the target's own Call Open and Call Wrap workflows for each block the incoming call flow still has. If one was not imported, it is removed with a warning: save that block's configuration once to create a new one. |
If an import fails after the call flow was installed, Ema tries to undo the call flow change: an update returns to the previous call flow version, and a new AI Employee's call flow is removed. The undo is best effort, so check the live call flow after a failed import.
Clone within a workspace
To duplicate an AI Employee inside the same workspace, without going through a template, use Clone. Cloning creates a new AI Employee that copies the source's name (suffixed with "(Copy)" unless you supply a name), description, icon, category, DAG definition, and metrics view, and records an ai_employee.cloned audit event. A clone refuses outright if the source belongs to a different workspace, so it is never a cross-workspace path; that is what grants are for.
Version implications
Versioning does not carry across export and import:
- The template captures one point in time. The DAG and configuration snapshot reflect the source workflow exactly when you saved the template. Editing or republishing the source afterward does not update the template, and editing the template's metadata does not change AI Employees already imported from it.
- The imported AI Employee starts a fresh version history. It does not inherit the source's published versions, drafts, or version numbers. Its first save creates its own draft version, and you publish it on its own timeline in the target workspace.
- Publish and revert are local. Publishing, promoting, and reverting versions act only on the AI Employee in its own workspace. There is no link back to the template or to the source AI Employee.
- A bundle update adds to the target's history. Updating an existing AI Employee from a bundle keeps its version history and adds what it imports as a new version: live, or the draft when safe promotion is on (see Where an import lands).
- A voice call flow has its own versions. An import publishes a new call flow version, even when the rest of the import lands as a draft.
Permission implications
- Exporting, importing, and cloning are builder-tier actions, available to
builder,builder_admin, andsystem_admin. Theuserandno_accessroles cannot perform them. - Granting across workspaces is restricted to
system_adminof the owning workspace, and only to descendant workspaces. - Per-resource access grants do not transfer. Any fine-grained access you configured on the source AI Employee is not copied. The imported AI Employee starts with default access in the target workspace, which you set there.
- Within Ema, cross-workspace copying is blocked except through grants. Clone is same-workspace only; "create from template" honors the grant check; and every copy operation writes the new resource under the caller's workspace, so a template can never pull a workflow into a workspace that was not explicitly granted access. A bundle file is the other path: anyone with the file and builder access in a workspace can import it there, so share bundles only with the workspaces they are meant for.
- Custom event definitions in metrics views retain management checks at the destination. The destination workspace must have the required custom metrics management capability to activate any custom definitions carried by the view.
Reference: endpoints
| Action | Endpoint | Role |
|---|---|---|
| Export (save as template) | POST /templates | builder and up |
| List templates | GET /templates | builder and up |
| Update template metadata | PUT /templates/{id} | Owner-workspace system_admin or creator |
| Archive a template | DELETE /templates/{id} | Owner-workspace system_admin or creator |
| Import (create from template) | POST /templates/{id}/create-workflow | builder and up |
| Grant a template to a descendant workspace | POST /templates/{id}/grants | system_admin |
| List a template's grants | GET /templates/{id}/grants | system_admin |
| Revoke a grant | DELETE /templates/{id}/grants/{tenantId} | system_admin |
| Clone within the same workspace | POST /ai-employees/{id}/clone | builder and up |
What's next
- Security & Compliance: workspace isolation rules that govern cross-workspace copying.
- Governance and permissions: the roles required for each action above.
- Tenant management and SSO: the workspace hierarchy that defines which workspaces you can grant to.
- Audit log: the template, grant, and workflow events recorded by export and import.