feat: add agents.md support for per-agent instruction extension#30
Merged
Conversation
Each agent directory can now contain an agents.md file whose contents are automatically appended to the instruction_template at config load time. Each file is strictly scoped to its own agent directory β no cross-agent inheritance or merging. Set load_agents_md: false in the YAML to opt out. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agents.mdfile that is automatically appended to itsinstruction_templateat config load timeagents.md, no cross-agent inheritance possibleload_agents_md: falsein the YAML lets agents opt out explicitlyagents.mdadded toskills_demo_agentwith behaviour rules, response style, and constraintsHow to use
Create
agents.mdalongsidemain_agent.yamlin any agent directory:To opt out:
No-clash guarantee
agents.mdlookup is resolved relative to each agent's YAML path β two agents in different directories can both haveagents.mdand they will never interfere with each otheragents.mdis treated as absent (no change to prompt)Stacked on
This PR is stacked on top of #28 (
feat/skills-add). Base branch isfeat/skills-add.Test plan
tests/unit/agent_framework/configs/test_agent_config.pyβ all passingagents.mdin any agent dir, start server, verify the content appears in the system prompt (visible via debug logs or Studio)load_agents_md: false, confirmagents.mdis ignoredπ€ Generated with Claude Code