Skip to content

feat: Path based loading for agent#3268

Open
mekza wants to merge 1 commit into
aws:mainfrom
mekza:mekza/support_for_path_based_agents
Open

feat: Path based loading for agent#3268
mekza wants to merge 1 commit into
aws:mainfrom
mekza:mekza/support_for_path_based_agents

Conversation

@mekza

@mekza mekza commented Oct 25, 2025

Copy link
Copy Markdown
Contributor

New version of #2859 after fixing the tests:

This PR transforms how users organize and reference their Q CLI agents by introducing hierarchical directory support. Previously, all agents lived in a flat directory structure, forcing users to rely solely on unique names to avoid collisions. Now, agents can be organized in subdirectories and referenced using intuitive path notation.

cli-agents/
  team/
    backend-expert.json
    frontend-specialist.json
  personal/
    code-reviewer.json
  shared/
    documentation-helper.json

It enables users to reference agents as q chat --agent team/backend-expert in addition to q chat --agent backend-expert. Users can now organize agents hierarchically in the Q CLI directory structure, avoiding naming collisions and improving discoverability through logical grouping (e.g., team-specific, project-specific, or role-specific agent directories).

@adamalrefai

Copy link
Copy Markdown

Does this PR also add support for loading an agent with a path to the config file? So for example q chat --agent /path/to/agent.json

@mekza

mekza commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

@adamalrefai not full path only path relative to $HOME/.aws/amazonq/cli-agents

@adamalrefai

Copy link
Copy Markdown

@mekza Alright, got it :) This is really good and really needed, but was hoping that this will also add support for global path picking.. I think that should be brought up, the /agent swap should also support that in my opinion, like /agent swap --path /path/to/agent.json

Comment thread crates/chat-cli/src/cli/agent/mod.rs Outdated
Comment thread crates/chat-cli/src/cli/agent/mod.rs Outdated
People can now do `q chat --agent team/myagent` in addition to the current `q chat --agent myagent`. This will enable people to better organize their agents in Q CLI directory
@mekza mekza force-pushed the mekza/support_for_path_based_agents branch from 22c20ae to 308ebb6 Compare October 31, 2025 14:57
@crowecawcaw

Copy link
Copy Markdown

I'm interested in this feature. I saw that it was previously merged and reverted. Is this change still intended to be added?

@mekza

mekza commented Nov 19, 2025

Copy link
Copy Markdown
Contributor Author

@crowecawcaw I will resume work on that pretty soon.

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.

4 participants