MemorySyncMemorySync
Getting Started

How It Compares

This page compares the request modes and runtime behaviours of the MemorySync API. It does not compare MemorySync with external products.

Browser session auth vs service auth

QuestionBrowser or session flowService-auth flow
How you authenticateJWT tokens from /auth/login.API keys from /org/api-keys in X-API-Key.
Who the end user isThe authenticated JWT user.The caller must identify the end user with X-End-User-ID or end_user_id.
Project scopeX-Project-ID is still enforced on project-scoped routes.Same rule, but a project-locked key can satisfy it automatically.

JWT user context vs API-key end-user resolution

QuestionJWT route behaviourService-auth behaviour
Who owns the memory?The backend uses the authenticated user id.The backend resolves the end user from X-End-User-ID (or end_user_id in the body) and maps it to the corresponding user.
Is body user_id trusted?No.No.
Is X-End-User-ID used?Ignored.Required for service-auth memory callers.

Project-locked key vs explicit project header

CaseHow project enforcement passes
API key has project_idThe project-enforcement dependency can read the project from the active key.
API key is org-wideSend X-Project-ID explicitly on project-scoped routes.
Bearer-token requestSend X-Project-ID explicitly unless the route is exempt.

Query vs retrieve vs routed search vs compose

RouteWhen to use it
/memory/queryDefault semantic retrieval route.
/memory/retrieveCompatibility alias.
/memory/search/routedUse when you want routed behaviour and a richer result model.
/memory/composeUse when the next step is prompt construction.

Quota enforcement: Silent degradation

When your organization exceeds its plan quota, MemorySync uses silent degradation — no error is surfaced to your application:

OperationAt-quota behaviour
Add memoryReturns 200 OK with {"status":"ok"} — memory is stored but not embedded.
Query memoryReturns 200 OK with {"memories":[]} — no results returned.
Detection
Watch the usage dashboard for metrics approaching 100% of your plan limit. Webhook and email alerts can also be configured for at-quota and approaching-quota thresholds.