Mental model
MemContext is the memory layer for your AI product. Your app sends durable context to MemContext, then retrieves relevant context before generation. Your application does not need to manage retrieval logic, duplicate memories, or memory updates manually.Integration pattern
A typical integration follows four steps:- Save durable user or project context via
POST /api/memories - Search before generation or decision-making via
GET /api/memories/search - Profile (optional) - fetch broad context in one call via
GET /api/memories/profile - Feedback - record retrieval quality via
POST /api/memories/:id/feedback
POST /api/memories may return 202 Accepted. This means extraction has started and can be tracked with the returned jobId.
For multi-user applications, always pass a stable end-user or tenant ID in scope. project remains a secondary grouping field inside that scope.
Example: Support bot
Good fit use cases
| Use case | Memory role |
|---|---|
| Coding assistants | Stable preferences, project decisions, architecture context |
| Content generation | Brand rules, evolving strategy, audience insights |
| Support bots | Customer history, past issues, plan details |
| CRM memory | Relationship context, interaction history |
| Onboarding | User progress, preferences learned during setup |
| Personalization | Style preferences, feature usage patterns |
Ownership boundary
Keep your application logic outside MemContext. MemContext owns:- Saving and retrieving memory
- Handling duplicates and updates
- Memory history
- Expiry and temporal filtering
- MCP tool access
- Business-specific prompts and logic
- UI and user experience
- Workflow orchestration
- Downstream actions and integrations
API integration example
status:
saved,updated,extended,duplicate→ final synchronous resultaccepted→ asynchronous extraction in progress
TypeScript SDK example
Install the SDK:Tips
- Search before saving - avoid duplicates by checking if the knowledge already exists
- Use scope for hard per-user or per-tenant isolation
- Use projects only to group memories inside that scope
- Category matters -
preferenceandfactgo into profilestaticcontext; everything goes intodynamic - Do not save noise - only persist information with long-term value
