Power your Next.js and other Node.js backends with a perfect memory.
userToken
from the incoming request. This token, acquired by your frontend via OAuth, authorizes access to the user’s memory.jean.getContext()
, passing the userToken
and the user’s message to the Jean Memory engine. The engine returns a block of relevant, engineered context.StreamingTextResponse
. This provides a responsive, real-time chat experience.userToken
is obtained by your frontend application through a secure OAuth 2.1 flow using our @jeanmemory/react
SDK. Your frontend makes an authenticated request to this API route, including the userToken
in the request body. See the Authentication guide for more details.
Test User Support: The Node.js SDK v2.0.7+ automatically creates test users for development:
JeanClient
also provides a tools
namespace for direct, deterministic access to the core memory functions.
tools.search_memory()
: 1-2 seconds - Fast semantic search, returns JSONgetContext()
(orchestration): 3-10 seconds - Full AI conversation with contexttools.deep_memory_query()
: 5-15 seconds - Comprehensive cross-memory analysistools.store_document()
: Immediate response + background processing (30-60 seconds total)