|
| 1 | +# HiMarket Deployment and Usage Guide |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +HiMarket is an AI capability marketplace for publishing and distributing various Agents in the AgentScope multi-agent system. |
| 6 | + |
| 7 | +### HiMarket Features |
| 8 | + |
| 9 | +- **Agent Marketplace**: One-click listing of Agents registered in Nacos, developers can browse and subscribe to various Agent services |
| 10 | +- **Admin Console**: Unified management of Agent products, permission configuration, and subscription approval |
| 11 | +- **Developer Portal**: Developers can discover, subscribe to, and use Agent capabilities in the portal |
| 12 | +- **Observability**: Monitor Agent invocation success rate, latency, and other runtime metrics |
| 13 | + |
| 14 | +HiMarket shares the same Nacos instance with the AgentScope multi-agent system, enabling unified management and exposure of Agents. |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## Configure Helm Values |
| 19 | + |
| 20 | +Edit `himarket-helm/values.yaml` to configure HiMarket: |
| 21 | + |
| 22 | +```yaml |
| 23 | +# HiMarket image configuration |
| 24 | +server: |
| 25 | + image: |
| 26 | + hub: registry.cn-hangzhou.aliyuncs.com/agentscope |
| 27 | + repository: himarket-server-auto-init |
| 28 | + tag: "latest" |
| 29 | + |
| 30 | +# MySQL configuration (optional: use built-in or external) |
| 31 | +mysql: |
| 32 | + enabled: true # Use built-in MySQL |
| 33 | + |
| 34 | +# Nacos configuration (import AgentScope's Nacos) |
| 35 | +nacos: |
| 36 | + enabled: true # Enable Nacos import |
| 37 | + name: agentscope-nacos |
| 38 | + serverUrl: http://agentscope-nacos:8848 # Keep consistent with the Nacos address configured earlier |
| 39 | + username: nacos |
| 40 | + password: nacos |
| 41 | +``` |
| 42 | +
|
| 43 | +For more configuration options, please refer to [himarket-helm/README.md](himarket-helm/README.md) |
| 44 | +
|
| 45 | +--- |
| 46 | +
|
| 47 | +## Deploy to K8s |
| 48 | +
|
| 49 | +```bash |
| 50 | +# Create namespace (if not already created) |
| 51 | +kubectl create namespace mse |
| 52 | + |
| 53 | +# Deploy AgentScope multi-agent system (must be deployed first) |
| 54 | +helm install agentscope helm/ --namespace mse |
| 55 | + |
| 56 | +# Deploy HiMarket AI capability marketplace |
| 57 | +# Import AgentScope's Nacos into HiMarket for unified Agent management |
| 58 | +helm install himarket himarket-helm/ --namespace mse |
| 59 | + |
| 60 | +# Check deployment status |
| 61 | +kubectl get pods -n mse |
| 62 | +kubectl get services -n mse |
| 63 | +``` |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## Using HiMarket |
| 68 | + |
| 69 | +### 1. Access HiMarket Admin Console |
| 70 | + |
| 71 | +Access the HiMarket admin console via `kubectl port-forward`: |
| 72 | + |
| 73 | +```bash |
| 74 | +# Forward admin console service |
| 75 | +kubectl port-forward svc/himarket-admin 5174:80 -n mse |
| 76 | + |
| 77 | +# Browser access |
| 78 | +# http://localhost:5174 |
| 79 | +``` |
| 80 | + |
| 81 | +If using LoadBalancer or NodePort: |
| 82 | + |
| 83 | +```bash |
| 84 | +# Get HiMarket service address |
| 85 | +kubectl get svc -n mse | grep himarket |
| 86 | + |
| 87 | +# LoadBalancer: http://<external-ip>:80 |
| 88 | +# NodePort: http://<node-ip>:<node-port> |
| 89 | +``` |
| 90 | + |
| 91 | +### 2. Login with Admin Account |
| 92 | + |
| 93 | +HiMarket automatically creates an admin account during deployment: |
| 94 | + |
| 95 | +**Default Admin Account**: |
| 96 | +- Username: `admin` |
| 97 | +- Password: `admin` |
| 98 | + |
| 99 | +**Custom Admin Account**: |
| 100 | + |
| 101 | +To modify the default admin account, configure it in `himarket-helm/values.yaml`: |
| 102 | + |
| 103 | +```yaml |
| 104 | +autoInit: |
| 105 | + # Admin account configuration |
| 106 | + admin: |
| 107 | + username: your-admin # Custom username |
| 108 | + password: your-password # Custom password |
| 109 | +``` |
| 110 | +
|
| 111 | +### 3. View Imported Nacos |
| 112 | +
|
| 113 | +1. Login to admin console |
| 114 | +2. Navigate to "Service Management" → "Nacos Instances" |
| 115 | +3. Confirm that AgentScope's Nacos instance has been automatically imported (configured during deployment) |
| 116 | +4. Click on the Nacos instance to view all registered Agent services |
| 117 | +
|
| 118 | +### 4. List an Agent |
| 119 | +
|
| 120 | +1. In the admin console, go to "API Products" |
| 121 | +2. Click "Create Product" and select an Agent service from Nacos (e.g., `supervisor-agent`, `business-sub-agent`, etc.) |
| 122 | +3. Configure product information, documentation, permissions, etc. |
| 123 | +4. Save and publish to the developer portal |
| 124 | + |
| 125 | +### 5. List an MCP Server |
| 126 | + |
| 127 | +In addition to MCP Servers automatically imported during deployment, users can also list their own MCP Servers registered in Nacos. |
| 128 | + |
| 129 | +**Listing Process** (similar to Agent listing): |
| 130 | + |
| 131 | +1. **Register MCP Server to Nacos** |
| 132 | + - Register your MCP Server to the Nacos instance shared with HiMarket |
| 133 | + - Ensure the MCP Server is running properly and can be discovered by Nacos |
| 134 | + |
| 135 | +2. **List in Admin Console** |
| 136 | + - Go to HiMarket admin console |
| 137 | + - Navigate to "API Products" → "Create Product" |
| 138 | + - Select your MCP Server service from the service list |
| 139 | + - Configure product information: |
| 140 | + - Product name and description |
| 141 | + - Description of tools provided by the MCP Server |
| 142 | + - API documentation and usage examples |
| 143 | + - Access permission configuration |
| 144 | + - Save and publish to developer portal |
| 145 | + |
| 146 | +3. **Developer Usage** |
| 147 | + - Developers browse MCP Server products in the portal |
| 148 | + - After subscription, integrate into AgentScope applications |
| 149 | + - Call MCP Server tools via MCP protocol |
| 150 | + |
| 151 | +**Notes**: |
| 152 | +- HiMarket automatically discovers all MCP Servers registered in Nacos |
| 153 | +- Supports listing services with standard MCP protocol |
| 154 | +- Different access permissions and subscription policies can be configured for different MCP Servers |
| 155 | + |
| 156 | +### 6. Developer Subscription |
| 157 | + |
| 158 | +HiMarket automatically creates a demo developer account during deployment, which can be used directly: |
| 159 | + |
| 160 | +**Default Developer Account**: |
| 161 | +- Username: `demo` |
| 162 | +- Password: `demo123` |
| 163 | + |
| 164 | +**Usage Flow**: |
| 165 | +1. Login to HiMarket developer portal with the default account |
| 166 | +2. Browse published Agent products |
| 167 | +3. Create an application and subscribe to Agents |
| 168 | +4. Obtain credentials and integrate into your own applications |
| 169 | + |
| 170 | +**Custom Developer Account**: |
| 171 | + |
| 172 | +To modify the default developer account, configure it in `himarket-helm/values.yaml`: |
| 173 | + |
| 174 | +```yaml |
| 175 | +autoInit: |
| 176 | + # Developer account configuration |
| 177 | + developer: |
| 178 | + username: your-developer # Custom username |
| 179 | + password: your-password # Custom password |
| 180 | +``` |
| 181 | + |
| 182 | +Or set via Helm command line: |
| 183 | + |
| 184 | +```bash |
| 185 | +helm install himarket himarket-helm/ \ |
| 186 | + --set autoInit.developer.username=mydev \ |
| 187 | + --set autoInit.developer.password=mypassword123 |
| 188 | +``` |
| 189 | + |
| 190 | +**Notes**: |
| 191 | +- HiMarket shares the same Nacos instance with AgentScope |
| 192 | +- All Agents registered in Nacos will be automatically discovered by HiMarket |
| 193 | +- HiMarket enables unified management and exposure of these Agent capabilities |
| 194 | + |
| 195 | +--- |
| 196 | + |
0 commit comments