Using an AI Assistant to Read Tool Documentation
LLM agents can learn unfamiliar command-line tools by reading their documentation and reacting to Unix error signals. Each tool is packaged as a minimal Docker image exposed through two OpenAI-style tool definitions: one runs the command, the other reads its man page. Failures surface through exit codes and stderr, which the model uses to retry, and GPT-4, Llama 3.1 and Mistral responded to those errors differently. Across roughly 90 tools, only about 60% had man pages, so the fallback chain was man, --help, -h, then bad arguments to capture stderr. Long man pages were chunked by their standard sections for RAG, with priority given to argument descriptions and usage examples.
Related posts
- Getting Started with the Labs AI Tools for Devs Docker Desktop Extension
Docker mediumAdeptThe Labs AI Tools for Devs Docker Desktop extension runs LLM prompts against local projects. Prompts are referenced by git ref or URL, or loaded as local files. A prompt is a markdown file with system and user sections, and project context such as languages and files is injected through mustache templates. Tools the LLM can call are defined as Docker images that get bind-mounted into the project and receive a JSON payload as their first argument. Sample prompts cover Dockerfile generation, runbooks, ESLint and Pylint fixes.
- Run, Test, and Evaluate Models and MCP Locally with Docker + Promptfoo
Docker mediumAdeptPromptfoo, Docker Model Runner and Docker MCP Toolkit can be combined to evaluate LLM apps entirely on a dev machine. Three worked configs are shown. The first compares local Gemma3 against Claude Opus 4.1 using llm-rubric and similarity assertions, graded by local smollm3 and mxbai embeddings instead of OpenAI. The second tests MCP tools directly (GitHub, Fetch, Playwright, YouTube transcript) through the MCP gateway. The third red-teams a GitHub-summarizer agent with MCP, PII, BOLA and BFLA plugins plus jailbreak and prompt-injection strategies, which exposed a tool-discovery vulnerability that was fixed with a prompt guideline.
- Using AI Tools to Convert a PDF into Images
Docker mediumAdeptAn LLM agent can convert a PDF into JPEG images by planning an ImageMagick `convert` call that runs in a Docker container, so nothing needs to be installed locally. Tools are defined in Markdown prompt files, distributed through Docker Hub and pulled from nixpkgs. Rather than hand-designing interfaces for each tool, the agent loops through running the tool, capturing errors, reading the tool's own documentation and retrying. One packaging gap, a missing Ghostscript dependency, still had to be fixed by hand in the image build.
- ReadMeAI: An AI-powered README Generator for Developers
Docker mediumAdeptReadMeAI, an honorable mention from Docker's AI/ML Hackathon, generates a draft README from an uploaded code file and a short project description. It is a Node.js/Express app: the code and a prompt template go to Google's PaLM API, the Markdown that comes back is converted to HTML with showdown and rendered into an EJS editor view with live preview, and the result downloads as a zip of Markdown and HTML. The walkthrough covers the controller code, the project layout, and building and running the app with Docker.
- How AI Assistants Can Decode GitHub Repos for UI Writers
Docker mediumAdeptAn LLM agent can reliably flag user-facing copy changes in a branch when it is given narrow tools and expert hints about what "user-facing" means. GitHub Copilot's repo chat could not even count open PRs. A first prompt that gave the model bash and raw git diff also failed: diffs were huge, important files were buried and extra tools invited hallucination. The working two-step flow first lists only likely UI files (using --files-only and --no-pager with an alpine/git container) and saves the list. It then diffs just those files against main with --no-color --minimal, guided by frontend-engineer hints about JSX text nodes, notifications, toasts and Error constructors. This produced an accurate list of copy changes on a real Docker PR.