Skip to content

Latest commit

 

History

History
5746 lines (3956 loc) · 62.2 KB

reference.md

File metadata and controls

5746 lines (3956 loc) · 62.2 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(...)

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

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

Graph

client.graph.list_entity_types()

📝 Description

Returns all entity types for a project.

🔌 Usage

from zep_cloud.client import Zep

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

⚙️ Parameters

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

client.graph.set_entity_types_internal(...)

📝 Description

Sets the entity types for a project, replacing any existing ones.

🔌 Usage

from zep_cloud.client import Zep

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

⚙️ Parameters

entity_types: typing.Optional[typing.Sequence[EntityType]]

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

client.graph.add(...)

📝 Description

Add data to the graph. Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.

🔌 Usage

from zep_cloud.client import Zep

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

⚙️ Parameters

data: str

type: GraphDataType

group_id: typing.Optional[str]

source_description: typing.Optional[str]

user_id: typing.Optional[str]

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

client.graph.add_batch(...)

📝 Description

Add data to the graph in batch mode (each episode processed concurrently). Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.

🔌 Usage

from zep_cloud import EpisodeData
from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.add_batch(
    episodes=[
        EpisodeData(
            data="data",
            type="text",
        )
    ],
)

⚙️ Parameters

episodes: typing.Sequence[EpisodeData]

group_id: typing.Optional[str]

user_id: typing.Optional[str]

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

client.graph.add_fact_triple(...)

📝 Description

Add a fact triple for a user or group

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.add_fact_triple(
    fact="fact",
    fact_name="fact_name",
    target_node_name="target_node_name",
)

⚙️ Parameters

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)

target_node_name: str — The name of the target node to add

created_at: typing.Optional[str] — The timestamp of the message

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

group_id: typing.Optional[str]

invalid_at: typing.Optional[str] — The time (if any) at which the fact stops being true

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_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.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_fact_rating: typing.Optional[float] — The minimum rating by which to filter relevant facts

min_score: typing.Optional[float] — Deprecated

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.

search_filters: typing.Optional[SearchFilters] — Search filters to apply to the search

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

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

Memory

client.memory.get_fact(...)

📝 Description

Deprecated API: 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

Deprecated API: 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

Creates a 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] — Deprecated

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

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

client.memory.list_sessions(...)

📝 Description

Returns all sessions.

🔌 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

Deprecated API: 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

Deprecated API: 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.

min_score: typing.Optional[float] — The minimum score for search results.

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

record_filter: typing.Optional[typing.Dict[str, typing.Any]] — Record filter on the metadata.

search_scope: typing.Optional[SearchScope] — Search scope.

search_type: typing.Optional[SearchType] — Search type.

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.

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

client.memory.get_session(...)

📝 Description

Returns a session.

🔌 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 — The unique identifier of the session.

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 — The unique identifier of the session.

metadata: typing.Dict[str, typing.Any] — Deprecated

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

Classifies a session.

🔌 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.

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] — Deprecated

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

client.memory.end_session(...)

📝 Description

Deprecated API: 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

Deprecated API: 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

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

client.memory.add_session_facts(...)

📝 Description

Deprecated API: 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 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 relevant 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] — Deprecated

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 memory context relevant to the most recent messages.

summary_instruction: typing.Optional[str] — Deprecated

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

client.memory.delete(...)

📝 Description

Deletes a session.

🔌 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

Returns messages for a session.

🔌 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

Returns 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 — Soon to be deprecated as this is not needed.

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] — Deprecated

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

client.memory.search(...)

🔌 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

Deprecated API: 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

Deprecated API: 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.

Group

client.group.add(...)

📝 Description

Creates a new 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]

name: typing.Optional[str]

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

client.group.get_all_groups(...)

📝 Description

Returns all groups.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.group.get_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_group(...)

📝 Description

Returns a group.

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.group.get_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

Deletes a 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.update(...)

📝 Description

Updates information about a group.

🔌 Usage

from zep_cloud.client import Zep

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

⚙️ Parameters

group_id: str — Group ID

description: typing.Optional[str]

fact_rating_instruction: typing.Optional[FactRatingInstruction]

name: typing.Optional[str]

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

client.group.get_facts(...)

📝 Description

Deprecated: Use Get Group Edges instead.

🔌 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

Adds 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

Returns all users.

🔌 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

Returns 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

Deletes a user.

🔌 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

Updates 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

Deprecated: Use Get User Edges instead.

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

📝 Description

Returns a user's node.

🔌 Usage

from zep_cloud.client import Zep

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

⚙️ Parameters

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

📝 Description

Returns all sessions for a user.

🔌 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

Returns 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

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

📝 Description

Returns 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

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

📝 Description

Returns 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

Deletes 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

Returns 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

Returns 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

Returns episodes 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.

client.graph.episode.delete(...)

📝 Description

Deletes an episode by its UUID.

🔌 Usage

from zep_cloud.client import Zep

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

⚙️ Parameters

uuid_: str — Episode UUID

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

client.graph.episode.get_nodes_and_edges(...)

📝 Description

Returns nodes and edges mentioned in an episode

🔌 Usage

from zep_cloud.client import Zep

client = Zep(
    api_key="YOUR_API_KEY",
)
client.graph.episode.get_nodes_and_edges(
    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

Returns 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

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

📝 Description

Returns 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

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

📝 Description

Returns 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.