Create Graph
Overview
While most use cases benefit from user-centric graphs that automatically integrate with users and threads, Zep also supports creating standalone graphs. Standalone graphs are useful for specific scenarios where you need independent knowledge graphs that arenβt tied to individual users.
When to Use Standalone Graphs
Consider using standalone graphs when you need to:
- Create shared knowledge bases across multiple users
- Build domain-specific knowledge graphs independent of user context
- Maintain separate graphs for testing or experimentation
- Implement custom graph architectures for specialized use cases
For most applications, we recommend using user graphs (created automatically when you add a user) as they provide seamless integration with Zepβs context retrieval and memory systems.
Creating a Standalone Graph
Working with Standalone Graphs
Once created, you can work with standalone graphs using the same methods as user graphs:
- Add data to the graph by specifying
graph_idinstead ofuser_id - Search the graph for relevant information
- Read data from the graph to inspect nodes and edges
- Delete data from the graph when needed
- Clone the graph to create copies
Customizing Graph Structure
Standalone graphs can be customized with entity and edge types just like user graphs. See Customizing Graph Structure for details on how to define custom ontologies for your graph.
Next Steps
- Learn how to add business data to your graph
- Explore graph search capabilities
- Understand how to customize graph structure