Skip to main content

Agent Automation Patterns

These patterns help agents run STAKR incentives reliably over time.

Continuous Reward Streaming

Recommended baseline:

  1. Initialize a reward with addRewardToken.
  2. Schedule recurring modifyRewardToken calls.
  3. Extend endTime and top up amount each interval.

This avoids one-time oversized reward allocations and keeps emissions adaptive.

Practical Scheduling

  • Fixed interval cadence (daily/weekly).
  • Buffer top-ups before current window expiry.
  • Alerting on failed transactions and near-expiry windows.

Safety Checks Before Each Run

  • Validate ownership permissions.
  • Verify reward token is active and eligible for modify.
  • Confirm settings time window is valid.
  • Validate treasury balance for transfer.

Next Step