Skip to content

Latest commit

 

History

History
4949 lines (3414 loc) · 53.7 KB

reference.md

File metadata and controls

4949 lines (3414 loc) · 53.7 KB

Reference

Document

client.document.list_collections()

📝 Description

Returns a list of all DocumentCollections.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.list_collections()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.get_collection(...)

📝 Description

Returns a DocumentCollection if it exists.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.get_collection(
    collection_name="collectionName",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.add_collection(...)

📝 Description

If a collection with the same name already exists, an error will be returned.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.add_collection(
    collection_name="collectionName",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

description: typing.Optional[str]

metadata: typing.Optional[typing.Dict[str, typing.Any]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.delete_collection(...)

📝 Description

If a collection with the same name already exists, it will be overwritten.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.delete_collection(
    collection_name="collectionName",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.update_collection(...)

📝 Description

Updates a DocumentCollection

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.update_collection(
    collection_name="collectionName",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

description: typing.Optional[str]

metadata: typing.Optional[typing.Dict[str, typing.Any]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.add_documents(...)

📝 Description

Creates Documents in a specified DocumentCollection and returns their UUIDs.

🔌 Usage

from zep_cloud import CreateDocumentRequest
from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.add_documents(
    collection_name="collectionName",
    request=[
        CreateDocumentRequest(
            content="content",
        )
    ],
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

request: typing.Sequence[CreateDocumentRequest]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.batch_delete_documents(...)

📝 Description

Deletes specified Documents from a DocumentCollection.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.batch_delete_documents(
    collection_name="collectionName",
    request=["string"],
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

request: typing.Sequence[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.batch_get_documents(...)

📝 Description

Returns Documents from a DocumentCollection specified by UUID or ID.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.batch_get_documents(
    collection_name="collectionName",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

document_ids: typing.Optional[typing.Sequence[str]]

uuids: typing.Optional[typing.Sequence[str]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.batch_update_documents(...)

📝 Description

Updates Documents in a specified DocumentCollection.

🔌 Usage

from zep_cloud import UpdateDocumentListRequest
from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.batch_update_documents(
    collection_name="collectionName",
    request=[
        UpdateDocumentListRequest(
            uuid_="uuid",
        )
    ],
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

request: typing.Sequence[UpdateDocumentListRequest]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.gets_a_document_from_a_document_collection_by_uuid_cloud_only(...)

📝 Description

Returns specified Document from a DocumentCollection.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.gets_a_document_from_a_document_collection_by_uuid_cloud_only(
    collection_name="collectionName",
    document_uuid="documentUUID",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

document_uuid: str — UUID of the Document to be updated

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.delete_document(...)

📝 Description

Delete specified Document from a DocumentCollection.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.delete_document(
    collection_name="collectionName",
    document_uuid="documentUUID",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

document_uuid: str — UUID of the Document to be deleted

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.updates_a_document_cloud_only(...)

📝 Description

Updates a Document in a DocumentCollection by UUID

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.updates_a_document_cloud_only(
    collection_name="collectionName",
    document_uuid="documentUUID",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

document_uuid: str — UUID of the Document to be updated

document_id: typing.Optional[str]

metadata: typing.Optional[typing.Dict[str, typing.Any]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.document.search(...)

📝 Description

Searches over documents in a collection based on provided search criteria. One of text or metadata must be provided. Returns an empty list if no documents are found.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.document.search(
    collection_name="collectionName",
)

⚙️ Parameters

collection_name: str — Name of the Document Collection

limit: typing.Optional[int] — Limit the number of returned documents

metadata: typing.Optional[typing.Dict[str, typing.Any]] — Document metadata to filter on.

min_score: typing.Optional[float]

mmr_lambda: typing.Optional[float] — The lambda parameter for the MMR Reranking Algorithm.

search_type: typing.Optional[SearchType] — The type of search to perform. Defaults to "similarity". Must be one of "similarity" or "mmr".

text: typing.Optional[str] — The search text.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Memory

client.memory.get_fact(...)

📝 Description

get fact by uuid

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.get_fact(
    fact_uuid="factUUID",
)

⚙️ Parameters

fact_uuid: str — Fact UUID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.delete_fact(...)

📝 Description

delete a fact

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.delete_fact(
    fact_uuid="factUUID",
)

⚙️ Parameters

fact_uuid: str — Fact UUID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.add_session(...)

📝 Description

Create New Session

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.add_session(
    session_id="session_id",
    user_id="user_id",
)

⚙️ Parameters

session_id: str — The unique identifier of the session.

user_id: str — The unique identifier of the user associated with the session

fact_rating_instruction: typing.Optional[FactRatingInstruction] — Optional instruction to use for fact rating.

metadata: typing.Optional[typing.Dict[str, typing.Any]] — The metadata associated with the session.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.list_sessions(...)

📝 Description

Get all sessions with optional page number, page size, order by field and order direction for pagination.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.list_sessions()

⚙️ Parameters

page_number: typing.Optional[int] — Page number for pagination, starting from 1

page_size: typing.Optional[int] — Number of sessions to retrieve per page

order_by: typing.Optional[str] — Field to order the results by: created_at, updated_at, user_id, session_id

asc: typing.Optional[bool] — Order direction: true for ascending, false for descending

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.end_sessions(...)

📝 Description

End multiple sessions by their IDs.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.end_sessions(
    session_ids=["session_ids"],
)

⚙️ Parameters

session_ids: typing.Sequence[str]

instruction: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.search_sessions(...)

📝 Description

Search sessions for the specified query.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.search_sessions(
    text="text",
)

⚙️ Parameters

text: str — The search text.

limit: typing.Optional[int] — The maximum number of search results to return. Defaults to None (no limit).

min_fact_rating: typing.Optional[float] — The minimum fact rating to filter on. Only supported on cloud. Will be ignored on Community Edition.

min_score: typing.Optional[float] — The minimum score for search results. Only supported on cloud. Will be ignored on Community Edition.

mmr_lambda: typing.Optional[float] — The lambda parameter for the MMR Reranking Algorithm. Only supported on cloud. Will be ignored on Community Edition.

record_filter: typing.Optional[typing.Dict[str, typing.Any]] — Record filter on the metadata. Only supported on cloud. Will be ignored on Community Edition.

search_scope: typing.Optional[SearchScope] — Search scope. Only supported on cloud. On Community Edition the search scope is always "facts".

search_type: typing.Optional[SearchType] — Search type. Only supported on cloud. Will be ignored on Community Edition.

session_ids: typing.Optional[typing.Sequence[str]] — the session ids to search

user_id: typing.Optional[str] — User ID used to determine which sessions to search. Required on Community Edition.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.get_session(...)

📝 Description

get session by id

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.get_session(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — Session ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.update_session(...)

📝 Description

Update Session Metadata

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.update_session(
    session_id="sessionId",
    metadata={"key": "value"},
)

⚙️ Parameters

session_id: str — Session ID

metadata: typing.Dict[str, typing.Any] — The metadata to update

fact_rating_instruction: typing.Optional[FactRatingInstruction]

Optional instruction to use for fact rating. Fact rating instructions can not be unset.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.classify_session(...)

📝 Description

classify a session by session id.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.classify_session(
    session_id="sessionId",
    classes=["classes"],
    name="name",
)

⚙️ Parameters

session_id: str — Session ID

classes: typing.Sequence[str] — The classes to use for classification.

name: str — The name of the classifier. Will be used to store the classification in session metadata if persist is True.

instruction: typing.Optional[str] — Custom instruction to use for classification.

last_n: typing.Optional[int] — The number of session messages to consider for classification. Defaults to 4.

persist: typing.Optional[bool] — Whether to persist the classification to session metadata. Defaults to True.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.end_session(...)

📝 Description

End a session by ID.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.end_session(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — Session ID

classify: typing.Optional[ClassifySessionRequest]

instruction: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.extract_data(...)

📝 Description

extract data from a session by session id

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.extract_data(
    session_id="sessionId",
    last_n=1,
    model_schema="model_schema",
)

⚙️ Parameters

session_id: str — Session ID

last_n: int — The number of messages in the chat history from which to extract data

model_schema: str — The schema describing the data to be extracted. See Zep's SDKs for more details.

current_date_time: typing.Optional[str] — Your current date and time in ISO 8601 format including timezone. This is used for determining relative dates.

validate: typing.Optional[bool]

Validate that the extracted data is present in the dialog and correct per the field description. Mitigates hallucination, but is slower and may result in false negatives.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.get_session_facts(...)

📝 Description

get facts for a session

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.get_session_facts(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — Session ID

min_rating: typing.Optional[float] — Minimum rating by which to filter facts (Zep Cloud only)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.add_session_facts(...)

📝 Description

Adds facts to a session

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.add_session_facts(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — Session ID

facts: typing.Optional[typing.Sequence[NewFact]]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.get(...)

📝 Description

Returns a memory (latest summary, list of messages and facts) for a given session

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.get(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — The ID of the session for which to retrieve memory.

lastn: typing.Optional[int] — The number of most recent memory entries to retrieve.

min_rating: typing.Optional[float] — The minimum rating by which to filter facts

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.add(...)

📝 Description

Add memory to the specified session.

🔌 Usage

from zep_cloud import Message
from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.add(
    session_id="sessionId",
    messages=[
        Message(
            content="content",
            role_type="norole",
        )
    ],
)

⚙️ Parameters

session_id: str — The ID of the session to which memory should be added.

messages: typing.Sequence[Message] — A list of message objects, where each message contains a role and content.

fact_instruction: typing.Optional[str] — Additional instruction for generating the facts. Zep Cloud Only, will be ignored on Community Edition.

return_context: typing.Optional[bool] — Optionally return memory context relevant to the most recent messages.

summary_instruction: typing.Optional[str] — Additional instruction for generating the summary. Zep Cloud Only, will be ignored on Community Edition.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.delete(...)

📝 Description

delete memory messages by session id

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.delete(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — The ID of the session for which memory should be deleted.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.get_session_messages(...)

📝 Description

Lists messages for a session, specified by limit and cursor.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.get_session_messages(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — Session ID

limit: typing.Optional[int] — Limit the number of results returned

cursor: typing.Optional[int] — Cursor for pagination

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.get_session_message(...)

📝 Description

Gets a specific message from a session

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.get_session_message(
    session_id="sessionId",
    message_uuid="messageUUID",
)

⚙️ Parameters

session_id: str — The ID of the session.

message_uuid: str — The UUID of the message.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.update_message_metadata(...)

📝 Description

Updates the metadata of a message.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.update_message_metadata(
    session_id="sessionId",
    message_uuid="messageUUID",
    metadata={"key": "value"},
)

⚙️ Parameters

session_id: str — The ID of the session.

message_uuid: str — The UUID of the message.

metadata: typing.Dict[str, typing.Any] — The metadata to update

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.search(...)

📝 Description

Search memory for the specified session. Deprecated, please use search_sessions method instead

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.search(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — The ID of the session for which memory should be searched.

limit: typing.Optional[int] — The maximum number of search results to return. Defaults to None (no limit).

metadata: typing.Optional[typing.Dict[str, typing.Any]] — Metadata Filter

min_fact_rating: typing.Optional[float]

min_score: typing.Optional[float]

mmr_lambda: typing.Optional[float]

search_scope: typing.Optional[SearchScope]

search_type: typing.Optional[SearchType]

text: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.get_summaries(...)

📝 Description

Get session summaries by ID

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.get_summaries(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — Session ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.memory.synthesize_question(...)

📝 Description

Synthesize a question from the last N messages in the chat history.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.memory.synthesize_question(
    session_id="sessionId",
)

⚙️ Parameters

session_id: str — The ID of the session.

last_n_messages: typing.Optional[int] — The number of messages to use for question synthesis.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Graph

client.graph.add(...)

📝 Description

Add data to the graph

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.add()

⚙️ Parameters

data: typing.Optional[str]

group_id: typing.Optional[str]

type: typing.Optional[GraphDataType]

user_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.graph.search(...)

📝 Description

Perform a graph search query.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.search(
    query="query",
)

⚙️ Parameters

query: str — The string to search for (required)

center_node_uuid: typing.Optional[str] — Node to rerank around for node distance reranking

group_id: typing.Optional[str] — one of user_id or group_id must be provided

limit: typing.Optional[int] — The maximum number of facts to retrieve. Defaults to 10. Limited to 50.

min_score: typing.Optional[float] — minimum similarity score for a result to be returned

mmr_lambda: typing.Optional[float] — weighting for maximal marginal relevance

reranker: typing.Optional[Reranker] — Defaults to RRF

scope: typing.Optional[GraphSearchScope] — Defaults to Edges. Communities will be added in the future.

user_id: typing.Optional[str] — one of user_id or group_id must be provided

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Group

client.group.add(...)

📝 Description

Create a new user group

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.group.add(
    group_id="group_id",
)

⚙️ Parameters

group_id: str

description: typing.Optional[str]

fact_rating_instruction: typing.Optional[FactRatingInstruction] — UserIDs []string json:"user_ids"

name: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.group.list_all_groups(...)

📝 Description

List all groups with pagination.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.group.list_all_groups()

⚙️ Parameters

page_number: typing.Optional[int] — Page number for pagination, starting from 1

page_size: typing.Optional[int] — Number of groups to retrieve per page

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.group.get_a_group(...)

📝 Description

Get a group.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.group.get_a_group(
    group_id="groupId",
)

⚙️ Parameters

group_id: str — The group_id of the group to get.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.group.delete(...)

📝 Description

Delete group

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.group.delete(
    group_id="groupId",
)

⚙️ Parameters

group_id: str — Group ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.group.get_facts(...)

📝 Description

Get group facts.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.group.get_facts(
    group_id="groupId",
)

⚙️ Parameters

group_id: str — The group_id of the group to get.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

User

client.user.add(...)

📝 Description

Add a user.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.user.add()

⚙️ Parameters

email: typing.Optional[str] — The email address of the user.

fact_rating_instruction: typing.Optional[FactRatingInstruction] — Optional instruction to use for fact rating.

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.Any]] — The metadata associated with the user.

user_id: typing.Optional[str] — The unique identifier of the user.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.user.list_ordered(...)

📝 Description

List all users with pagination.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.user.list_ordered()

⚙️ Parameters

page_number: typing.Optional[int] — Page number for pagination, starting from 1

page_size: typing.Optional[int] — Number of users to retrieve per page

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.user.get(...)

📝 Description

Get a user.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.user.get(
    user_id="userId",
)

⚙️ Parameters

user_id: str — The user_id of the user to get.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.user.delete(...)

📝 Description

delete user by id

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.user.delete(
    user_id="userId",
)

⚙️ Parameters

user_id: str — User ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.user.update(...)

📝 Description

Update a user.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.user.update(
    user_id="userId",
)

⚙️ Parameters

user_id: str — User ID

email: typing.Optional[str] — The email address of the user.

fact_rating_instruction: typing.Optional[FactRatingInstruction] — Optional instruction to use for fact rating.

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.Any]] — The metadata to update

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.user.get_facts(...)

📝 Description

Get user facts.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.user.get_facts(
    user_id="userId",
)

⚙️ Parameters

user_id: str — The user_id of the user to get.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.user.get_sessions(...)

📝 Description

list all sessions for a user by user id

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.user.get_sessions(
    user_id="userId",
)

⚙️ Parameters

user_id: str — User ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Graph Edge

client.graph.edge.get_by_group_id(...)

📝 Description

Get all edges for a group

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.edge.get_by_group_id(
    group_id="group_id",
)

⚙️ Parameters

group_id: str — Group ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.graph.edge.get_by_user_id(...)

📝 Description

Get all edges for a user

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.edge.get_by_user_id(
    user_id="user_id",
)

⚙️ Parameters

user_id: str — User ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.graph.edge.get(...)

📝 Description

Get a specific edge by its UUID

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.edge.get(
    uuid_="uuid",
)

⚙️ Parameters

uuid_: str — Edge UUID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.graph.edge.delete(...)

📝 Description

Delete an edge by UUID

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.edge.delete(
    uuid_="uuid",
)

⚙️ Parameters

uuid_: str — Edge UUID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Graph Episode

client.graph.episode.get_by_group_id(...)

📝 Description

Get episodes by Group ID

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.episode.get_by_group_id(
    group_id="group_id",
)

⚙️ Parameters

group_id: str — Group 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(...)

📝 Description

Get episodes by User ID

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.episode.get_by_user_id(
    user_id="user_id",
)

⚙️ Parameters

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(...)

📝 Description

Get episode by UUID

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.episode.get(
    uuid_="uuid",
)

⚙️ Parameters

uuid_: str — Episode UUID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Graph Node

client.graph.node.get_by_group_id(...)

📝 Description

Get all nodes for a group

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.node.get_by_group_id(
    group_id="group_id",
)

⚙️ Parameters

group_id: str — Group ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.graph.node.get_by_user_id(...)

📝 Description

Get all nodes for a user

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.node.get_by_user_id(
    user_id="user_id",
)

⚙️ Parameters

user_id: str — User ID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.graph.node.get(...)

📝 Description

Get a specific node by its UUID

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.node.get(
    uuid_="uuid",
)

⚙️ Parameters

uuid_: str — Node UUID

request_options: typing.Optional[RequestOptions] — Request-specific configuration.