How LinkedIn Built Its Cognitive Memory Agent
The Problem LinkedIn Solved
LinkedIn's AI features, including messaging suggestions, job recommendations, content summarization, and the AI assistant, all needed access to user context that spans multiple interactions over weeks and months. A user who told the AI assistant about their career goals in January should not need to repeat that context when asking about job recommendations in March. A recruiter who refined their search criteria across multiple sessions should see those refinements persist automatically.
The traditional approach, storing conversation history per feature, created silos. The messaging AI did not know what the job search AI had learned about the user's preferences. Each feature maintained its own context, leading to redundant questions and inconsistent experiences. LinkedIn's cognitive memory agent solved this by creating a shared memory layer that all AI features could read from and write to.
Architecture: Three Memory Types
LinkedIn's architecture separates memory into three types, each with different storage characteristics, retention policies, and retrieval patterns.
User Preferences
Long-lived facts about the user that change infrequently: career goals, skill areas, industry, communication preferences, and explicitly stated likes and dislikes. These memories are high confidence and persist until the user changes them. They are stored in a structured format (key-value pairs) rather than free text, which makes retrieval deterministic: when the AI needs the user's career goal, it reads a specific key rather than searching through memories.
Interaction History
Timestamped records of significant interactions: questions asked, features used, content engaged with, and feedback given. These memories are medium confidence and decay in relevance over time. They are stored as free text with entity tags and timestamps, supporting both semantic search ("what has this user asked about machine learning") and temporal queries ("what did this user do last week").
World Knowledge
Facts about entities in LinkedIn's ecosystem: companies, roles, skills, industries, and their relationships. This is shared across all users rather than per-user. It supports entity-based lookup (what does Company X do) and relationship traversal (which skills are related to machine learning). LinkedIn maintains this as a knowledge graph derived from its existing data infrastructure.
Multi-Stage Retrieval
LinkedIn's retrieval pipeline uses three stages to select the most relevant memories for each AI interaction.
Stage 1: Entity extraction. The system identifies entities in the user's current query or context: company names, skill terms, role titles, and topic areas. These entities are used to narrow the search space before any semantic matching occurs.
Stage 2: Semantic search with entity filtering. Vector similarity search runs over the user's memory store, filtered by the extracted entities. This retrieves memories that are both semantically relevant to the query and related to the right entities. Without the entity filter, a query about "Python" (the programming language) might retrieve memories about "Python" (the snake, if the user discussed it in a different context). Entity disambiguation before retrieval prevents these false matches.
Stage 3: Temporal reranking. Retrieved memories are reranked by recency, giving more weight to recent interactions. A user's current job title matters more than their job title from two years ago. Temporal reranking ensures that current information surfaces above historical information, even when both are semantically relevant.
This pipeline is conceptually similar to what Adaptive Recall provides through its cognitive scoring model. Base-level activation handles temporal reranking (recent and frequently accessed memories score higher). Spreading activation through the knowledge graph handles entity-based retrieval (entities connected to the query entities boost associated memories). The difference is that LinkedIn built this custom for their platform, while Adaptive Recall provides it as a general-purpose API.
The Memory Mesh
LinkedIn's most novel contribution is the "memory mesh," a system that connects individual user memories into a broader knowledge fabric without violating privacy. When many users store similar observations (for example, that a particular company is hiring or that a specific skill is in demand), the system aggregates these signals into world knowledge that benefits all users. No individual user's memories are shared, but the aggregate patterns enhance the world knowledge layer.
This approach lets the system learn trends and patterns from user behavior without exposing individual data. If 500 users ask about a particular technology in the same week, the system infers that the technology is trending and can proactively include it in relevant recommendations, even for users who have not explicitly asked about it.
Lessons for Building Agent Memory
Separate memory types matter. Not all memories are the same. User preferences, interaction history, and world knowledge have different storage formats, retention policies, and retrieval patterns. Treating them as a single flat store leads to poor retrieval quality because the system cannot distinguish between high-confidence persistent facts and low-confidence ephemeral observations.
Entity extraction before retrieval is critical. Semantic search alone returns too many false positives when the memory store is large. Extracting entities from the query and using them to filter the search space before running vector similarity dramatically improves precision.
Temporal awareness is not optional. In any system where information changes over time, retrieval must account for recency. A memory system that treats all memories as equally relevant regardless of age will consistently return outdated information for topics that have changed.
Privacy-safe aggregation enables collective intelligence. Individual user memories are private, but aggregate patterns are valuable. Designing the memory system to learn from patterns without exposing individual data creates a knowledge layer that benefits all users while respecting privacy.
Adaptive Recall embodies these same principles. It separates memories by metadata (tags, confidence, temporal scope) rather than requiring separate stores for each type. Entity extraction and knowledge graph construction happen automatically during storage. Cognitive scoring provides temporal awareness through base-level activation. And the per-user memory model with shared product features mirrors LinkedIn's individual-to-aggregate architecture.
Build agent memory with the same principles LinkedIn uses at scale. Adaptive Recall provides entity-aware retrieval, temporal scoring, and structured memory management through simple MCP tools.
Get Started Free