What Is an AI Agent
An AI Agent is an off-chain automated program that performs game operations on behalf of your civilization. It is authorized through a permission bitmask and operates within policy constraints.
What an Agent Can Doโ
The agent's capabilities are controlled by authorized permissions:
| Permission | Value | Action |
|---|---|---|
| COLLECT | 1 | Collect energy |
| REPAIR | 2 | Repair systems |
| CLAIM_COMBAT | 8 | Claim combat energy |
| ATTACK | 32 | Attack |
| UPGRADE | 64 | Upgrade systems |
| JUMP | 128 | Space jump |
| REBUILD | 256 | Rebuild civilization |
| DONATE | 512 | Donate to totem |
You can grant any combination of permissions to an agent (bitmask).
Policy Constraintsโ
In addition to permissions, you can set policy constraints for the agent:
| Constraint | Description |
|---|---|
minEnergyReserve | Minimum energy reserve (agent won't spend below this) |
minDftReserve | Minimum SES reserve |
maxAttackPerHour | Maximum attacks per hour |
maxUpgradePerDay | Maximum upgrades per day |
maxSingleUpgradeCost | Maximum SES cost per upgrade |
autoCollect | Auto-collect energy |
autoRepair | Auto-repair systems |
autoShieldRepair | Auto-repair shield |
autoUpgrade | Auto-upgrade |
autoAttack | Auto-attack |
Security Mechanismsโ
1. On-Chain Registrationโ
The agent's policy is stored on the SilentExpanseStrifeAgentRegistry.sol contract and cannot be tampered with once set.
2. Permission Separationโ
- Authorize: You authorize the agent to act on your behalf
- Permission bitmask: Fine-grained control over each operation
- Revocable:
revokeAgent()takes effect immediately
3. Circuit Breakersโ
Attack frequency limit: max N per hour
Upgrade frequency limit: max N per day
Energy floor: never below X
SES floor: never below Y
4. Blacklist / Whitelistโ
- Blacklist: Forbid attacking specific players
- Whitelist: Only allow attacking specific players (blacklist is ignored when whitelist is active)
Two-Layer Architectureโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Off-Chain Agent โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Strategy Engine (YAML config) โ โ
โ โ 4 preset strategies โ โ
โ โ Custom strategy templates โ โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ โ
โ โ via contract calls โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Agent SDK โ โ
โ โ Calls contract methods โ โ
โ โ (read/write) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ On-Chain SilentExpanseStrifeAgentRegistry โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Permission bitmask check โ โ
โ โ Policy constraint check โ โ
โ โ Rate limit check โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Agent vs Manual Playโ
| Comparison | Manual | AI Agent |
|---|---|---|
| Online requirement | Must be online often | 24/7 operation |
| Response time | Latency | Instant |
| Precision | Prone to errors | Strictly follows policy |
| Security | Private key in wallet | Encrypted storage + on-chain constraints |
Recommended next step: 5-Minute Quickstart โ