For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
PlaygroundDiscordStatusDashboardSign Up >
DocumentationSDK ReferenceGraphiti
DocumentationSDK ReferenceGraphiti
  • SDK Reference
      • PUTSet graph ontology
      • GETList graph ontology
      • POSTAdd Data
      • POSTAdd Data in batch mode
      • POSTAdd Fact Triple
      • POSTClone graph
      • POSTCreate Graph
      • GETList all graphs.
      • POSTDetect Patterns (Experimental)
      • POSTSearch Graph
      • GETGet Graph
      • DELDelete Graph
      • PATCHUpdate Graph.
        • GETGet Graph Episodes
        • GETGet User Episodes
        • GETGet Episode
        • PATCHUpdate Episode Metadata
        • DELDelete Episode
        • GETReturn any nodes and edges mentioned in an episode
LogoLogo
PlaygroundDiscordStatusDashboardSign Up >
SDK ReferenceGraphEpisode

Update Episode Metadata

PATCH
https://api.getzep.com/api/v2/graph/episodes/:uuid
PATCH
/api/v2/graph/episodes/:uuid
1from zep_cloud import Zep
2
3client = Zep(
4 api_key="YOUR_API_KEY",
5)
6client.graph.episode.update(
7 uuid_="uuid",
8 metadata={"key": "value"},
9)
1{
2 "content": "string",
3 "created_at": "string",
4 "uuid": "string",
5 "metadata": {},
6 "processed": true,
7 "relevance": 1.1,
8 "role": "string",
9 "role_type": "norole",
10 "score": 1.1,
11 "selection_rank": 1,
12 "source": "text",
13 "source_description": "string",
14 "task_id": "string",
15 "thread_id": "string"
16}

Update episode metadata with merge semantics. Supplied keys overwrite or add to existing metadata; keys set to null are removed.

Was this page helpful?
Previous

Delete Episode

Next
Built with

Path parameters

uuidstringRequired
Episode UUID

Request

Metadata update
metadatamap from strings to anyRequired

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.

Response

Updated episode
contentstring
created_atstring
uuidstring
metadatamap from strings to any
processedboolean
relevancedouble

Relevance is an experimental rank-aligned score in [0,1] derived from Score via logit transformation. Only populated when using cross_encoder reranker; omitted for other reranker types (e.g., RRF).

rolestring
Optional role, will only be present if the episode was created using memory.add API
role_typeenum

Optional role_type, will only be present if the episode was created using memory.add API

scoredouble

Score is the reranker output: sigmoid-distributed logits [0,1] when using cross_encoder reranker, or RRF ordinal rank when using rrf reranker

selection_rankinteger

SelectionRank is the global cross-scope rank assigned by auto scope selection.

sourceenum
Allowed values:
source_descriptionstring
task_idstring
Optional task ID to poll episode processing status. Currently only available for batch ingestion.
thread_idstring
Optional thread ID, will be present if the episode is part of a thread

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error