Skip to content

docs: document nested AGENTS.md awareness in the CLI - #854

Merged
edenreich merged 1 commit into
mainfrom
docs/issue-853-20260928-2333
Sep 28, 2026
Merged

edenreich merged 1 commit into
mainfrom
docs/issue-853-20260928-2333

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

Documents how AGENTS.md reaches the model in the CLI, including the new nested-file awareness, verified against the CLI implementation (buildAgentsMDInfo / findNestedAgentsMD / nestedAgentsMDListing in internal/agent/utils.go).

New cli.md section "How AGENTS.md reaches the model" (under Generating AGENTS.md):

  • The project-root AGENTS.md is injected whole as the PROJECT INSTRUCTIONS (AGENTS.md) section, capped by agent.agents_md.max_lines (399) and max_chars (8000), which apply to that file only; enabled turns the section off. Includes the YAML snippet and the three env vars.
  • Subsection on nested files: pointed at rather than injected, discovery up to 4 levels deep, hidden and node_modules/vendor trees skipped, lexical walk for a byte-stable prompt.
  • The precedence rule: a nested AGENTS.md takes precedence over the root file for its directory.
  • The project-tree interaction: with agent.context.tree_enabled on only the rule is added; with it off the paths are listed, at most 20, with an overflow note.
  • Notes that nested files are not subject to the caps, and that discovery still runs when no root file exists.

Also adds a pointer bullet under Agent Configuration in the Key Configuration Areas list.

Validation

bun run lint:md, bun run format:check and bun run build all pass. The anchor #how-agents-md-reaches-the-model was confirmed against the built HTML.

Closes #853

@inference-gateway-releaser

inference-gateway-releaser Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🗑️ Preview environment destroyed.

@edenreich
edenreich merged commit e6c17a9 into main Sep 28, 2026
1 check passed
@edenreich
edenreich deleted the docs/issue-853-20260928-2333 branch September 28, 2026 23:37
inference-gateway-releaser Bot added a commit that referenced this pull request Sep 30, 2026
## [0.9.19](0.9.18...0.9.19) (2026-09-30)

### 📚 Documentation

* ag-ui resume snapshot and cancelled run outcome ([#861](#861)) ([53e4c80](53e4c80))
* **agents:** add code readability guidelines ([#832](#832)) ([9435459](9435459))
* **agents:** add code readability guidelines ([#834](#834)) ([6b06d8b](6b06d8b))
* artifacts route is not served by the daemon ([#867](#867)) ([513e866](513e866))
* browser-use routes through the daemon socket ([#865](#865)) ([79a9292](79a9292))
* bundled ffmpeg covers desktop timeline export ([#837](#837)) ([43ff30c](43ff30c))
* daemon.yaml binding and channel thread path ([#871](#871)) ([9f6efc5](9f6efc5))
* document autocomplete kind labels ([#847](#847)) ([94b0ceb](94b0ceb))
* document ctrl+r prompt history search in chat ([#869](#869)) ([08239c2](08239c2))
* document custom tools in the CLI ([#852](#852)) ([e32cf2e](e32cf2e))
* document infer daemon as the client hub ([#860](#860)) ([6fabb62](6fabb62))
* document nested AGENTS.md awareness in the CLI ([#854](#854)) ([e6c17a9](e6c17a9))
* document secret redaction in infer insights ([#831](#831)) ([7ae06bb](7ae06bb))
* headless --serve ag-ui worker over stdio ([#863](#863)) ([ac80158](ac80158))
* lead agent pages with bare-name infer agents add ([#835](#835)) ([113179d](113179d))
* opentask tab recording skill loop ([#840](#840)) ([48b6bde](48b6bde))
* single /agents view and markdown subagents ([#845](#845)) ([9557066](9557066))
* **skills:** document the built-in demo skill and infer-action record-demo ([#849](#849)) ([393b0c9](393b0c9))
* sync cli page with new upstream cli docs ([#855](#855)) ([88e0905](88e0905))

### 🔧 Miscellaneous

* **deps-dev:** bump the bun group with 2 updates ([#846](#846)) ([c278297](c278297))
* **deps:** bump claude-code 2.1.280 -> 2.1.283 ([#858](#858)) ([3a23dc8](3a23dc8))
* **deps:** bump infer CLI v0.208.0 -> v0.218.0 ([#859](#859)) ([fd05fc6](fd05fc6))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.9.19 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOCS] Document nested AGENTS.md awareness in the CLI

1 participant