Import/Export an Agent
Overview
Import/Export functionality allows you to package entire agents (including all their dependencies) into portable ZIP files. This is essential for agent lifecycle management, collaboration, and deployment automation.
Why Import/Export?
Use Cases:
Backup & Restore: Protect your agent configurations from accidental deletion or corruption
Version Control: Store agent configurations alongside code in Git
Environment Migration: Move agents from development → staging → production
Continuous Sync: Keep agents synchronized across environments with merge imports
Team Collaboration: Share agents with team members or customers
Disaster Recovery: Quickly restore agents after system failures
Agent Templates: Create reusable agent templates for similar use cases
CI/CD Integration: Automate agent deployment in your pipeline
What Gets Exported?
When you export an agent, EDDI packages:
✅ Agent configuration (package references)
✅ All packages used by the agent
✅ All extensions (behavior rules, dictionaries, HTTP calls, outputs, etc.)
✅ Version information
✅ Configuration metadata
✅ Origin IDs (resource identifiers for merge tracking)
Note: Conversations and conversation history are NOT exported (only configurations).
Import Strategies
EDDI supports two import strategies:
Create (default)
Always creates a new agent with new IDs
First-time import, creating copies
Merge
Updates existing resources by matching origin IDs
Syncing changes across environments
Export/Import Workflow
First-time import (Create):
Subsequent imports (Merge/Sync):
Best Practices
Version Your Exports: Include version numbers in filenames:
customer-support-agent-v2.3.zipPreview Before Merge: Always use the preview endpoint before merging to review changes
Selective Merge: Only merge the resources that actually changed to minimize risk
Document Changes: Keep a changelog of what changed between exports
Regular Backups: Schedule automated exports of production agents
Test Imports: Always test imported agents in a test environment first
Store Securely: Keep exports in secure, version-controlled storage (e.g., Git LFS, S3)
Common Scenarios
Scenario 1: Promoting to Production (first time)
Scenario 2: Syncing Updates (merge)
Scenario 3: Selective Merge (only specific resources)
Scenario 4: Disaster Recovery
Using the Manager UI
The EDDI Manager provides a guided import wizard accessible from the Agents page:
Upload — Drag-and-drop or browse for a
.zipexport fileChoose Strategy:
Create New Agent — Always creates a fresh agent (default)
Merge / Sync — Updates an existing agent if one with matching origin IDs exists
Preview (merge only) — Shows a table of all resources with their planned action:
🟢 New — Resource doesn't exist locally, will be created
🔵 Update — Resource exists locally, will be updated to the imported version
⚪ Skip — Resource is identical, no changes needed
Select Resources — Checkboxes let you pick which resources to merge (all selected by default)
Confirm — Executes the import
How Merge Tracking Works
When an agent is first imported into an EDDI instance, EDDI stores the origin ID of each resource (the ID it had on the source system) in the DocumentDescriptor. On subsequent imports with strategy=merge:
EDDI reads each resource from the ZIP
Looks up the origin ID in the local descriptor store (
findByOriginId)If found → updates the existing resource (creating a new version)
If not found → creates a new resource
The agent itself is updated with references to the (possibly new) resource versions
This means the agent ID stays the same across merge imports — only the version increments. Deployments, triggers, and integrations that reference the agent ID continue to work without reconfiguration.
API Reference
Exporting an Agent
Send a POST request to export. The response Location header contains the download URL.
HTTP Method
POST
API Endpoint
/backup/export/{agentId}?agentVersion={version}
Response
Location header with ZIP download URL
Example:
Importing an Agent (Create)
Upload a ZIP file to create a new agent.
HTTP Method
POST
API Endpoint
/backup/import
Content-Type
application/zip
Request Body
ZIP file binary
Response
Location header with new agent URI
Example:
Preview Merge Import
Dry-run analysis: returns what would change without modifying any data.
HTTP Method
POST
API Endpoint
/backup/import/preview
Content-Type
application/zip
Request Body
ZIP file binary
Response
JSON with resource diff analysis
Response format:
Actions:
CREATE— No matching local resource found; will be createdUPDATE— Matching local resource found; will be updatedSKIP— Resource is unchanged; will be skipped
Importing an Agent (Merge)
Update an existing agent by matching origin IDs.
HTTP Method
POST
API Endpoint
/backup/import?strategy=merge
Content-Type
application/zip
Request Body
ZIP file binary
Query Params
strategy=merge, optional selectedResources=id1,id2,...
Response
Location header with updated agent URI
Example (merge all):
Example (selective merge):
Important: The agent will not be deployed after import — you must deploy it yourself using the Deployment API.
Last updated
Was this helpful?