Skip to content

feat: add agents.md support for per-agent instruction extension#30

Merged
harshuljain13 merged 1 commit into
feat/skills-addfrom
feat/agents-md
May 25, 2026
Merged

feat: add agents.md support for per-agent instruction extension#30
harshuljain13 merged 1 commit into
feat/skills-addfrom
feat/agents-md

Conversation

@Abhishek-Khanna24

Copy link
Copy Markdown
Collaborator

Summary

  • Each agent directory can now contain an agents.md file that is automatically appended to its instruction_template at config load time
  • Strictly per-agent scoped β€” each agent reads only its own agents.md, no cross-agent inheritance possible
  • load_agents_md: false in the YAML lets agents opt out explicitly
  • Demo agents.md added to skills_demo_agent with behaviour rules, response style, and constraints

How to use

Create agents.md alongside main_agent.yaml in any agent directory:

src/all_agents/my_agent/
β”œβ”€β”€ main_agent.yaml
β”œβ”€β”€ main_agent.py
└── agents.md          ← auto-loaded and appended to instruction_template

To opt out:

# main_agent.yaml
load_agents_md: false

No-clash guarantee

  • agents.md lookup is resolved relative to each agent's YAML path β€” two agents in different directories can both have agents.md and they will never interfere with each other
  • An empty or whitespace-only agents.md is treated as absent (no change to prompt)

Stacked on

This PR is stacked on top of #28 (feat/skills-add). Base branch is feat/skills-add.

Test plan

  • 9 unit tests in tests/unit/agent_framework/configs/test_agent_config.py β€” all passing
  • Full unit suite: 230 passed, 13 skipped, 0 failures
  • Create agents.md in any agent dir, start server, verify the content appears in the system prompt (visible via debug logs or Studio)
  • Set load_agents_md: false, confirm agents.md is ignored

πŸ€– Generated with Claude Code

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>
@harshuljain13
harshuljain13 merged commit 149d7cb into feat/skills-add May 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants