Agent aliases let you save frequently used agents as short, memorable names instead of typing full paths every time.
# Save an alias
chat_loop --save-alias pete AWS_Strands/Product_Pete/agent.py
# Use the alias
chat_loop peteThat's it! Now you can run chat_loop pete from any directory instead of typing the full path.
chat_loop --save-alias <name> <path>Example:
chat_loop --save-alias pete AWS_Strands/Product_Pete/agent.py
chat_loop --save-alias clara ~/projects/agents/clara/agent.pyNotes:
- Alias names must contain only letters, numbers, hyphens, and underscores
- Paths are automatically resolved to absolute paths
- The agent file must exist when you save the alias
- Aliases are globally unique (one alias = one path)
chat_loop --list-aliasesShows all saved aliases with their paths:
Saved Agent Aliases (3):
------------------------------------------------------------
pete → /path/to/agent-examples/AWS_Strands/Product_Pete/agent.py
clara → /path/to/agent-examples/AWS_Strands/Complex_Coding_Clara/agent.py
quinten → /path/to/agent-examples/AWS_Strands/QuickResearch_Quinten/agent.py
------------------------------------------------------------
Usage: chat_loop <alias>
If an alias points to a missing file, it's marked with (missing) in red.
chat_loop --remove-alias <name>Example:
chat_loop --remove-alias peteTo change where an alias points:
chat_loop --save-alias pete NEW/PATH/agent.py --overwriteWithout --overwrite, you'll get an error if the alias already exists.
Once saved, use an alias just like a path:
# Instead of this:
chat_loop ~/Development/agent-examples/AWS_Strands/Product_Pete/agent.py
# Just type this:
chat_loop peteAliases work from any directory - no need to be in the agent directory!
cd ~/Documents
chat_loop pete # Works!
cd ~/Projects
chat_loop clara # Works!When you run chat_loop <something>, it checks in this order:
-
Is it a valid file path? (relative or absolute)
- If yes, use that path
- If no, continue...
-
Is it a saved alias?
- If yes, use the alias's path
- If no, show error
This means file paths always take precedence over aliases. If you have a file called pete in your current directory, it will use that file instead of the alias.
# First time: save aliases for your frequently used agents
chat_loop --save-alias pete AWS_Strands/Product_Pete/agent.py
chat_loop --save-alias clara AWS_Strands/Complex_Coding_Clara/agent.py
chat_loop --save-alias quinten AWS_Strands/QuickResearch_Quinten/agent.py
# Daily use: just use the aliases
chat_loop pete
chat_loop clara
chat_loop quinten
# Check what aliases you have
chat_loop --list-aliases
# Remove one you don't use anymore
chat_loop --remove-alias quinten# Save a project-specific agent
cd ~/projects/myapp
chat_loop --save-alias myapp agent/custom_agent.py
# Use it from anywhere
cd ~/Documents
chat_loop myapp # Works!# Temporary: use path directly (no alias saved)
chat_loop path/to/experimental/agent.py
# Permanent: save as alias once you like it
chat_loop --save-alias experiment path/to/experimental/agent.py
chat_loop experimentAliases are stored in a JSON file at:
~/.chat_aliases
macOS/Linux: /Users/username/.chat_aliases
Windows: C:\Users\username\.chat_aliases
The file looks like this:
{
"clara": "/path/to/agent-examples/AWS_Strands/Complex_Coding_Clara/agent.py",
"pete": "/path/to/agent-examples/AWS_Strands/Product_Pete/agent.py",
"quinten": "/path/to/agent-examples/AWS_Strands/QuickResearch_Quinten/agent.py"
}You can edit this file manually if needed, but use the CLI commands for safety.
✅ Good:
pete- Short and memorableclara- Matches agent nameproduct-mgr- Descriptive with hyphensresearch_v2- Version with underscore
❌ Bad:
p- Too short, hard to remembermy agent- No spaces allowedPete's Agent- No special charactersagent-123-final-v2-updated- Too long
# Work agents
chat_loop --save-alias work-product AWS_Strands/Product_Pete/agent.py
chat_loop --save-alias work-research AWS_Strands/QuickResearch_Quinten/agent.py
# Personal agents
chat_loop --save-alias personal-code custom/agents/personal_coder.py
chat_loop --save-alias personal-writer custom/agents/writer.py# Forgot if you saved an alias?
chat_loop --list-aliases | grep pete$ chat_loop pete
Error: Agent not found: pete
Not found as:
• File path: pete
• Alias name: pete
Available aliases:
• clara
• quintenSolution: The alias doesn't exist. Save it first:
chat_loop --save-alias pete AWS_Strands/Product_Pete/agent.pyIf you move an agent file after saving an alias, the alias will point to the old (now missing) location.
$ chat_loop --list-aliases
pete → /old/path/agent.py (missing)Solution: Update the alias with the new path:
chat_loop --save-alias pete /new/path/agent.py --overwrite$ chat_loop --save-alias pete another/agent.py
Error: Alias 'pete' already exists (points to: /existing/path/agent.py).
Use --overwrite to update.Solution: Either choose a different name or use --overwrite:
chat_loop --save-alias pete another/agent.py --overwrite- Use descriptive names that remind you what the agent does
- Keep it short - the point is to save typing!
- Be consistent - use the same naming pattern for all aliases
- List regularly - use
--list-aliasesto see what you have - Clean up - remove aliases you no longer use
- Backup - if you have many aliases, backup
~/.chat_aliases
Aliases work seamlessly with all other chat loop features:
# Use alias with custom config
chat_loop pete --config ~/.chatrc-work
# Use alias with template
chat_loop clara
You: /review my_code.py
# Use alias from any directory
cd ~/Documents
chat_loop quinten
You: research quantum computing papers- README.md - Main documentation
- CONFIG.md - Configuration guide
- INSTALL.md - Installation guide