Cloning Graphs
Create complete copies of graphs with new identifiers for testing, migration, or templating
Overview
The graph.clone method creates a complete copy of a graph with a new
identifier. Clone a user graph to test or migrate one user’s context. Clone a
shared Context Graph to create an isolated test copy of an account, project,
product, or business-domain graph, or to use a maintained graph as a template.
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
Context 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