Note: Theopenai
provider is set as default. Consider usingZentry_API_KEY
andOPENAI_API_KEY
as environment variables for security.
Note: TheZentryConfig
is optional. It is used to set the global config for the Zentry Client (eg.user_id
,agent_id
,app_id
,run_id
,org_id
,project_id
etc).
For standalone features, such asaddMemories
,retrieveMemories
, andgetMemories
, you must either setZentry_API_KEY
as an environment variable or pass it directly in the function call.
getMemories
will return raw memories in the form of an array of objects, whileretrieveMemories
will return a response in string format with a system prompt ingested with the retrieved memories.
getMemories
is an object with two keys:results
andrelations
ifenable_graph
is enabled. Otherwise, it will return an array of objects.
streamText
as well.
enable_graph
to true
in the ZentryConfig
object.
enable_graph
in the standalone functions. This includes getMemories
, retrieveMemories
, and addMemories
.
getMemories
function will return an object with two keys: results
and relations
, if enable_graph
is set to true
. Otherwise, it will return an array of objects.
createZentry()
: Initializes a new Zentry provider instance.retrieveMemories()
: Retrieves memory context for prompts.getMemories()
: Get memories from your profile in array format.addMemories()
: Adds user memories to enhance contextual responses.user_id
for consistent memory retrieval.
Note: We also have support foragent_id
,app_id
, andrun_id
. Refer Docs.