client.batch.list(...)
-
-
-
List batches for the current project, optionally filtered by batch status.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.batch.list( limit=1, cursor=1, status="status", )
-
-
-
limit:
typing.Optional[int]— Maximum number of batches to return.
-
cursor:
typing.Optional[int]— Pagination cursor from a previous response.
-
status:
typing.Optional[str]— Batch status filter.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.batch.create(...)
-
-
-
Create a draft batch that can be filled with graph episodes and thread messages.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.batch.create()
-
-
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.batch.get(...)
-
-
-
Get a batch summary, including runtime progress when the batch has been processed.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.batch.get( batch_id="batchId", )
-
-
-
batch_id:
str— The batch ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.batch.delete(...)
-
-
-
Delete a draft or invalid unprocessed batch. Processed batches cannot be deleted.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.batch.delete( batch_id="batchId", )
-
-
-
batch_id:
str— The batch ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.batch.list_items(...)
-
-
-
List items in a batch, including derived runtime status when the batch has been processed.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.batch.list_items( batch_id="batchId", limit=1, cursor=1, status="status", )
-
-
-
batch_id:
str— The batch ID.
-
limit:
typing.Optional[int]— Maximum number of batch items to return.
-
cursor:
typing.Optional[int]— Pagination cursor from a previous response.
-
status:
typing.Optional[str]— Batch item status filter.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.batch.add(...)
-
-
-
Add graph episodes and thread messages to a draft batch. Items are appended in request order.
-
-
-
from zep_cloud import BatchAddItem, Zep client = Zep( api_key="YOUR_API_KEY", ) client.batch.add( batch_id="batchId", items=[ BatchAddItem( type="graph_episode", ) ], )
-
-
-
batch_id:
str— The batch ID.
-
items:
typing.Sequence[BatchAddItem]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.batch.process(...)
-
-
-
Start processing a filled batch. Repeated calls return the existing batch run.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.batch.process( batch_id="batchId", )
-
-
-
batch_id:
str— The batch ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.context.list_context_templates()
-
-
-
Lists all context templates.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.context.list_context_templates()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.context.create_context_template(...)
-
-
-
Creates a new context template.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.context.create_context_template( template="template", template_id="template_id", )
-
-
-
template:
str— The template content (max 1200 characters).
-
template_id:
str— Unique identifier for the template (max 100 characters).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.context.get_context_template(...)
-
-
-
Retrieves a context template by template_id.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.context.get_context_template( template_id="template_id", )
-
-
-
template_id:
str— Template ID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.context.update_context_template(...)
-
-
-
Updates an existing context template by template_id.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.context.update_context_template( template_id="template_id", template="template", )
-
-
-
template_id:
str— Template ID
-
template:
str— The template content (max 1200 characters).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.context.delete_context_template(...)
-
-
-
Deletes a context template by template_id.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.context.delete_context_template( template_id="template_id", )
-
-
-
template_id:
str— Template ID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.list_custom_instructions(...)
-
-
-
Lists all custom instructions for a project, user, or graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.list_custom_instructions( user_id="user_id", graph_id="graph_id", )
-
-
-
user_id:
typing.Optional[str]— User ID to get user-specific instructions
-
graph_id:
typing.Optional[str]— Graph ID to get graph-specific instructions
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.add_custom_instructions(...)
-
-
-
Adds new custom instructions for graphs without removing existing ones. If user_ids or graph_ids is empty, adds to project-wide default instructions.
-
-
-
from zep_cloud import CustomInstruction, Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.add_custom_instructions( instructions=[ CustomInstruction( name="name", text="text", ) ], )
-
-
-
instructions:
typing.Sequence[CustomInstruction]— Instructions to add to the graph.
-
graph_ids:
typing.Optional[typing.Sequence[str]]— Graph IDs to add the instructions to. If empty, the instructions are added to the project-wide default.
-
user_ids:
typing.Optional[typing.Sequence[str]]— User IDs to add the instructions to. If empty, the instructions are added to the project-wide default.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.delete_custom_instructions(...)
-
-
-
Deletes custom instructions for graphs or project wide defaults.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.delete_custom_instructions()
-
-
-
graph_ids:
typing.Optional[typing.Sequence[str]]— Determines which group graphs will have their custom instructions deleted. If no graphs are provided, the project-wide custom instructions will be affected.
-
instruction_names:
typing.Optional[typing.Sequence[str]]— Unique identifier for the instructions to be deleted. If empty deletes all instructions.
-
user_ids:
typing.Optional[typing.Sequence[str]]— Determines which user graphs will have their custom instructions deleted. If no users are provided, the project-wide custom instructions will be affected.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.list_entity_types(...)
-
-
-
Returns all entity types for a project, user, or graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.list_entity_types( user_id="user_id", graph_id="graph_id", )
-
-
-
user_id:
typing.Optional[str]— User ID to get user-specific entity types
-
graph_id:
typing.Optional[str]— Graph ID to get graph-specific entity types
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.set_entity_types_internal(...)
-
-
-
Sets the entity types for multiple users and graphs, replacing any existing ones.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.set_entity_types_internal()
-
-
-
edge_types:
typing.Optional[typing.Sequence[EdgeType]]
-
entity_types:
typing.Optional[typing.Sequence[EntityType]]
-
graph_ids:
typing.Optional[typing.Sequence[str]]
-
user_ids:
typing.Optional[typing.Sequence[str]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.add(...)
-
-
-
Add data to the graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.add( data="data", type="text", )
-
-
-
data:
str
-
type:
GraphDataType
-
created_at:
typing.Optional[str]
-
graph_id:
typing.Optional[str]— graph_id is the ID of the graph to which the data will be added. If adding to the user graph, please use user_id field instead.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— Optional metadata key-value pairs. Max 10 keys. Values must be strings, numbers, booleans, or arrays of scalars.
-
source_description:
typing.Optional[str]
-
user_id:
typing.Optional[str]— User ID is the ID of the user to which the data will be added. If not adding to a user graph, please use graph_id field instead.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.add_batch(...)
-
-
-
Add data to the graph in batch mode. Episodes are processed sequentially in the order provided.
-
-
-
from zep_cloud import EpisodeData, Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.add_batch( episodes=[ EpisodeData( data="data", type="text", ) ], )
-
-
-
episodes:
typing.Sequence[EpisodeData]
-
graph_id:
typing.Optional[str]— graph_id is the ID of the graph to which the data will be added. If adding to the user graph, please use user_id field instead.
-
user_id:
typing.Optional[str]— User ID is the ID of the user to which the data will be added. If not adding to a user graph, please use graph_id field instead.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.add_fact_triple(...)
-
-
-
Add a fact triple for a user or group
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.add_fact_triple( fact="fact", fact_name="fact_name", )
-
-
-
fact:
str— The fact relating the two nodes that this edge represents
-
fact_name:
str— The name of the edge to add. Should be all caps using snake case (eg RELATES_TO)
-
created_at:
typing.Optional[str]— The timestamp of the message
-
edge_attributes:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]Additional attributes of the edge. Values must be scalar types (string, number, boolean, or null). Nested objects and arrays are not allowed.
-
expired_at:
typing.Optional[str]— The time (if any) at which the edge expires
-
fact_uuid:
typing.Optional[str]— The uuid of the edge to add
-
graph_id:
typing.Optional[str]
-
invalid_at:
typing.Optional[str]— The time (if any) at which the fact stops being true
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]Optional metadata key-value pairs for the shadow episode created for this fact triple. Max 10 keys. Values must be strings, numbers, or booleans.
-
source_node_attributes:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]Additional attributes of the source node. Values must be scalar types (string, number, boolean, or null). Nested objects and arrays are not allowed.
-
source_node_labels:
typing.Optional[typing.Sequence[str]]— The labels for the source node
-
source_node_name:
typing.Optional[str]— The name of the source node to add
-
source_node_summary:
typing.Optional[str]— The summary of the source node to add
-
source_node_uuid:
typing.Optional[str]— The source node uuid
-
target_node_attributes:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]Additional attributes of the target node. Values must be scalar types (string, number, boolean, or null). Nested objects and arrays are not allowed.
-
target_node_labels:
typing.Optional[typing.Sequence[str]]— The labels for the target node
-
target_node_name:
typing.Optional[str]— The name of the target node to add
-
target_node_summary:
typing.Optional[str]— The summary of the target node to add
-
target_node_uuid:
typing.Optional[str]— The target node uuid
-
user_id:
typing.Optional[str]
-
valid_at:
typing.Optional[str]— The time at which the fact becomes true
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.clone(...)
-
-
-
Clone a user or group graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.clone()
-
-
-
source_graph_id:
typing.Optional[str]— source_graph_id is the ID of the graph to be cloned. Required if source_user_id is not provided
-
source_user_id:
typing.Optional[str]— user_id of the user whose graph is being cloned. Required if source_graph_id is not provided
-
target_graph_id:
typing.Optional[str]— target_graph_id is the ID to be set on the cloned graph. Must not point to an existing graph. Required if target_user_id is not provided.
-
target_user_id:
typing.Optional[str]— user_id to be set on the cloned user. Must not point to an existing user. Required if target_graph_id is not provided.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.create(...)
-
-
-
Creates a new graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.create( graph_id="graph_id", )
-
-
-
graph_id:
str
-
description:
typing.Optional[str]
-
name:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.list_all(...)
-
-
-
Returns all graphs. In order to list users, use user.list_ordered instead
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.list_all( page_number=1, page_size=1, search="search", order_by="order_by", asc=True, )
-
-
-
page_number:
typing.Optional[int]— Page number for pagination, starting from 1.
-
page_size:
typing.Optional[int]— Number of graphs to retrieve per page.
-
search:
typing.Optional[str]— Search term for filtering graphs by graph_id.
-
order_by:
typing.Optional[str]— Column to sort by (created_at, group_id, name).
-
asc:
typing.Optional[bool]— Sort in ascending order.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.detect_patterns(...)
-
-
-
Detects structural patterns in a knowledge graph including relationship frequencies, multi-hop paths, co-occurrences, hubs, and clusters. When a query is provided, uses hybrid search to discover seed nodes, detects triple-frequency patterns, and returns resolved edges ranked by relevance.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.detect_patterns()
-
-
-
detect:
typing.Optional[DetectConfig]Which pattern types to detect with type-specific configuration. Omit to detect all types with defaults. Ignored when query is set.
-
edge_limit:
typing.Optional[int]— Max resolved edges per pattern. Default: 10, Max: 100. Only used with query.
-
graph_id:
typing.Optional[str]— Graph ID when detecting patterns on a named graph
-
limit:
typing.Optional[int]— Max patterns to return. Default: 50, Max: 200
-
min_occurrences:
typing.Optional[int]— Minimum occurrence count to report a pattern. Default: 2
-
query:
typing.Optional[str]Search query for discovering seed nodes via hybrid search. When set, forces triple-frequency detection only and enables edge resolution with cross-encoder reranking. Mutually exclusive with seeds.
-
query_limit:
typing.Optional[int]— Max seed nodes from search. Default: 10, Max: 50. Only used with query.
-
recency_weight:
typing.Optional[RecencyWeight]Exponential half-life decay applied to edge created_at timestamps. Valid values: none, 7_days, 30_days, 90_days. Default: none
-
search_filters:
typing.Optional[SearchFilters]Filters which edges/nodes participate in pattern detection. Reuses the same filter format as /graph/search.
-
seeds:
typing.Optional[PatternSeeds]— Seed selection. If omitted, analyzes the entire graph. Mutually exclusive with query.
-
user_id:
typing.Optional[str]— User ID when detecting patterns on a user graph
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.search(...)
-
-
-
Perform a graph search query.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.search( query="query", )
-
-
-
query:
str— The string to search for (required)
-
bfs_origin_node_uuids:
typing.Optional[typing.Sequence[str]]— Nodes that are the origins of the BFS searches
-
center_node_uuid:
typing.Optional[str]— Node to rerank around for node distance reranking
-
graph_id:
typing.Optional[str]— The graph_id to search in. When searching user graph, please use user_id instead.
-
limit:
typing.Optional[int]— The maximum number of facts to retrieve. Defaults to 10. Limited to 50.
-
max_characters:
typing.Optional[int]— Maximum total characters across all selected results when scope=auto. Defaults to 2500. Limited to 50000.
-
mmr_lambda:
typing.Optional[float]— weighting for maximal marginal relevance
-
reranker:
typing.Optional[Reranker]Defaults to RRF. When scope=auto, this only affects graph-service retrieval shape for graph facts, observations, and thread summaries; source-episode retrieval uses RRF, and auto search applies its own internal rerank after retrieval.
-
return_raw_results:
typing.Optional[bool]When scope=auto, include the selected raw graph results alongside the materialized context block. For graph-service-backed auto mode, selected raw results may include episodes, edges, nodes, observations, and thread_summaries.
-
scope:
typing.Optional[GraphSearchScope]— Defaults to Edges.
-
search_filters:
typing.Optional[SearchFilters]— Search filters to apply to the search
-
user_id:
typing.Optional[str]— The user_id when searching user graph. If not searching user graph, please use graph_id instead.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.get(...)
-
-
-
Returns a graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.get( graph_id="graphId", )
-
-
-
graph_id:
str— The graph_id of the graph to get.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.delete(...)
-
-
-
Deletes a graph. If you would like to delete a user graph, make sure to use user.delete instead.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.delete( graph_id="graphId", )
-
-
-
graph_id:
str— Graph ID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.update(...)
-
-
-
Updates information about a graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.update( graph_id="graphId", )
-
-
-
graph_id:
str— Graph ID
-
description:
typing.Optional[str]
-
name:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.project.get()
-
-
-
Retrieve project info based on the provided api key.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.project.get()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.task.get(...)
-
-
-
Gets a task by its ID
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.task.get( task_id="task_id", )
-
-
-
task_id:
str— Task ID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.list_all(...)
-
-
-
Returns all threads.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.list_all( page_number=1, page_size=1, order_by="order_by", asc=True, )
-
-
-
page_number:
typing.Optional[int]— Page number for pagination, starting from 1
-
page_size:
typing.Optional[int]— Number of threads to retrieve per page.
-
order_by:
typing.Optional[str]— Field to order the results by: created_at, updated_at, user_id, thread_id.
-
asc:
typing.Optional[bool]— Order direction: true for ascending, false for descending.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.create(...)
-
-
-
Start a new thread.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.create( thread_id="thread_id", user_id="user_id", )
-
-
-
thread_id:
str— The unique identifier of the thread.
-
user_id:
str— The unique identifier of the user associated with the thread
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.delete(...)
-
-
-
Deletes a thread.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.delete( thread_id="threadId", )
-
-
-
thread_id:
str— The ID of the thread for which memory should be deleted.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.get_user_context(...)
-
-
-
Returns most relevant context from the user graph (including memory from any/all past threads) based on the content of the past few messages of the given thread.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.get_user_context( thread_id="threadId", template_id="template_id", )
-
-
-
thread_id:
str— The ID of the current thread (for which context is being retrieved).
-
template_id:
typing.Optional[str]— Optional template ID to use for custom context rendering.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.get(...)
-
-
-
Returns messages for a thread.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.get( thread_id="threadId", limit=1, cursor=1, lastn=1, )
-
-
-
thread_id:
str— Thread ID
-
limit:
typing.Optional[int]— Limit the number of results returned
-
cursor:
typing.Optional[int]— Cursor for pagination
-
lastn:
typing.Optional[int]— Number of most recent messages to return (overrides limit and cursor)
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.add_messages(...)
-
-
-
Add messages to a thread.
-
-
-
from zep_cloud import Message, Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.add_messages( thread_id="threadId", messages=[ Message( content="content", role="norole", ) ], )
-
-
-
thread_id:
str— The ID of the thread to which messages should be added.
-
messages:
typing.Sequence[Message]— A list of message objects, where each message contains a role and content.
-
ignore_roles:
typing.Optional[typing.Sequence[RoleType]]Optional list of role types to ignore when adding messages to graph memory. The message itself will still be added, retained and used as context for messages that are added to a user's graph.
-
return_context:
typing.Optional[bool]— Optionally return context block relevant to the most recent messages.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.add_messages_batch(...)
-
-
-
Add messages to a thread in batch mode. This will process messages concurrently, which is useful for data migrations.
-
-
-
from zep_cloud import Message, Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.add_messages_batch( thread_id="threadId", messages=[ Message( content="content", role="norole", ) ], )
-
-
-
thread_id:
str— The ID of the thread to which messages should be added.
-
messages:
typing.Sequence[Message]— A list of message objects, where each message contains a role and content.
-
ignore_roles:
typing.Optional[typing.Sequence[RoleType]]Optional list of role types to ignore when adding messages to graph memory. The message itself will still be added, retained and used as context for messages that are added to a user's graph.
-
return_context:
typing.Optional[bool]— Optionally return context block relevant to the most recent messages.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.get_summary(...)
-
-
-
Returns the incremental summary generated from messages in the thread. Returns 404 if no summary exists for the thread.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.get_summary( thread_id="threadId", )
-
-
-
thread_id:
str— The thread ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.list_user_summary_instructions(...)
-
-
-
Lists all user summary instructions for a project, user.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.list_user_summary_instructions( user_id="user_id", )
-
-
-
user_id:
typing.Optional[str]— User ID to get user-specific instructions
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.add_user_summary_instructions(...)
-
-
-
Adds new summary instructions for users graphs without removing existing ones. If user_ids is empty, adds to project-wide default instructions.
-
-
-
from zep_cloud import UserInstruction, Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.add_user_summary_instructions( instructions=[ UserInstruction( name="name", text="text", ) ], )
-
-
-
instructions:
typing.Sequence[UserInstruction]— Instructions to add to the user summary generation.
-
user_ids:
typing.Optional[typing.Sequence[str]]— User IDs to add the instructions to. If empty, the instructions are added to the project-wide default.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.delete_user_summary_instructions(...)
-
-
-
Deletes user summary/instructions for users or project wide defaults.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.delete_user_summary_instructions()
-
-
-
instruction_names:
typing.Optional[typing.Sequence[str]]— Unique identifier for the instructions to be deleted. If empty deletes all instructions.
-
user_ids:
typing.Optional[typing.Sequence[str]]— Determines which users will have their custom instructions deleted. If no users are provided, the project-wide custom instructions will be effected.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.add(...)
-
-
-
Adds a user.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.add( user_id="user_id", )
-
-
-
user_id:
str— The unique identifier of the user.
-
disable_default_ontology:
typing.Optional[bool]— When true, disables the use of default/fallback ontology for the user's graph.
-
email:
typing.Optional[str]— The email address of the user.
-
first_name:
typing.Optional[str]— The first name of the user.
-
last_name:
typing.Optional[str]— The last name of the user.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The metadata associated with the user.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.list_ordered(...)
-
-
-
Returns all users.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.list_ordered( page_number=1, page_size=1, search="search", order_by="order_by", asc=True, )
-
-
-
page_number:
typing.Optional[int]— Page number for pagination, starting from 1
-
page_size:
typing.Optional[int]— Number of users to retrieve per page
-
search:
typing.Optional[str]— Search term for filtering users by user_id, name, or email
-
order_by:
typing.Optional[str]— Column to sort by (created_at, user_id, email)
-
asc:
typing.Optional[bool]— Sort in ascending order
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.get(...)
-
-
-
Returns a user.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.get( user_id="userId", )
-
-
-
user_id:
str— The user_id of the user to get.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.delete(...)
-
-
-
Deletes a user.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.delete( user_id="userId", )
-
-
-
user_id:
str— User ID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.update(...)
-
-
-
Updates a user.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.update( user_id="userId", )
-
-
-
user_id:
str— User ID
-
disable_default_ontology:
typing.Optional[bool]— When true, disables the use of default/fallback ontology for the user's graph.
-
email:
typing.Optional[str]— The email address of the user.
-
first_name:
typing.Optional[str]— The first name of the user.
-
last_name:
typing.Optional[str]— The last name of the user.
-
metadata:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— The metadata to update
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.get_node(...)
-
-
-
Returns a user's node.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.get_node( user_id="userId", )
-
-
-
user_id:
str— The user_id of the user to get the node for.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.get_threads(...)
-
-
-
Returns all threads for a user.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.get_threads( user_id="userId", )
-
-
-
user_id:
str— User ID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.user.warm(...)
-
-
-
Hints Zep to warm a user's graph for low-latency search
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.user.warm( user_id="userId", )
-
-
-
user_id:
str— User ID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.edge.get_by_graph_id(...)
-
-
-
Returns all edges for a graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.edge.get_by_graph_id( graph_id="graph_id", )
-
-
-
graph_id:
str— Graph ID
-
limit:
typing.Optional[int]— Maximum number of items to return
-
uuid_cursor:
typing.Optional[str]— UUID based cursor, used for pagination. Should be the UUID of the last item in the previous page
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.edge.get_by_user_id(...)
-
-
-
Returns all edges for a user.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.edge.get_by_user_id( user_id="user_id", )
-
-
-
user_id:
str— User ID
-
limit:
typing.Optional[int]— Maximum number of items to return
-
uuid_cursor:
typing.Optional[str]— UUID based cursor, used for pagination. Should be the UUID of the last item in the previous page
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.edge.get(...)
-
-
-
Returns a specific edge by its UUID.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.edge.get( uuid_="uuid", )
-
-
-
uuid_:
str— Edge UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.edge.delete(...)
-
-
-
Deletes an edge by UUID.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.edge.delete( uuid_="uuid", )
-
-
-
uuid_:
str— Edge UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.edge.update(...)
-
-
-
Updates an entity edge by UUID.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.edge.update( uuid_="uuid", )
-
-
-
uuid_:
str— Edge UUID
-
attributes:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— Updated attributes. Merged with existing attributes. Set a key to null to delete it.
-
expired_at:
typing.Optional[str]— Updated time at which the edge expires
-
fact:
typing.Optional[str]— Updated fact for the edge
-
invalid_at:
typing.Optional[str]— Updated time at which the fact stopped being true
-
name:
typing.Optional[str]— Updated name (relationship type) for the edge
-
valid_at:
typing.Optional[str]— Updated time at which the fact becomes true
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.episode.get_by_graph_id(...)
-
-
-
Returns episodes by graph id.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.episode.get_by_graph_id( graph_id="graph_id", lastn=1, )
-
-
-
graph_id:
str— Graph ID
-
lastn:
typing.Optional[int]— The number of most recent episodes to retrieve.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.episode.get_by_user_id(...)
-
-
-
Returns episodes by user id.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.episode.get_by_user_id( user_id="user_id", lastn=1, )
-
-
-
user_id:
str— User ID
-
lastn:
typing.Optional[int]— The number of most recent episodes entries to retrieve.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.episode.get(...)
-
-
-
Returns episodes by UUID
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.episode.get( uuid_="uuid", )
-
-
-
uuid_:
str— Episode UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.episode.delete(...)
-
-
-
Deletes an episode by its UUID.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.episode.delete( uuid_="uuid", )
-
-
-
uuid_:
str— Episode UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.episode.update(...)
-
-
-
Update episode metadata with merge semantics. Supplied keys overwrite or add to existing metadata; keys set to null are removed.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.episode.update( uuid_="uuid", metadata={"key": "value"}, )
-
-
-
uuid_:
str— Episode UUID
-
metadata:
typing.Dict[str, typing.Optional[typing.Any]]— Updated metadata. Merged with existing metadata: supplied keys overwrite/add, keys set to null are removed. Maximum 10 keys. Values must be scalars (string, number, boolean, null) or arrays of scalars.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.episode.get_nodes_and_edges(...)
-
-
-
Returns nodes and edges mentioned in an episode
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.episode.get_nodes_and_edges( uuid_="uuid", )
-
-
-
uuid_:
str— Episode uuid
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.node.get_by_graph_id(...)
-
-
-
Returns all nodes for a graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.node.get_by_graph_id( graph_id="graph_id", )
-
-
-
graph_id:
str— Graph ID
-
limit:
typing.Optional[int]— Maximum number of items to return
-
uuid_cursor:
typing.Optional[str]— UUID based cursor, used for pagination. Should be the UUID of the last item in the previous page
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.node.get_by_user_id(...)
-
-
-
Returns all nodes for a user
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.node.get_by_user_id( user_id="user_id", )
-
-
-
user_id:
str— User ID
-
limit:
typing.Optional[int]— Maximum number of items to return
-
uuid_cursor:
typing.Optional[str]— UUID based cursor, used for pagination. Should be the UUID of the last item in the previous page
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.node.get_edges(...)
-
-
-
Returns all edges for a node
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.node.get_edges( node_uuid="node_uuid", )
-
-
-
node_uuid:
str— Node UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.node.get_episodes(...)
-
-
-
Returns all episodes that mentioned a given node
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.node.get_episodes( node_uuid="node_uuid", )
-
-
-
node_uuid:
str— Node UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.node.get(...)
-
-
-
Returns a specific node by its UUID.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.node.get( uuid_="uuid", )
-
-
-
uuid_:
str— Node UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.node.delete(...)
-
-
-
Deletes a node by UUID.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.node.delete( uuid_="uuid", )
-
-
-
uuid_:
str— Node UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.node.update(...)
-
-
-
Updates an entity node by UUID.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.node.update( uuid_="uuid", )
-
-
-
uuid_:
str— Node UUID
-
attributes:
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]— Updated attributes. Merged with existing attributes. Set a key to null to delete it.
-
labels:
typing.Optional[typing.Sequence[str]]— Updated labels for the node
-
name:
typing.Optional[str]— Updated name for the node
-
summary:
typing.Optional[str]— Updated summary for the node
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.observation.get_by_graph_id(...)
-
-
-
Returns read-only observation nodes for a graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.observation.get_by_graph_id( graph_id="graph_id", )
-
-
-
graph_id:
str— Graph ID
-
limit:
typing.Optional[int]— Maximum number of items to return
-
uuid_cursor:
typing.Optional[str]— UUID based cursor, used for pagination. Should be the UUID of the last item in the previous page
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.observation.get_by_user_id(...)
-
-
-
Returns read-only observation nodes for a user's graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.observation.get_by_user_id( user_id="user_id", )
-
-
-
user_id:
str— User ID
-
limit:
typing.Optional[int]— Maximum number of items to return
-
uuid_cursor:
typing.Optional[str]— UUID based cursor, used for pagination. Should be the UUID of the last item in the previous page
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.observation.get(...)
-
-
-
Returns a specific observation node by UUID. Observation nodes are read-only.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.observation.get( uuid_="uuid", )
-
-
-
uuid_:
str— Observation UUID
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.thread_summary.get_by_graph_id(...)
-
-
-
Returns incremental thread summaries associated with the graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.thread_summary.get_by_graph_id( graph_id="graph_id", )
-
-
-
graph_id:
str— Graph ID
-
limit:
typing.Optional[int]— Maximum number of items to return
-
uuid_cursor:
typing.Optional[str]— UUID based cursor, used for pagination. Should be the UUID of the last item in the previous page
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.graph.thread_summary.get_by_user_id(...)
-
-
-
Returns incremental thread summaries generated from messages in each thread associated with the user's graph.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.graph.thread_summary.get_by_user_id( user_id="user_id", )
-
-
-
user_id:
str— User ID
-
limit:
typing.Optional[int]— Maximum number of items to return
-
uuid_cursor:
typing.Optional[str]— UUID based cursor, used for pagination. Should be the UUID of the last item in the previous page
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.thread.message.update(...)
-
-
-
Updates a message.
-
-
-
from zep_cloud import Zep client = Zep( api_key="YOUR_API_KEY", ) client.thread.message.update( message_uuid="messageUUID", metadata={"key": "value"}, )
-
-
-
message_uuid:
str— The UUID of the message.
-
metadata:
typing.Dict[str, typing.Optional[typing.Any]]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-