|
| 1 | +# Allocation Management |
| 2 | + |
| 3 | +There are three ways to manage allocations, ranging from fully automated to fully manual: |
| 4 | + |
| 5 | +| Method | How it works | When to use | |
| 6 | +|--------|--------------|-------------| |
| 7 | +| **[Indexing Rules](./rules.md)** | Set rules, let the agent decide | Automated or semi automated management in AUTO/OVERSIGHT mode | |
| 8 | +| **[Action Queue](./action-queue.md)** | Queue actions, approve, execute | Batching, 3rd party tools | |
| 9 | +| **[Direct Commands](./direct.md)** | Execute immediately on-chain | One-off operations, debugging, immediate control | |
| 10 | + |
| 11 | +## Indexing Rules |
| 12 | + |
| 13 | +You define rules that specify which deployments to allocate to and how much stake to use. The agent's [reconciliation loop](../operation-modes.md) evaluates these rules and queues the necessary actions automatically using the [action queue](./action-queue.md). |
| 14 | + |
| 15 | +```bash |
| 16 | +graph indexer rules set QmXYZ... decisionBasis always allocationAmount 10000 |
| 17 | +``` |
| 18 | + |
| 19 | +**Best for:** Hands-off operation where you want the agent to manage allocations based on criteria like signal, stake thresholds, or explicit deployment lists. |
| 20 | + |
| 21 | +**Requires:** AUTO or OVERSIGHT mode. In MANUAL mode, the reconciliation loop is skipped and rules have no effect. |
| 22 | + |
| 23 | +→ [Full documentation](./rules.md) |
| 24 | + |
| 25 | +## Action Queue |
| 26 | + |
| 27 | +Actions are queued, reviewed, approved, and then executed by a background worker. This gives you oversight and control over what gets executed on-chain. |
| 28 | + |
| 29 | +```bash |
| 30 | +graph indexer actions queue allocate QmXYZ... 10000 |
| 31 | +graph indexer actions approve 1 |
| 32 | +``` |
| 33 | + |
| 34 | +**Best for:** |
| 35 | +- Reviewing actions before execution (especially in OVERSIGHT mode) |
| 36 | +- Batching multiple operations |
| 37 | +- Integrating with 3rd party allocation optimizers |
| 38 | +- Maintaining a history of all allocation actions |
| 39 | + |
| 40 | +**Works in all modes.** In AUTO/OVERSIGHT, the agent also queues actions here. In MANUAL, you queue everything yourself. |
| 41 | + |
| 42 | +→ [Full documentation](./action-queue.md) |
| 43 | + |
| 44 | +## Direct Commands |
| 45 | + |
| 46 | +Execute allocation operations immediately on the blockchain, bypassing the action queue entirely. |
| 47 | + |
| 48 | +```bash |
| 49 | +graph indexer allocations create QmXYZ... 10000 --network arbitrum-one |
| 50 | +``` |
| 51 | + |
| 52 | +**Best for:** One-off operations, debugging, or when you need immediate execution without waiting for the queue cycle. |
| 53 | + |
| 54 | +**Works in all modes.** These commands always execute immediately regardless of operation mode. |
| 55 | + |
| 56 | +→ [Full documentation](./direct.md) |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Automatic Rule Updates |
| 61 | + |
| 62 | +When allocation actions execute, via manually queuing actions or running direct commands, indexing rules are automatically updated to keep the agent in sync: |
| 63 | + |
| 64 | +| Action | Rule Update | |
| 65 | +|--------|-------------| |
| 66 | +| `allocate` | Sets `decisionBasis: ALWAYS` | |
| 67 | +| `unallocate` | Sets `decisionBasis: OFFCHAIN` | |
| 68 | +| `reallocate` | Sets `decisionBasis: ALWAYS` | |
| 69 | +| `resize` | Sets `decisionBasis: ALWAYS` | |
| 70 | +| `present-poi` | No change | |
| 71 | + |
| 72 | +This prevents the agent from fighting your manual changes in AUTO/OVERSIGHT mode. |
0 commit comments