{"id":1620,"date":"2025-01-13T14:44:28","date_gmt":"2025-01-13T14:44:28","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/01\/13\/meet-gordon-an-ai-agent-for-docker\/"},"modified":"2025-01-13T14:44:28","modified_gmt":"2025-01-13T14:44:28","slug":"meet-gordon-an-ai-agent-for-docker","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/01\/13\/meet-gordon-an-ai-agent-for-docker\/","title":{"rendered":"Meet Gordon: An AI Agent for Docker"},"content":{"rendered":"<p><em>This ongoing <\/em><a href=\"https:\/\/www.docker.com\/blog\/tag\/genai-docker-labs\/\" target=\"_blank\"><em>Docker Labs GenAI series<\/em><\/a><em> explores the exciting space of AI developer tools. At Docker, we believe there is a vast scope to explore, openly and without the hype. We will share our explorations and collaborate with the developer community in real time. Although developers have adopted autocomplete tooling like GitHub Copilot and use chat, there is significant potential for AI tools to assist with more specific tasks and interfaces throughout the entire software lifecycle. Therefore, our exploration will be broad. We will be releasing software as open source so you can play, explore, and hack with us, too.<\/em><\/p>\n<p>In previous articles, we focused on how AI-based tools can help developers streamline tasks and offered ideas for enabling agentic workflows, like reviewing branches and understanding code changes.<\/p>\n<p>In this article, we\u2019ll explore our experiments around the idea of creating a Docker AI Agent \u2014 something that could both help new users learn about our tools and products and help power users get things done faster.<\/p>\n<p>During our explorations around this Docker Agent and AI-based tools, we noticed that the main pain points we encountered were often the same:<\/p>\n<p>LLMs need good context to provide good answers (garbage in -&gt; garbage out).<\/p>\n<p>Using AI tools often requires context switching (moving to another app, to a different website, etc.).<\/p>\n<p>We\u2019d like agents to be able to suggest and perform actions on behalf of the users.<\/p>\n<p>Direct product integrations with AI are often more satisfying to use than chat interfaces.<\/p>\n<p>At first, we tried to see what\u2019s possible using off-the-shelf services like ChatGPT or Claude.\u00a0<\/p>\n<p>By using testing prompts such as \u201coptimize the following Dockerfile, following all best practices\u201d and providing the model with a sub-par but common Dockerfile, we could sometimes get decent answers. Often, though, the resulting Dockerfile had subtle bugs, hallucinations, or simply wasn\u2019t optimized or didn\u2019t use many of the best practices we would\u2019ve hoped for. Thus, this approach was not reliable enough.<\/p>\n<p>Data ended up being the main issue. Training data for LLM models is always outdated by some amount of time, and the number of bad Dockerfiles that you can find online vastly outnumbers the amount of up-to-date Dockerfiles using all best practices, etc.<\/p>\n<p>After doing proof-of-concept tests using a RAG approach, including some documents with lots of useful advice for creating good Dockerfiles, we realized that the AI Agent idea was definitely possible. However, setting up all the things required for a good RAG would\u2019ve taken too much bandwidth from our small team.<\/p>\n<p>Because of this, we opted to use <a href=\"http:\/\/kapa.ai\/\" target=\"_blank\">kapa.ai<\/a> for that specific part of our agent. Docker already uses them to provide the AI docs assistant on <a href=\"http:\/\/docs.docker.com\/\" target=\"_blank\">Docker docs<\/a>, so most of our high-quality documentation is already available for us to reference as part of our LLM usage through their service. Using kapa.ai allowed us to experiment more, getting high-quality results faster, and allowing us to try different ideas around the AI agent concept.<\/p>\n<h2 class=\"wp-block-heading\">Enter Gordon<\/h2>\n<p>Out of this experimentation came a new product that you can try: Gordon. With Gordon, we\u2019d like to tackle these pain points. By integrating Gordon into <a href=\"https:\/\/www.docker.com\/products\/docker-desktop\/\" target=\"_blank\">Docker Desktop<\/a> and the Docker CLI (Figure 1), we can:<\/p>\n<p>Access much more context that can be used by the LLMs to best understand the user\u2019s questions and provide better answers or even perform actions on the user\u2019s behalf.<\/p>\n<p>Be where the users are. If you launch a container via Docker Desktop and it fails, you can quickly debug with Gordon. If you\u2019re in the terminal hacking away, Docker AI will be there, too.<\/p>\n<p>Avoid being a purely chat-based agent by providing Gordon-based features directly as part of Docker Desktop UI elements. If Gordon detects certain scenarios, like a container that failed to start, a button will appear in the UI to directly get suggestions, or run actions, etc. (Figure 2).<\/p>\n<p><a href=\"https:\/\/www.docker.com\/wp-content\/uploads\/2025\/02\/F1-Gordon-icon.png\" target=\"_blank\"><\/a><strong>Figure 1:<\/strong> Gordon icon on Docker Desktop.<\/p>\n<p><a href=\"https:\/\/www.docker.com\/wp-content\/uploads\/2025\/02\/F2-Ask-Gordon.png\" target=\"_blank\"><\/a><strong>Figure 2: <\/strong>Ask Gordon (beta).<\/p>\n<h2 class=\"wp-block-heading\">What Gordon can do<\/h2>\n<p>We want to start with Gordon by optimizing for Docker-related tasks \u2014 not general-purpose questions \u2014 but we are not excluding expanding the scope to more development-related tasks as work on the agent continues.<\/p>\n<p>Work on Gordon is at an early stage and its capabilities are constantly evolving, but it\u2019s already really good at some things (Figure 3). Here are things to definitely try out:<\/p>\n<p>Ask general Docker-related questions. Gordon knows Docker well and has access to all of our documentation.<\/p>\n<p>Get help debugging container build or runtime errors.<\/p>\n<p>Remediate policy deviations from <a href=\"https:\/\/www.docker.com\/products\/docker-scout\/\" target=\"_blank\">Docker Scout<\/a>.<\/p>\n<p>Get help optimizing Docker-related files and configurations.<\/p>\n<p>Ask it how to run specific containers (e.g., \u201cHow can I run MongoDB?\u201d).<\/p>\n<p><a href=\"https:\/\/www.docker.com\/wp-content\/uploads\/2025\/02\/F3-Gordon-response.png\" target=\"_blank\"><\/a><strong>Figure 3:<\/strong> Using Gordon to understand a Dockerfile.<\/p>\n<h2 class=\"wp-block-heading\">How Gordon works<\/h2>\n<p>The Gordon backend lives on Docker servers, while the client is a CLI that lives on the user\u2019s machine and is bundled with Docker Desktop. Docker Desktop uses the CLI to access the local machine\u2019s files, asking the user for the directory each time it needs that context to answer a question. When using the CLI directly, it has access to the working directory it\u2019s executed in. For example, if you are in a directory with a Dockerfile and you run \u201cDocker AI, rate my Dockerfile\u201d, it will find the one that\u2019s present in that directory<\/p>\n<p>Currently, Gordon does not have write access to any files, so it will not edit any of your files. We\u2019re hard at work on future features that will allow the agent to do the work for you, instead of only suggesting solutions.\u00a0<\/p>\n<p>Figure 4 shows a rough overview of how we are thinking about things behind the scenes.<\/p>\n<p><a href=\"https:\/\/www.docker.com\/wp-content\/uploads\/2025\/02\/F4-Gordon-overview.png\" target=\"_blank\"><\/a><strong>Figure 4:<\/strong> Overview of Gordon.<\/p>\n<p>The first step of this pipeline, \u201cUnderstand the user\u2019s input and figure out which action to perform\u201d, is done using \u201ctool calling\u201d (also known as \u201cfunction calling\u201d) with the <a href=\"https:\/\/platform.openai.com\/docs\/overview\" target=\"_blank\">OpenAI API<\/a>.\u00a0<\/p>\n<p>Although this is a popular approach, we noticed that the documentation online isn\u2019t very good, and general best practices aren\u2019t well defined yet. This led us to experiment a lot with the feature and try to figure out what works for us and what doesn\u2019t.<\/p>\n<p>Things we noticed:<\/p>\n<p>Tool descriptions are important, and we should prefer more in-depth descriptions with examples.<\/p>\n<p>Testing around tool-detection code is also important. Adding new tools to a request could confuse the LLM and cause it to no longer trigger the expected tool.<\/p>\n<p>The LLM model used influences how the whole tool calling functionality should be implemented, as different models might prefer descriptions written in a certain way, behave better\/worse under certain scenarios (e.g. when using lots of tools), etc.<\/p>\n<h3 class=\"wp-block-heading\"><strong>Try Gordon for yourself<\/strong><\/h3>\n<p>Gordon is available as an opt-in Beta feature starting with Docker Desktop version 4.37. To participate in the closed beta, all you need to do is <a href=\"https:\/\/docker.qualtrics.com\/jfe\/form\/SV_dmVHFjQ4fZlrEOy\" target=\"_blank\">fill out the form<\/a> on the site.<\/p>\n<p>Initially, Gordon will be available for use both in Docker Desktop and the Docker CLI, but our idea is to surface parts of this tech in various other parts of our products as well.<\/p>\n<p><em>For more on what we\u2019re doing at Docker, subscribe to our<a href=\"https:\/\/www.docker.com\/newsletter-subscription\/\" target=\"_blank\"> newsletter<\/a>.<\/em><\/p>\n<h2 class=\"wp-block-heading\">Learn more<\/h2>\n<p>Subscribe to the <a href=\"https:\/\/www.docker.com\/newsletter-subscription\/\" target=\"_blank\">Docker Newsletter<\/a>.\u00a0<\/p>\n<p>Learn about <a href=\"https:\/\/www.docker.com\/blog\/accelerating-ai-development-with-the-docker-ai-catalog\/\" target=\"_blank\">accelerating AI development with the Docker AI Catalog<\/a>.<\/p>\n<p>Read the <a href=\"https:\/\/www.docker.com\/blog\/tag\/genai-docker-labs\/\" target=\"_blank\">Docker Labs GenAI series<\/a>.<\/p>\n<p>Get the latest release of <a href=\"https:\/\/www.docker.com\/products\/docker-desktop\/\" target=\"_blank\">Docker Desktop<\/a>.<\/p>\n<p>Have questions? The <a href=\"https:\/\/www.docker.com\/community\/\" target=\"_blank\">Docker community is here to help<\/a>.<\/p>\n<p>New to Docker? <a href=\"https:\/\/docs.docker.com\/desktop\/\" target=\"_blank\">Get started<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>This ongoing Docker Labs GenAI series explores the exciting space of AI developer tools. At Docker, we believe there is [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1620","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/1620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/comments?post=1620"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/1620\/revisions"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=1620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=1620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=1620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}