Priceline’s innovations in agentic AI with Sourcegraph
Guest post by: Onkar Talekar, Principal Software Engineer, Priceline
At Priceline, Developer Productivity is a cornerstone of our engineering philosophy. We aim to provide engineers with the right tools to make them efficient and help them innovate. With the help of agentic frameworks and Sourcegraph’s APIs, we are able to demonstrate that AI agents operating within the proper context and with the right tools can act as a force multiplier for a developer.
Crawl: Navigating challenges.
Engineers often face challenges in understanding and navigating the complex systems that have evolved over time. While documentation, design diagrams, and code comments provide valuable resources, they can lack the contextual depth needed to grasp the reasoning behind certain design choices or trade-offs fully. When assigned to work on a bug, the same questions come up almost always:
- Has this issue happened before?
- Has anyone fixed something similar?
- Which service is likely at fault?
- Is someone familiar with this piece of code?
- Were there recent changes that caused this?
Although most evolved systems have mature application monitoring systems, health dashboards, and debugging tools, they only give the whole picture to people if you know where to begin.
Walk: Breaking convention, building possibility.
For the last couple of years, we have all seen the transformative potential of Generative AI when combined with the right tools and knowledge base. LLMs' reasoning capabilities and agentic behavior in the proper context can provide intelligent solutions. These agentic solutions can give engineers a headstart by eliminating repetitive tasks.
We saw the evolution of Agentic AI as an opportunity to automate the most repetitive tasks in triaging a bug. We aimed to ease the burden of knowing every moving part of the platform by building an AI Agent with access to the dispersed knowledge base (issue tickets history, deployment history, code commits).
Run: Everything is imaginary until it’s real.
In our efforts to develop AI agents for our engineers, we explored low-code tools that simplified prototyping agent workflows and enabled us to approach our challenges quickly from an agentic perspective. We started with a small-scale prototype designed to analyze input from issue-tracking systems and identify impacted areas of the platform based on available context. Encouraged by promising early results, we expanded our approach by incorporating historical data to provide deeper insights and a more contextual understanding of issues.
Next, we linked our codebase via Sourcegraph APIs (sourcegraph.com) with this agent to provide better context. Priceline utilized Sourcegraph’s code search and completion capabilities as APIs, seamlessly integrating them into our AI-agent workflow to enhance debugging and development processes. This was crucial for our Agentic journey, as we could use the power of LLMs and agentic tools to hook our codebase and pull requests to the agent.
Here’s how it works:
- Code Search API retrieves a change summary (using base and head git tags).
- The agent iterates over each commit and summarizes changes using the Completions API.
- The issue description and summarized changes are then sent to the Completions API with prompts to identify the most probable causes of the problem.
By combining the power of LLMs with our diverse knowledge base, we could better answer engineers' most frequently asked questions and offer targeted guidance for the bugs they were working on.
Fly: Era of endless possibilities.
Mastering moves for peak performance
As we continue this Agentic journey, the possibilities of AI-driven development are limitless. While we were able to build a working example quickly, these are the building blocks of how engineers interact with complex systems. We aim to develop an agentic ecosystem with rich and deeper integration into our SDLC cycle focused on code quality analysis, proactive diagnosis and monitoring, etc.
Per our estimates, the average time spent triaging an issue can take anywhere from 30 minutes to a few hours, depending on the issue's complexity. This agentic approach can save engineers significant time when many pre-triage activities are handed over to an AI agent. However, this journey is not just about the number of hours saved per engineer but also about fundamentally reimagining and optimizing our engineers' daily work experience. By embracing AI breakthroughs, we envision all the engineers using a suite of agentic tools integrated with our codebase and CI/CD pipelines, as pervasive as IDE in our development toolkit.
We aim to empower every engineer with AI-driven solutions that simplify complexity, reduce friction, amplify their innovation ability, and embrace AI's endless possibilities for engineering productivity.