500 Skills, Zero Fine-Tuning: LinkedIn's Playbook for AI Agents — Ajay Prakash, LinkedIn
AI Engineer · 20 min · 143 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:01[music]
- 00:12Hey everyone, good morning.
- 00:14Uh thanks for being here.
- 00:17Uh I see people are still coming.
- 00:20Uh but yeah, my name is uh AJ and uh I am a software engineer at uh LinkedIn.
- 00:28Today I'm going to be talking about how we are doing context engineering to improve the performance of coding agents at LinkedIn.
- 00:40Okay.
- 00:40Uh imagine you are a software engineer in a big tech company and your products are being used by millions of users on a daily basis and you are happen to be on a team which owns set of very critical services
- 00:57and you are on call right and you get an alert saying that there is an error spike in one of your services and uh by the time you're trying to figure out how to deal with this issue,
- 01:12you take the link to the alert, give it to a coding agent like Cloud Code or GitHub Copilot.
- 01:20While you're trying to figure out um how to deal with the issue, uh the coding agent is working in the background, it will fetch the instructions on how to debug such issues in your company
- 01:31and identifies that based on that instruction, it identifies that this alert is happening in uh specific service.
- 01:38Then it fetches instruction and context on how to debug that particular service and it will fetch the based on those instructions it will take actions like fetching logs metrics
- 01:51and then it uses those logs to identify the root cause of the issue right so it identifies based on the error logs where the issue is happening and it doesn't just find the root cause it also
- 02:04figures out the steps to mitigate the issue and once it finds all the det details.
- 02:09It summarizes and give it to you saying this is this is the error and this is the issue and this is the actions that you need to take to mitigate.
- 02:17And once you confirm, it also goes ahead and takes those actions on your behalf to mitigate the issue.
- 02:25And it doesn't just stop there.
- 02:27Uh it updates your incident management system with all the details, error metrics and dashboards etc. and also it checks out the code and creates a PR for you uh to fix the root cause of the issue.
- 02:40All of this happens in matter of few minutes which would have easily taken few hours if you were to do it manually.
- 02:48This is not fiction.
- 02:49So this is how teams at LinkedIn are using coding agents as effective co-workers with deep understanding of LinkedIn's internal systems and code to help the teams be really productive.
- 03:05And this is possible because of a system that we built called as contextual agent playbooks and tools at LinkedIn.
- 03:13And today I'm going to talk about why we built the system, how we built it and what are our learnings from the success.
- 03:23To understand why we built the this system, we have to go back to the early days of coding agents, right?
- 03:30So just like any other company even at LinkedIn we wanted to use the coding agents to be for our engineers and everyone to be really productive with the AI.
- 03:42So we started using started giving this coding agents to all of the engineers and the problem was the coding agents doesn't really or the w coding doesn't really work in a large enterprise
- 03:55at link um like LinkedIn.
- 03:59So the biggest problem is the coding agent or the LLMs are trained on open-source repos right.
- 04:06So they don't have the context of how we our uh mature code bases at LinkedIn or our internal frameworks or internal systems.
- 04:18So what used to happen was the engineers used to do wipe code or try the agentic coding but because it the agents lacked context they used to hallucinate and
- 04:29like get stuck in between or uh even more dangerous they used to make up things which is not correct.
- 04:37So the engineers had to prompt these agents manually um to do the right thing which used to take more time than the manual coding itself.
- 04:48So a lot of people a lot of engineers went back to manual coding.
- 04:52So coding agents was not effective to understand the problem uh to get more perspective.
- 05:00So if you look at the LinkedIn stack, we have over thousand repos which make up thousands of uh microservices and apps and we have a lot of all of these apps and services are built on lot of internal frameworks and libraries
- 05:18and we also have a lot of custombuilt infra.
- 05:22For example, we have our own databases.
- 05:24We have our own experimentation and tracking platform.
- 05:27We have our own configuration management system which is purely internal to LinkedIn and coding agents doesn't have any idea about them and engineers go through a week-long boot camp whenever a new engineer joins.
- 05:43So uh just to get familiar with these systems.
- 05:49So we looked at this problem and we asked ourselves the question how can we make any coding agent like cursor or cloud code or uh GitHub copilot understand our LinkedIn's internal system so well that they can ship the code that our engineers can trust.
- 06:12By trust I mean the code should be correct and also the quality of the code should be as good as uh it is written by an actual engineer.
- 06:22So that is the bar we set out and wanted to figure out how do we get there.
- 06:30So in early 2025 uh last year so uh Anthropic released MCB and it it quickly became the standard for industry standard for building tools to the agents.
- 06:43We leveraged that and pretty early on we built our own internal MCP and the first tool that we built was uh code search.
- 06:55So we have a pretty sophisticated code search system at LinkedIn where you um engineers can go and search for code.
- 07:02It will ingest all of uh search for any code across thousands of repos using keywords and custom filters and rejects etc. So we made that available to the coding agents via MCP.
- 07:15This was a really powerful unlock because now you don't have to manually figure out how to do better search the agent.
- 07:23You ask a question.
- 07:24Hey, how do I set up a particular thing?
- 07:27And the agent can use the code search tools to figure out the right examples of how we do things at LinkedIn and use that to give you answer and also
- 07:38uh implement it based on the its findings.
- 07:41This was really powerful.
- 07:44So we added more tools.
- 07:46We added docs, uh, Jiraa, Slack, um, even connected to all of our data platforms and even feature flags.
- 07:56So every core tool that we added to our internal MCP it created more value by comp it it's almost like a compounding effect because now a engineer can bring in the
- 08:10PRDS product requirement documents and design docs and also their Jira tasks which has mult uh different context and use all this to give to the coding agent to automate their
- 08:22um or help with their coding.
- 08:27But there was a problem.
- 08:29So you connect all these tools but it's not enough right?
- 08:33So even with a slightly complex workflow the agents used to not do really well.
- 08:42The problem for example if you give a context it is uh with the tools the agent was able to answer questions answer basic questions and find code examples but it cannot do a like a complete job reliably end to end.
- 08:58The main problem was to do a specific job end to end it needs to have a lot of tribal knowledge right.
- 09:07So all of for example how to fix a particular error or how to uh configure how do you debug a particular um error log right so all of this knowledge
- 09:19even though you have access to the tools it is scattered across lot of different surfaces for example docs wikis and slack conversations um etc and most of the times you may have experienced the docs and wikis might be outdated written and there might be like duplicate get docs, right?
- 09:39So, the problem is the agents even though they have access to the tools, they used to get lost.
- 09:45The second problem was context overload.
- 09:49As agents use more and more tools, their context gets overloaded which means every tool uh tool output it takes up space in the context which will eventually cause the agent to compact its
- 10:04um while it is working compacts it its context which causes it to lose some of the information.
- 10:11Then it has to do all over again.
- 10:14And the third problem was even though even if the agent was able to figure out all these uh details it can it doesn't have a way to retain this information it doesn't have a a durable memory.
- 10:28So every time a engineer asks the uh agent to do a certain task they have to start from scratch.
- 10:38So how do we solve this problem?
- 10:40So we give this instructions right away right?
- 10:43So we built a system, we invented a system in early 2025 called as uh playbooks where we not only provide the tools to the agents via MCP, we also allow the agents to access these instructions and prompts via MCP.
- 11:01We call it playbooks.
- 11:03And playbook it just appears just like any other regular tool.
- 11:10uh and they have uh names and description on what it does and the agent can decide to invoke that playbook just like any other regular tool and when the
- 11:21uh playbook is invoked the instructions and the context within that playbook are returned as the tool output to the coding agent.
- 11:31So that way the agents have both tools as well as instructions on how to use tools to set up a or uh uh perform a task.
- 11:41Right?
- 11:41For example, uh if the uh engineer goes and ask like how do I set up a airflow DAG uh at LinkedIn?
- 11:48The agent will first decide okay so I have a playbook for creating um that specific task and it will use that first fet uh uses that playbook to get the information
- 12:01and then it calls the necessary uh follows that instructions and calls the relevant tools to get the job done.
- 12:10This was really powerful um mainly because now anyone at LinkedIn can go ahead and create a set up a playbook and check it into a repository and make it available for everyone else at LinkedIn.
- 12:27So as people started creating more playbooks so we wanted so this is um one of two foundational principles we want everyone to follow when creating a playbook.
- 12:41The first one is a playbook should be self-contained which means it should do a very specific task only um for example um if it is for setting up a airflow
- 12:53DAG it should be about the instruction and the construct should be about uh one specific task.
- 12:59This helps the agents pick the right playbook for the right task.
- 13:04And the second uh most important one is to break a big playbook into multiple smaller playbooks.
- 13:12So this has um and reference those smaller playbooks from a bigger playbook.
- 13:18This is a really powerful um principle because just like um so it has two main advantages, right?
- 13:25So the first one is uh reusability.
- 13:28So if you have a small self-contained playbooks, it can be used from multiple uh reference from multiple playbooks and if you um the another big advantage is progressive discovery of um
- 13:41context which means the agent only when it needs to read a smaller playbook instead of reading the entire all of the playbooks at once it can uh progressively go and read the playbooks as it wants.
- 13:53So this is the same concept as skills as well.
- 13:57So playbooks are very similar to uh skills but we developed this entire system around playbooks even before skills was a thing.
- 14:06And uh playbooks are a little bit more nuanced because it helps us um it helps us seamlessly capture all of the organizational context and service via MCP without much of a setup.
- 14:23And another cool thing about this playbooks is this self-improving loop.
- 14:29So u you have uh engineers creating these playbooks and checking into the repository.
- 14:35And one of the main problem with any knowledge base is it gets outdated.
- 14:40How do you uh the biggest problem is how do you keep the context fresh right?
- 14:46So great thing about agents is they can improvise.
- 14:49So we have we encourage the agents to whenever they use a particular playbook at the end of the session to identify the learnings.
- 15:00So any outdated information or any discrepancy or any missing information and we also encourage the agents to figure out how to improve the playbook and use that context to
- 15:13check it uh to update the playbooks check out the uh repository and update the playbooks and create a PR and that once it gets upload it gets uh the playbooks gets updated
- 15:26right this creates a really seamless flywheel of a self-arning loop.
- 15:34So what does the architecture of a MCP server looks like?
- 15:39So this particular system we have one local MCP server and it is automatically installed on all of the LinkedIn laptops by default.
- 15:49So if you join LinkedIn and you get a laptop, it is pre-installed and any updates to the uh MCP server or the playbooks or the tools, it automatically gets updated every 1 hour on all the laptops.
- 16:04And we have a concept of two local playbooks and central playbooks which means so central playbooks are the playbooks which are crosscutting um in nature, right?
- 16:15So you have um these playbooks apply for multiple uh repositories not just one uh code repository and then you have local playbooks where it these are the playbooks which are very specific to your code repository
- 16:30and you can just have them checked in with your repo um uh with your repo and when only when the coding agents are working in your repo those playbooks will be automatically picked up.
- 16:43So this helps us scale the local playbooks which are very specific to repo without having to worry about um uh changing the uh central repository and also this is one MCP server which is serving all of the
- 16:59uh playbooks and tools.
- 17:00So this man helps us do a lot of uh central things like seamless authentication, telemetry and u that we can use for learning to make the whole uh ecosystem better.
- 17:16You may be wondering like how many tools and playbooks it can support, right?
- 17:20Uh so this is a common problem with MCP.
- 17:23we cannot scale it beyond 30 or 40 tools without degrading the uh context or degrading the performance of the system.
- 17:34So what we do is instead of uh surfacing all of these playbooks and tools through MCP we replace them with three meta tools.
- 17:44So the first one is search.
- 17:46The agent first uses this tool to search for the relevant tools and playbooks using keywords and tags.
- 17:55U so we also control the system instructions.
- 17:58Um so every coding agent is preconfigured with system instruction on how to use these tools and how to use the search really efficiently.
- 18:07And once it finds the uh right set of tool or playbook, it can then get the more details about that particular tool using get schema and then execute that tool or uh playbook.
- 18:19So this has allowed us to scale uh to thousands of tools in playbook.
- 18:27Um so this is u the growth chart.
- 18:30So now we have over 8,000 users daily um using the system daily.
- 18:36using uh tools and playbooks.
- 18:39So we have over,300 uh tools and over 600 uh playbooks and it's not not just engineering right.
- 18:48So it is uh not just engineers but also product managers, designers, uh TPMS.
- 18:54So across different functions they are using the tools and bringing their playbooks uh to automate their uh workflows.
- 19:05uh so I'll leave you with this takeaway uh key takeaways that can based on our learning the first one is the system was successful because we thought about quality and reliability
- 19:17uh from day one right so even uh before creating a MCP server uh we thought okay the our fundamental principle should be how do we ensure not just productivity
- 19:28but how do we ensure the quality and also reliability of the system so that it doesn't degrade um as we move fast.
- 19:37Uh and the second one was u the build the right infrastructure for agents.
- 19:42Uh in a large enterprise like LinkedIn, it's not enough just enough to give all of the engineers the all the latest and greatest tools and models.
- 19:51Uh these are they are not very effective if you don't build the right infrastructure for the agents to operate within your enterprise.
- 20:01Um yeah that's my time.
- 20:03Thank you for attending and feel free to connect with me on
- 20:06[applause]
- 20:06LinkedIn.