Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ session:
module: context-simple
source: git+https://github.com/microsoft/amplifier-module-context-simple@main

agents: all # Auto-discover agents from .amplifier/agents/, ~/.amplifier/agents/, and collections

providers:
- module: provider-anthropic
source: git+https://github.com/microsoft/amplifier-module-provider-anthropic@main
Expand Down
27 changes: 25 additions & 2 deletions amplifier_app_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,28 @@ async def _list_tools(self) -> str:

return "\n".join(lines)

def _get_agent_source(self, agent_name: str) -> str:
"""Determine the source location of an agent.

Args:
agent_name: Name of the agent to check

Returns:
Rich-formatted source label: (project), (user), or (bundle)
"""
# Check project agents directory
project_agent = Path.cwd() / ".amplifier" / "agents" / f"{agent_name}.md"
if project_agent.exists():
return "[dim](project)[/]"

# Check user agents directory
user_agent = Path.home() / ".amplifier" / "agents" / f"{agent_name}.md"
if user_agent.exists():
return "[dim](user)[/]"

# Otherwise it's from a bundle
return "[dim](bundle)[/]"

async def _list_agents(self) -> str:
"""List available agents from current configuration.

Expand All @@ -584,8 +606,9 @@ async def _list_agents(self) -> str:
console.print(f"\n[bold]Available Agents[/bold] ({len(agent_items)} loaded)\n")

for name, config in sorted(agent_items.items()):
# Agent name as header
console.print(f"[bold cyan]{name}[/bold cyan]")
# Agent name as header with source location
source_label = self._get_agent_source(name)
console.print(f"[bold cyan]{name}[/bold cyan] {source_label}")

# Full description
description = config.get("description", "No description")
Expand Down