Menu
InfoQ Architecture·September 19, 2026

Context Engineering at LinkedIn for AI Agents

This article discusses LinkedIn's approach to 'Context Engineering' for AI agents, which aims to overcome limitations of large language models (LLMs) in complex, proprietary codebases. They built a system called Contextual Agent Playbooks and Tools, leveraging the Model Context Protocol (MCP) to provide AI agents with deep internal knowledge and operational guardrails. This system has significantly boosted developer productivity by automating complex engineering workflows, from debugging incidents to generating code changes.

Read original on InfoQ Architecture

The Challenge: AI Agents in Large, Proprietary Systems

Early AI coding assistants, primarily LLM-based autocomplete, evolved into powerful agent modes with the ability to edit files and run terminal commands. While promising for 'vibe coding,' these agents struggled in complex enterprise environments like LinkedIn due to a lack of internal context. LinkedIn's massive stack, comprising thousands of microservices, custom frameworks, and unique infrastructure (databases, tracking, observability), required extensive human onboarding for engineers. AI agents, without this nuanced 'tribal knowledge,' produced subpar or hallucinated results, failing to meet the company's high quality and reliability standards.

Introducing the Model Context Protocol (MCP)

The adoption of Anthropic's open-sourced Model Context Protocol (MCP) as an industry standard for connecting tools to agents was a significant enabler. MCP allowed LinkedIn to extend the capabilities of AI agents by integrating them with internal systems, providing access to proprietary context that LLMs inherently lack from their pre-trained open-source data. This integration was crucial for making agents effective within LinkedIn's unique codebase.

Initial Tooling: Code Search and Documentation Integration

The first and most impactful tool integrated via MCP was LinkedIn's sophisticated code search engine. This allowed agents to query code across thousands of repositories, retrieve relevant snippets, and read entire file contents. This capability enabled agents to understand LinkedIn's internal coding conventions and patterns. Subsequently, tools were added to allow agents to search and read internal documentation, wikis, product requirement documents, architecture documents, feature flags, task management systems, and data platforms, progressively enriching the context available to the agents.

Contextual Agent Playbooks and Tools

Despite access to richer context through tools, agents still struggled with complex, end-to-end tasks, especially those requiring procedural memory or knowledge of specific operational steps (e.g., installing dependencies, compiling code, testing). This 'tribal knowledge' was often unwritten, scattered across various sources, or embedded in senior engineers' minds.

ℹ️

Architecture Focus: Context Layer for AI Agents

The core of LinkedIn's solution is building an organizational context layer that provides AI agents with structured access to procedural memory, runbooks, code search, documentation, and operational guardrails. This moves beyond simply giving LLMs access to generic tools, focusing on deeply integrating them into the specific enterprise environment.

This led to the development of Contextual Agent Playbooks and Tools. This system aims to formalize and externalize the tribal knowledge and procedural memory required for agents to perform complex workflows reliably. By providing agents with structured playbooks that outline steps for common engineering tasks (e.g., debugging a specific service, deploying a hotfix), coupled with the extensive tooling built on MCP, LinkedIn achieved a 20% productivity boost with zero loss in reliability for engineers utilizing these agents.

AI agentsLLMscontext engineeringModel Context Protocoldeveloper productivityinternal toolssoftware architectureLinkedIn

Comments

Loading comments...