aws / aws/amazon-q-developer-cli

Feature Request: Add support for loading agents from absolute paths

Aperta
#3,304 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
2k
Fork
439
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Currently, Q CLI agents can only be loaded from two locations:
1. The global directory: `~/.aws/amazonq/cli-agents`
2. A local workspace directory: `.amazonq/cli-agents` (relative to where the Q CLI session is started)

To use agents from the local workspace directory, the Q CLI session must be started from the directory containing `.amazonq/cli-agents`. This limitation makes it cumbersome to work with agent configs stored in other locations.

**Current Limitation:**
Agent configs must exist in one of the two standard locations and cannot be referenced from arbitrary filesystem paths. To use an agent config from elsewhere, it must
first be copied to one of these locations, and for local workspace agents, the session must be started from the correct directory.

**Proposed Feature:**
Allow users to specify absolute paths when loading agents:
```
# Start chat with agent from absolute path
q chat --agent /path/to/my-project/agents/custom-agent.json

# Switch to agent using absolute path during session
/agent swap --path /path/to/another-agent.json
```

**Use Cases:**
1. **Development & Testing:** Iterate on agent configs directly in development directories without copying files back and forth
2. **Project-Specific Agents:** Store agent configs in project repositories alongside the code they're designed to work with, without requiring the session to start from a
specific directory
3. **Version Control:** Keep agent configs in Git repos for team collaboration and versioning
4. **Shared Configurations:** Use agent configs from shared network locations or team directories
5. **CI/CD Integration:** Reference agent configs from build/deployment directories
6. **Multi-Directory Workflows:** Access agents from different project directories without restarting sessions

**Benefits:**
• Eliminates manual file copying during agent development
• Enables version-controlled agent configurations as part of projects
• Improves workflow for teams sharing agent configs
• Provides flexibility for different organizational structures
• Removes the constraint of starting sessions from specific directories to access local agents

**Expected Behavior:**
The system would detect absolute paths (starting with / or ~) and load the agent config directly from that location, while maintaining existing behavior for agent names
and relative paths within the standard cli-agents directories.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Nell’issue non sono indicati file o test. Inizia tracciando l’entry point `q chat --agent` e il comando `/agent swap --path`, quindi verifica come vengono risolte le posizioni esistenti degli agenti globali e del workspace. Il lavoro è completato quando i percorsi assoluti, incluso `~`, vengono caricati direttamente, mentre il comportamento esistente per i nomi degli agenti e i percorsi relativi rimane invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
ai, cli
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.