Skip to content

How agents write queries

A coding agent’s search query is written by the model, shaped by the tool description the vendor wrote, and constrained by the backend that receives it, and none of the three looks like a human typing “best python http client”. This page collects what we know about each of those influences and what the resulting queries look like.

Four inputs shape every agent queryInputsModelBackendDeveloper task"add retries to client"Repo contextversions, importsTool description"use the current year"Training memoryknown names, APIsQuery writerthe main modelBrave / Googlekeyword + operatorsExa / Parallelneural, natural language
Four inputs shape every agent queryInputsModelBackendDeveloper task"add retries to client"Repo contextversions, importsTool description"use the current year"Training memoryknown names, APIsQuery writerthe main modelBrave / Googlekeyword + operatorsExa / Parallelneural, natural language
The tool description is the vendor's lever, the repository is the developer's, and the backend's syntax decides which operators work at all.

Vendors know their models think it’s still the year of their training cutoff, so they put the current date into the search tool’s description. Claude Code’s WebSearch description includes the current month and tells the model it “MUST use this year when searching for recent information”, with an example about the latest React docs verified in code. OpenCode v1’s description says “The current year is {{year}}. You MUST use this year when searching for recent information”, with the example “AI news 2026”, not “AI news 2025”; v2 softens “MUST” to “Use” verified in code. The effect you can actually see is that agent queries carry a year far more often than human ones, which favours pages that state a year or a version in their title and first lines.

Section titled “Tool descriptions also tell the model when to search”

Codex’s newer web.run tool description tells the model to lean toward browsing “if you’re on the fence” and treats software libraries as fast-changing topics that need checking, while also capping quotes at 25 words per source verified in code. Claude Code’s descriptions push the model toward gh for GitHub URLs and toward an MCP fetch tool when one is installed. These instructions are why the same model searches more in one agent than in another, so the agent you test with matters as much as the model behind it.

Agents copy precise identifiers from the project into their queries, such as the version in package.json, the import path, or the error message from the last test run. A query like "S3Client" retryStrategy "@aws-sdk/client-s3" v3 2026 is typical. Pages that contain the exact identifiers developers paste, including full error strings, match these queries, while pages written around marketing names for features don’t.

In our lab, Codex searched for "codingagentseo.netlify.app" "codex-default", quoting both the hostname and a token from the URL it had been given measured in our lab. That pattern (a site-scoped, exact-match query) is common when the model already has a URL and is trying to find a cached copy. Agents also use site: operators when the backend supports them, which keyword engines like Brave and Google do, and which neural engines like Exa largely ignore.

Neural backends change what “matching” means

Section titled “Neural backends change what “matching” means”

Exa and Parallel, which back OpenCode, Kilo Code, Amp and many MCP setups, embed the query and return semantically similar pages, so agents send them long natural-language descriptions rather than keywords inferred. In our lab, OpenCode searched Exa for “coding agent SEO research site codingagentseo” and got ten results for similarly named products, none of them this new site measured in our lab. So for neural indexes, a page that describes its subject in plain explanatory sentences is the closest match, while a page optimised around a short head term may not be.

Agent queries do leave traces, at least in tools that report search impressions. Machine-generated queries tend to be ten or more words long, contain quotation marks or operators, and add words such as “official”, “latest” or the current year to a page title. In Google Search Console they typically show impressions with zero clicks, because the agent read the result snippet or fetched the page without a browser click. Filtering for those patterns gives you a rough view of how agents search for your topic. The honest caveat is that it’s only a view of Google, since Brave, Exa and OpenAI’s index provide no equivalent report.

In practice, I’d write titles and first lines that contain the exact package name, the current major version and the year when it matters, and I’d include the literal identifiers and error messages developers paste. Describe what each page is for in a plain sentence near the top, because that serves both keyword and neural backends. Then test it, since none of this is worth much until you’ve seen an agent find you: the test catalog includes a prompt ladder that measures at which level of vagueness each agent stops finding you.

Last reviewed 2026-12-02. This site is re-reviewed monthly; see maintenance.