Agent Sync (Live & ZIP)
Overview
Agent Sync lets you synchronize agent configurations between two running EDDI instances without exporting/importing ZIP files. It uses the same structural matching and content diffing pipeline as ZIP imports, but reads directly from a remote EDDI instance over HTTP.
When to Use
One-off agent migration between environments
ZIP Import/Export
Regular dev → staging → production promotions
Agent Sync
Keeping multiple EDDI instances in sync
Agent Sync
Sharing agents with external teams
ZIP Import/Export
CI/CD pipeline deployments
Either (Sync for live, ZIP for artifact-based)
Prerequisites
Both EDDI instances must be reachable over HTTP/HTTPS
The source instance must have the agent deployed
If the source requires authentication, you'll need a valid Bearer token
Workflow
1. List Remote Agents
First, discover which agents are available on the remote instance:
Response: List of agent descriptors from the remote instance.
2. Preview Changes (Single Agent)
Before syncing, preview what would change:
Response: An ImportPreview with resource diffs:
Actions explained:
CREATE
Resource doesn't exist locally — will be created
UPDATE
Resource exists locally — content differs, will be updated
SKIP
Resource is identical — no changes needed
CONFLICT
Structural mismatch — review needed
3. Preview Batch (Multiple Agents)
Preview sync for multiple agents at once. The request body is a JSON array of SyncMapping objects:
Response: A JSON array of ImportPreview objects, one per mapping.
4. Execute Sync
Once you've reviewed the preview and are satisfied:
You can also pass selectedResources and workflowOrder as query parameters for fine-grained control:
5. Execute Batch Sync
Sync multiple agents in one call. The request body is a JSON array of SyncRequest objects:
Partial success: If one agent fails during batch sync, the remaining agents still sync. The response indicates success/failure per agent.
API Reference
GET
/backup/import/sync/agents
List remote agents
POST
/backup/import/sync/preview
Single-agent sync preview
POST
/backup/import/sync/preview/batch
Multi-agent sync preview
POST
/backup/import/sync
Execute single-agent sync
POST
/backup/import/sync/batch
Execute multi-agent sync
Parameters
Query parameters (all endpoints):
sourceUrl
Yes
Base URL of the source EDDI instance
sourceAgentId
Yes (single)
Agent ID on the remote instance
sourceAgentVersion
No
Version to sync (null = latest)
targetAgentId
No
Local agent to upgrade (null = create new)
selectedResources
No (execute only)
Comma-separated resource IDs to sync
workflowOrder
No (execute only)
Desired workflow order after sync
Note:
sourceUrland agent parameters are query parameters. Batch endpoints acceptSyncMapping[]/SyncRequest[]as a JSON request body for the per-agent mappings.
Request header:
X-Source-Authorization
No
Bearer token for authenticated source instances
How Structural Matching Works
Agent Sync uses structural matching — not ID matching — to pair source and target resources. This means it works even when the source and target agents were created independently.
Agent
Direct (by targetAgentId parameter)
User explicitly selects the target
Workflows
Position index in agent's workflow list
Workflows have a defined order
Extensions
WorkflowStep.type URI (e.g., ai.labs.llm)
Each type appears at most once per workflow
Snippets
PromptSnippet.name (natural key)
Names are unique by convention
Key Design Decisions
In-place upgrade: Target resource IDs are preserved. URI references, deployments, and triggers continue to work
Version increments: Each updated resource gets a new version (history preserved)
Secret scrubbing: API keys and vault references are never transferred. The target instance uses its own secrets
SSRF protection: The remote URL is validated (HTTPS required in production, private IPs blocked)
Upgrade Strategy (ZIP Import)
The same structural matching is available for ZIP imports using strategy=upgrade:
This is the same pipeline as Live Sync — the only difference is the transport (ZIP file vs HTTP).
Selective Export
Export only the resources you want:
The preview returns a resource tree with selectability flags. Agent and workflow skeletons are always included — you can deselect individual extensions, behavior rules, or prompt snippets.
See Also
Import/Export an Agent — ZIP-based import/export (create and merge strategies)
Agent Sync Architecture — Internal architecture and matching algorithm details
Deployment Management — Deploying agents after sync
Last updated
Was this helpful?