Cloning Graphs
Create complete copies of graphs with new identifiers for testing, migration, or templating
Overview
The graph.clone method allows you to create complete copies of graphs with new identifiers. This is useful for scenarios like creating test copies of user data, migrating user graphs to new identifiers, or setting up template graphs for new users.
The clone operation returns a task_id that you can use to track the operation. See Check data ingestion status for polling instructions.
The target graph must not exist - they will be created as part of the cloning operation. If no target ID is provided, one will be auto-generated and returned in the response.
Clone a Graph
User Graph
Standalone Graph
Key Behaviors and Limitations
- Target Requirements: The target user or graph must not exist and will be created during the cloning operation
- Auto-generation: If no target ID is provided, Zep will auto-generate one and return it in the response
- Node Modification: The central user entity node in the cloned graph is updated with the new user ID, and all references in the node summary are updated accordingly