A powerful command-line interface for managing the WSO2 AI Agent Management Platform.
Note: This is a community-maintained CLI tool that provides terminal-based access to the WSO2 Agent Management Platform. It is aligned with Agent Manager v0.4.0.
- Features
- Installation
- Quick Start
- Command Overview
- Configuration
- Documentation
- Examples
- Development
- Contributing
- License
- Full Platform Coverage - Manage organizations, projects, agents, builds, deployments, and more
- Distributed Tracing - View and export traces with span tree visualization
- Real-time Monitoring - Access runtime logs and resource metrics
- Repository Integration - Query GitHub branches and commits
- Multiple Output Formats - Table and JSON output for scripting
- Interactive Mode - REPL-style interface for quick commands
- Shell Completion - Bash, Zsh, and Fish autocompletion support
- CI/CD Ready - Easily integrate into automation pipelines
git clone https://github.com/Kavirubc/wso2-amp-cli.git
cd wso2-amp-cli
go build -o amp ./cmd/ampgo install github.com/Kavirubc/wso2-amp-cli/cmd/amp@latestDownload from the Releases page.
# 1. Run the setup wizard
amp login
# 2. List your agents
amp agents list
# 3. View agent details
amp agents get my-agent
# 4. Deploy an agent
amp deploy --agent my-agent --image build-123| Category | Commands | Description |
|---|---|---|
| Auth | login, logout |
Authentication and configuration |
| Organizations | orgs list, orgs get, orgs create |
Manage organizations |
| Projects | projects list, projects get, projects create, projects delete |
Manage projects |
| Agents | agents list, agents get, agents create, agents delete |
Manage agents |
| Agent Ops | agents token, agents logs, agents metrics, agents config |
Agent operations |
| Builds | builds list, builds get, builds trigger, builds logs |
Build management |
| Deployments | deploy, deployments list, deployments endpoints |
Deploy and manage |
| Traces | traces list, traces get, traces export |
Distributed tracing |
| Repositories | repos branches, repos commits |
GitHub repository queries |
| Utilities | utils name |
Helper utilities |
| Infrastructure | environments list, dataplanes list, pipelines list |
Platform resources |
| Config | config set, config get, config list |
CLI configuration |
For detailed command documentation, see docs/COMMANDS.md.
amp loginThis interactive wizard guides you through:
- Setting the API server URL
- Authenticating with your token
- Selecting default organization and project
# Set API server URL
amp config set api_url https://your-server.com/api/v1
# Set authentication
amp config set api_key_header Authorization
amp config set api_key "Bearer your-token"
# Set defaults for convenience
amp config set default_org your-org
amp config set default_project your-project
# View current configuration
amp config listSettings are stored in ~/.amp/config.yaml:
| Key | Description |
|---|---|
api_url |
API server URL |
api_key_header |
Authentication header name |
api_key |
Authentication token |
default_org |
Default organization |
default_project |
Default project |
| Document | Description |
|---|---|
| docs/COMMANDS.md | Complete command reference with all flags and examples |
| docs/api-spec.yaml | API endpoint mapping and type definitions |
# 1. Create the agent
amp agents create \
--display-name "My API Agent" \
--provisioning internal \
--repo-url https://github.com/user/my-agent \
--branch main \
--language python \
--language-version 3.11 \
--subtype custom-api
# 2. Wait for build to complete
amp builds list --agent my-api-agent
# 3. Deploy to development
amp deploy --agent my-api-agent --image build-xyz
# 4. Check deployment status
amp deployments list --agent my-api-agent
# 5. Get the endpoint URL
amp deployments endpoints --agent my-api-agent --env development# View resource metrics
amp agents metrics --agent my-agent --env development
# View runtime logs
amp agents logs --agent my-agent --env development --level ERROR,WARN
# List recent traces
amp traces list --agent my-agent --env development --since 1h
# Export traces for analysis
amp traces export --agent my-agent --env dev --file traces.json# Generate token for OTEL trace ingestion
amp agents token --agent my-agent --expires-in 7d
# Use in scripts
export AGENT_TOKEN=$(amp agents token --agent my-agent --output json | jq -r .token)# List branches
amp repos branches --owner wso2 --repo agent-manager
# List commits with filters
amp repos commits --url https://github.com/wso2/agent-manager --branch main --limit 20
# Generate resource name from display name
amp utils name --display-name "My New Agent" --type agent --project-name myprojectRun amp without arguments:
$ amp
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ WSO2 AMP CLI โ
โ AI Agent Management Platform โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
amp> orgs list
amp> agents list
amp> exit
| Flag | Short | Description |
|---|---|---|
--org |
-o |
Organization name |
--project |
-p |
Project name |
--output |
Output format: table or json |
|
--limit |
Maximum results to return | |
--offset |
Pagination offset | |
--verbose |
-v |
Enable debug output |
--help |
-h |
Show help |
# Run without building
go run ./cmd/amp agents list
# Build
go build -o amp ./cmd/amp
# Run tests
go test ./...
# Vet
go vet ./...wso2-amp-cli/
โโโ cmd/
โ โโโ amp/ # Main entry point
โ โโโ agents.go # Agent commands
โ โโโ builds.go # Build commands
โ โโโ repos.go # Repository commands
โ โโโ utils.go # Utility commands
โ โโโ ...
โโโ internal/
โ โโโ api/ # API client
โ โโโ config/ # Configuration management
โ โโโ ui/ # Terminal UI components
โโโ docs/
โ โโโ COMMANDS.md # Command reference
โ โโโ api-spec.yaml # API specifications
โโโ README.md
Contributions are welcome! Please feel free to submit issues and pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Related Links:
- WSO2 Agent Manager - The platform this CLI manages
- Discussion: CLI Proposal - Original discussion about this CLI