Set subnet hyperparameters via the chain's AdminUtils pallet. Requires the sudo key (Alice on localnet, root key on mainnet).
These commands close the gap where agents can register subnets but can't configure them without writing Rust — every AdminUtils call is now a one-liner.
Set the tempo (blocks per epoch) for a subnet.
agcli admin set-tempo --netuid 1 --tempo 100 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_tempo(origin, netuid, tempo)
Set max validator slots.
agcli admin set-max-validators --netuid 1 --max 8 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_max_allowed_validators(origin, netuid, max)
Set max total UID slots.
agcli admin set-max-uids --netuid 1 --max 256 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_max_allowed_uids(origin, netuid, max)
Set immunity period (blocks of immunity after registration).
agcli admin set-immunity-period --netuid 1 --period 100 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_immunity_period(origin, netuid, period)
Set minimum weights a validator must set.
agcli admin set-min-weights --netuid 1 --min 1 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_min_allowed_weights(origin, netuid, min)
Set maximum weight value.
agcli admin set-max-weight-limit --netuid 1 --limit 65535 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_max_weight_limit(origin, netuid, limit)
Set blocks between weight submissions (0 = unlimited).
agcli admin set-weights-rate-limit --netuid 1 --limit 0 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_weights_set_rate_limit(origin, netuid, limit)
Enable or disable commit-reveal weights.
agcli admin set-commit-reveal --netuid 1 --enabled false --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_commit_reveal_weights_enabled(origin, netuid, enabled)
Set POW registration difficulty.
agcli admin set-difficulty --netuid 1 --difficulty 1000000 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_difficulty(origin, netuid, difficulty)
Set activity cutoff (blocks before a neuron is considered inactive).
agcli admin set-activity-cutoff --netuid 1 --cutoff 5000 --sudo-key //Alice --network localOn-chain: AdminUtils::sudo_set_activity_cutoff(origin, netuid, cutoff)
Execute any AdminUtils call by name — escape hatch for parameters without a typed command.
# Set bonds moving average
agcli admin raw --call sudo_set_bonds_moving_average --args '[1, 900000]' --sudo-key //Alice --network local
# Set target registrations per interval
agcli admin raw --call sudo_set_target_registrations_per_interval --args '[1, 3]' --sudo-key //Alice --network local
# Set serving rate limit
agcli admin raw --call sudo_set_serving_rate_limit --args '[1, 50]' --sudo-key //Alice --network localArgs must be a JSON array. Supported value types: numbers (u128), booleans, strings.
Show all known AdminUtils parameters with descriptions and argument types.
agcli admin list
# JSON: [{"call", "description", "args"}]Known parameters:
| Call | Description | Args |
|---|---|---|
sudo_set_tempo |
Blocks per epoch | netuid: u16, tempo: u16 |
sudo_set_max_allowed_validators |
Max validator slots | netuid: u16, max: u16 |
sudo_set_max_allowed_uids |
Max total UID slots | netuid: u16, max: u16 |
sudo_set_immunity_period |
Blocks of immunity after registration | netuid: u16, period: u16 |
sudo_set_min_allowed_weights |
Minimum weights a validator must set | netuid: u16, min: u16 |
sudo_set_max_weight_limit |
Maximum weight value | netuid: u16, limit: u16 |
sudo_set_weights_set_rate_limit |
Blocks between weight submissions (0=unlimited) | netuid: u16, limit: u64 |
sudo_set_commit_reveal_weights_enabled |
Enable/disable commit-reveal weights | netuid: u16, enabled: bool |
sudo_set_difficulty |
POW registration difficulty | netuid: u16, difficulty: u64 |
sudo_set_bonds_moving_average |
Bonds moving average | netuid: u16, avg: u64 |
sudo_set_target_registrations_per_interval |
Target registrations per interval | netuid: u16, target: u16 |
sudo_set_activity_cutoff |
Blocks before neuron is inactive | netuid: u16, cutoff: u16 |
sudo_set_serving_rate_limit |
Axon serving rate limit | netuid: u16, limit: u64 |
On localnet, Alice (//Alice) is the sudo account. Pass --sudo-key //Alice.
If --sudo-key is omitted, the command falls back to the wallet coldkey. On mainnet, only the chain's root key can execute AdminUtils calls.
| Error | Cause | Fix |
|---|---|---|
Invalid sudo key URI |
Bad URI format | Use //Alice or //Bob |
BadOrigin / extrinsic failed |
Caller is not the sudo account | Verify --sudo-key is the chain's sudo key |
SubnetDoesNotExist |
Invalid netuid | Check agcli subnet list |
Invalid JSON args |
Malformed --args in raw |
Must be JSON array: '[1, 100]' |
agcli handler: src/cli/admin_cmds.rs — handle_admin() L34, resolve_sudo_key() L12, parse_raw_args() L232
SDK: src/admin.rs — set_tempo() L25, set_max_allowed_validators() L42, set_max_allowed_uids() L59, set_immunity_period() L76, set_min_allowed_weights() L93, set_max_weight_limit() L110, set_weights_set_rate_limit() L127, set_commit_reveal_weights_enabled() L144, set_difficulty() L161, set_activity_cutoff() L212, set_serving_rate_limit() L229, raw_admin_call() L249, known_params() L262
Subtensor pallet: pallets/admin-utils/src/lib.rs — All sudo_set_* dispatch entry points
agcli localnet start— Start a local chain for testingagcli localnet scaffold— Full test environment with admin calls includedagcli subnet set-param— Set hyperparameters as subnet owner (not sudo)agcli subnet hyperparams— View current hyperparameters