The indexer agent can automatically manage your allocations through a reconciliation loop - a background process that continuously monitors the network and adjusts your allocations based on your indexing rules.
The operation mode controls whether and how this reconciliation loop runs.
Configure the mode via --allocation-management or INDEXER_AGENT_ALLOCATION_MANAGEMENT:
| Mode | Reconciliation Loop | Behavior | Best For |
|---|---|---|---|
| AUTO (default) | Runs | Agent decides, auto-approves, executes | Hands-off operation |
| OVERSIGHT | Runs | Agent decides, queues for your approval | Review before execution |
| MANUAL | Skipped | You manage allocations via CLI | Full manual control, 3rd party tools |
For information on how to manage allocations (rules, action queue, direct commands), see the Allocation Management guide.
The reconciliation loop is the agent's core automation mechanism. It periodically:
- Evaluates which deployments you should be allocated to (based on your indexing rules)
- Compares that desired state against your actual on-chain allocations
- Queues actions to reconcile the difference (allocate, unallocate, reallocate)
┌─────────────────────┐ ┌──────────────────────────┐ ┌─────────────┐
│ Deployment │ --> │ Allocation │ --> │ Action │
│ Evaluation │ │ Reconciliation │ │ Executor │
│ │ │ │ │ │
│ "What SHOULD we │ │ "What do we need to DO │ │ Execute │
│ allocate to?" │ │ to match desired state?"│ │ on-chain │
└─────────────────────┘ └──────────────────────────┘ └─────────────┘
In AUTO mode, actions are auto-approved and execute immediately. In OVERSIGHT mode, actions are queued for your approval first. In MANUAL mode, the loop doesn't run at all - you queue actions yourself.
The loop runs on two intervals:
- Small interval:
pollingInterval- for frequently changing data - Large interval:
pollingInterval * 5- for stable data
The loop fetches and maintains:
| Data | Interval |
|---|---|
| Current epoch number | Large |
| Max allocation duration | Large |
| Indexing rules | Small |
| Active deployments on Graph Node | Large (AUTO mode only) |
| Network deployments | Small |
| Active allocations | Small |
| Recently closed allocations | Small |
Determines which deployments you should be allocated to:
- Fetches all deployments from the network subgraph
- Matches each against your indexing rules (deployment-specific or global)
- Outputs
toAllocate: true/falsefor each deployment
Decision basis options (from your rules):
always- allocatenever- don't allocateoffchain- index locally but don't allocate on-chainrules- evaluate against thresholds (minStake,minSignal,minAverageQueryFees)
Compares desired state against actual allocations and queues actions:
| Condition | Action Queued |
|---|---|
| Should allocate + no active allocation | ALLOCATE |
| Shouldn't allocate + has active allocation | UNALLOCATE |
| Should allocate + allocation expiring | REALLOCATE |
Expiration check: currentEpoch >= createdAtEpoch + allocationLifetime
The agent includes safety features to prevent problematic allocations:
- Health check: Won't allocate to deployments with "failed" health status (if
safety=truein rule) - Zero POI safety: Won't reallocate if previous allocation closed with zero POI
- Approved actions check: Skips reconciliation if pending approved actions exist (prevents conflicts)
- Network subgraph protection: Never auto-allocated unless explicitly enabled via
--allocate-on-network-subgraph
- Allocation Management Overview - How to manage allocations
- Indexing Rules - Configure what the agent should allocate to
- Action Queue - Queue, approve, and execute allocation actions
- Direct Commands - Execute allocation operations immediately