Reading Data from the Graph

Zep provides APIs to read Edges, Nodes, and Episodes from the graph. These elements can be retrieved individually using their UUID, or as lists associated with a specific user_id or group_id. The latter method returns all objects within the user’s or group’s graph.

Examples of each retrieval method are provided below.

Reading Edges

1from zep_cloud.client import AsyncZep
2
3client = AsyncZep(
4 api_key=API_KEY,
5)
6
7edge = await client.graph.edge.get(edge_uuid)

Reading Nodes

1from zep_cloud.client import AsyncZep
2
3client = AsyncZep(
4 api_key=API_KEY,
5)
6
7node = await client.graph.node.get_by_user(user_uuid)

Reading Episodes

1from zep_cloud.client import AsyncZep
2
3client = AsyncZep(
4 api_key=API_KEY,
5)
6
7episode = await client.graph.episode.get_by_group(group_uuid)