Context Engineering at LinkedIn: How We Built an Organizational Context Layer for AI Agents with MCP

LinkedIn has successfully deployed an internal organizational context layer designed to bridge the gap between advanced artificial intelligence coding agents and the complex realities of enterprise-scale software engineering. In a recent presentation detailing the engineering efforts behind this initiative, LinkedIn software engineer Ajay Prakash outlined how the company addressed the limitations of early AI assistants by developing "Contextual Agent Playbooks and Tools" powered by the Model Context Protocol (MCP). The architecture now scales across more than 8,000 daily active users, spanning software engineers, product managers, designers, and technical program managers, while automating roughly 600 distinct organizational workflows.
The Evolution of AI Coding Assistants and Enterprise Hurdles
The modern landscape of software development has undergone rapid transformation, shifting from early Large Language Model (LLM) autocomplete features to agentic systems capable of editing files and executing terminal commands. In early 2025, tech industry observers popularized terms like "vibe coding" to describe workflows where developers bypass manual line-by-line programming to prompt AI agents continuously, reviewing only the final console output. However, when LinkedIn initially rolled out raw coding agents across its internal engineering division, the promised productivity gains failed to materialize.
The primary barrier was not the capability of the underlying LLMs, but rather the sheer scale and maturity of LinkedIn’s technical ecosystem. The company maintains thousands of repositories, microservices, and applications interconnected through proprietary internal frameworks. Custom infrastructure governs critical layers of the stack, including specialized databases, tracking systems, observability tools, and configuration management platforms tailored to handle massive global traffic.
For human developers joining LinkedIn, bridging this knowledge gap requires a mandatory week-long bootcamp followed by several weeks of onboarding before achieving full productivity. When raw AI coding agents were introduced to this environment without organizational context, they struggled to interpret custom architecture, frequently hallucinating solutions, producing subpar code, and generating security vulnerabilities. Developers quickly found themselves spending more time babysitting and prompting the models than they would have spent writing code manually. Consequently, many engineers reverted to traditional development workflows to meet strict delivery deadlines.
Integrating the Model Context Protocol
The turning point for LinkedIn arrived with the open-sourcing of the Model Context Protocol (MCP) by Anthropic. MCP established an open standard for connecting AI agents to external tools and data sources, enabling engineering teams to securely extend agent capabilities beyond pre-trained open-source code datasets.
LinkedIn capitalized on this standard by building a local MCP server pre-installed and automatically updated hourly across all company laptops. The initial integration focused on leveraging LinkedIn’s sophisticated code search engine, which indexes code across more than 1,000 internal repositories. By wrapping the code search infrastructure in MCP, coding agents gained the ability to execute keyword searches, regular expression queries, and language-specific filters to retrieve real-world code snippets and complete file contents.
This mechanism allowed the LLMs to overcome the limitations of their initial training data, grounding their outputs in actual production patterns used across the company. Following the success of code search, LinkedIn expanded the toolset to encompass internal documentation wikis, feature flag repositories, task management systems, and data platforms. Despite these integrations, however, complex end-to-end tasks remained elusive due to recurring technical obstacles.
Overcoming Context Overload and Procedural Memory Gaps
As engineering teams tested the expanded MCP setup, they encountered three primary structural challenges: tribal knowledge distribution, context overload, and a lack of long-term procedural memory.
Tribal knowledge—such as precise compilation commands, dependency installation sequences, and nuanced debugging workflows—frequently resided solely within Slack threads or the memories of senior engineers. Meanwhile, context overload presented a mechanical bottleneck. As agents performed multiple tool calls to gather information, the raw output consumed valuable space within the LLM’s finite context window. When the window filled, compaction algorithms routinely summarized the history, leading to data loss and cyclical execution loops where agents forgot their objectives and restarted searches from scratch. Furthermore, the absence of durable memory meant that every invocation required agents to rediscover workflow steps from the ground up, generating excessive token costs and execution delays.
To resolve these inefficiencies, LinkedIn introduced the concept of "playbooks," serving as a form of procedural memory. Inspired by procedural recall in human cognition and similar to agent skills developed in the wider industry, playbooks encapsulate step-by-step instructions, names, and descriptions for specific enterprise tasks. Agents invoke these playbooks as standard tools via the MCP, retrieving structured guidance on demand.
Design Philosophy: Self-Containment and Composability
LinkedIn’s playbooks are governed by two strict architectural philosophies: self-containment and composability. Self-containment dictates that each playbook addresses a single, well-defined objective—such as configuring an Apache Airflow offline pipeline—ensuring that agents do not parse ambiguous instructions. Composability mirrors software engineering principles by breaking complex workflows into modular, reusable sub-playbooks.
This modular structure facilitates progressive disclosure of context. Rather than forcing an agent to ingest an exhaustive repository of enterprise knowledge in a single pass—which triggers context window compaction—the system allows agents to dynamically load smaller, targeted sub-playbooks only when necessary. The resulting architecture forms a navigable graph of organizational context, allowing agents to execute longer-running, multi-step tasks reliably.
To maintain accuracy over time, LinkedIn embedded automated feedback loops into the agent system prompts. When an agent encounters outdated instructions or unexpected system edge cases during playbook execution, it is encouraged to improvise using available tools, resolve the issue, and summarize its findings at the end of the session. Developers can then review and commit these updates back to the repository, establishing a self-improving knowledge flywheel.
Architecture, Scalability, and Security
The deployment architecture utilizes a hybrid approach featuring central playbooks applicable across multiple repositories and local playbooks housed within specific workspace directories. Authentication across internal systems is handled via a seamless OAuth integration that securely stores tokens within a protected system keychain, refreshing credentials automatically during subsequent tool executions.
As the catalogue of tools and playbooks expanded, engineering leadership confronted a scaling challenge inherent to the MCP architecture: performance degradation. LLM performance typically begins to degrade when exposed to more than 30 direct tools due to context clutter and frequent token compaction.
To scale past thousands of registered tools and playbooks without sacrificing performance, LinkedIn replaced direct tool exposure with an intermediary discovery pattern. The agent interfaces with three core meta-tools that execute keyword and tag-based searches across the enterprise catalog. Once the agent identifies the appropriate tool or playbook via its short description, it requests the specific schema and input arguments required for execution.
Security governance remains a critical priority. Every tool integrated into the enterprise MCP server must undergo a formal InfoSec audit before deployment. A central platform engineering team manages core infrastructure and protocol stability, while maintaining an open contribution model where individual teams build, publish, and maintain domain-specific tools subject to strict usage metrics and aggressive deprecation policies for inactive assets.
Measurable Productivity and Organizational Impact
With over 8,000 active users relying on the infrastructure daily, empirical data from LinkedIn indicates a measurable 20% increase in overall engineering productivity. Crucially, this velocity has been achieved without compromising system reliability standards.
An analysis of the 600 active playbooks reveals five primary operational domains where automated workflows deliver the highest return on investment:
- Debugging and Incident Investigation: Teams have successfully converted historical runbooks into automated playbooks. During production alerts, coding agents ingest metrics, logs, and deployment histories to trace root causes across downstream microservices, compile summary incident reports, and prepare pull requests to mitigate active outages within minutes rather than hours.
- Boilerplate Code Generation: Agents leverage internal framework instructions to rapidly scaffold repetitive infrastructure and database configurations, allowing engineers to dedicate more focus to product architecture and feature development.
- Code Cleanup and Large-Scale Migrations: Automated migration playbooks execute mandatory framework upgrades across distributed codebases, generating verified pull requests that reduce manual engineering tax.
- Pipeline and Infrastructure Management: Teams delegate long-running administrative tasks—such as monitoring offline data pipelines and AI training jobs—to agents instructed via structured playbooks.
- Environment and Repository Setup: New engineers utilize automated environment playbooks to configure local development stacks rapidly, bypassing static documentation and significantly shortening onboarding timelines.
Future Outlook and Industry Implications
Looking ahead, LinkedIn plans to deepen automation by introducing background agent loops capable of scanning pull request histories, agent execution telemetry, and system logs to autonomously draft new playbooks and update existing ones without manual intervention.
Industry analysts view LinkedIn’s implementation as a blueprint for enterprise AI adoption. The deployment demonstrates that providing raw AI models with general-purpose chat interfaces is insufficient for complex corporate environments. Instead, sustainable productivity requires deliberate context engineering—bridging the gap between frontier models and enterprise tribal knowledge through standardized protocols, procedural memory structures, and rigorous quality guardrails.







