Add long-term memory to your Python agents and backend services.
JeanMemoryClient
and a large language model client (in this case, OpenAI
).user_token
that your frontend would have acquired through the OAuth sign-in flow. This token is crucial as it identifies the user whose memory you want to access.jean.get_context()
, sending the user’s token and their latest message. This is the core of the integration, where Jean Memory performs its context engineering.user_token
is the critical piece that connects a request to a specific user’s memory. In a production application, your frontend should use our React SDK’s <SignInWithJean />
component (or a manual OAuth 2.1 PKCE flow) to authenticate the user and receive this token. Your frontend then passes this token to your backend, which uses it to make authenticated requests with the Python SDK.
Headless Authentication (Backend-Only)
For headless applications without a frontend, you have several options:
JeanMemoryClient
also provides a tools
namespace for direct, deterministic access to the core memory functions.