Troubleshooting
Common issues and solutions for the AGNT5 CLI
Common issues and solutions when using the AGNT5 CLI.
Installation Issues
Command Not Found
Problem: agnt5: command not found after installation.
Solutions:
-
Check if npm global packages are in PATH:
npm config get prefix echo $PATH -
Reinstall the CLI:
npm uninstall -g agnt5 npm install -g agnt5 -
Use npx as alternative:
npx agnt5 --version -
Add npm global bin to PATH (if missing):
# Add to ~/.bashrc or ~/.zshrc export PATH=$PATH:$(npm config get prefix)/bin
Permission Denied
Problem: Permission errors during installation on macOS/Linux.
Solutions:
-
Use a Node version manager (recommended):
# Install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash nvm install 18 nvm use 18 npm install -g agnt5 -
Change npm’s default directory:
mkdir ~/.npm-global npm config set prefix '~/.npm-global' echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc source ~/.bashrc npm install -g agnt5 -
Use sudo (not recommended):
sudo npm install -g agnt5
Windows Installation Issues
Problem: Installation fails on Windows.
Solutions:
-
Run as Administrator:
- Right-click Command Prompt/PowerShell
- Select “Run as Administrator”
- Run installation command
-
Use Windows Subsystem for Linux (WSL):
wsl --install # Then install in WSL environment -
Use Chocolatey:
choco install nodejs npm install -g agnt5
Authentication Issues
Invalid API Key
Problem: “Invalid API key” or “Unauthorized” errors.
Solutions:
-
Verify your API key:
agnt5 config get api-key -
Reset and re-enter API key:
agnt5 config set api-key your-new-api-key -
Use interactive login:
agnt5 auth login -
Check environment variables:
echo $AGNT5_API_KEY
Token Expired
Problem: Authentication token has expired.
Solutions:
-
Re-authenticate:
agnt5 auth logout agnt5 auth login -
Generate new API key from AGNT5 dashboard
-
Update configuration:
agnt5 config set api-key your-new-key
Deployment Issues
Deployment Timeout
Problem: Deployments fail due to timeout.
Solutions:
-
Increase timeout:
agnt5 deploy --timeout 600000 # 10 minutes -
Configure in project config:
// agnt5.config.js module.exports = { deploy: { timeout: 600000 } }; -
Check deployment status:
agnt5 status --env production --verbose -
Use incremental deployment:
agnt5 deploy --incremental
Build Failures
Problem: Build process fails during deployment.
Solutions:
-
Check build logs:
agnt5 build --verbose -
Clean build cache:
agnt5 build --clean -
Test build locally:
agnt5 build --env production -
Check dependencies:
npm audit npm update
Network Issues
Connection Timeout
Problem: Commands fail with connection timeout.
Solutions:
-
Check network connectivity:
ping api.agnt5.com -
Increase timeout:
agnt5 config set timeout 60000 -
Configure proxy (if behind corporate firewall):
npm config set proxy http://proxy.company.com:8080 npm config set https-proxy http://proxy.company.com:8080 -
Use different base URL:
agnt5 config set base-url https://api-eu.agnt5.com
SSL Certificate Issues
Problem: SSL/TLS certificate errors.
Solutions:
-
Update Node.js to latest stable version
-
Use different registry (temporary):
npm config set registry https://registry.npmjs.org/ -
Disable SSL verification (not recommended for production):
npm config set strict-ssl false -
Update CA certificates:
# macOS brew update && brew upgrade ca-certificates # Ubuntu/Debian sudo apt-get update && sudo apt-get upgrade ca-certificates
Performance Issues
Slow Commands
Problem: CLI commands are running slowly.
Solutions:
-
Enable caching:
agnt5 config set cache.enabled true -
Increase concurrency:
agnt5 config set concurrency 20 -
Use local runtime for development:
agnt5 run workflow --local -
Profile command execution:
agnt5 --verbose --profile run workflow
Memory Issues
Problem: CLI process uses too much memory.
Solutions:
-
Increase Node.js memory limit:
export NODE_OPTIONS="--max-old-space-size=4096" agnt5 command -
Reduce concurrency:
agnt5 config set workflows.concurrency 5 -
Clear cache:
agnt5 cache clear
Configuration Issues
Configuration Not Loading
Problem: CLI ignores configuration files.
Solutions:
-
Verify config file location:
agnt5 config validate --verbose -
Check config file syntax:
node -c agnt5.config.js -
Use explicit config file:
agnt5 --config ./my-config.js command -
Reset configuration:
agnt5 config reset
Getting Help
Enable Debug Mode
For detailed troubleshooting information:
agnt5 --debug command
agnt5 --verbose commandCheck System Information
agnt5 doctor --verboseValidate Setup
agnt5 config validate
agnt5 auth whoami
agnt5 status --verboseContact Support
If you’re still experiencing issues:
-
Check the logs:
agnt5 logs --level error --tail 100 -
Create a minimal reproduction case
-
Include system information:
agnt5 --version node --version npm --version echo $AGNT5_API_KEY | cut -c1-8 # First 8 chars only -
Report the issue with full error messages and steps to reproduce