Automation
Recurring intents and trigger-based proposals for autonomous treasury operations.
AURA supports interval-based recurring transactions and condition-based triggers, allowing AI agents to set up governed spending patterns that keepers can promote into the normal proposal flow.
Scheduled Intents
A ScheduledIntent represents a recurring transaction pattern with budget controls:
import { instructions } from "@aura-protocol/sdk-ts";
await instructions.execution.sendCreateScheduledIntent(
client,
owner,
createScheduledIntentInput,
);Execution:
- A caller invokes
execute_scheduled_intentwhenClock::unix_timestamp >= next_run_at; ifkeeperis set, only that key may trigger it - Intent checks on-chain clock, conditions, and budgets
- If satisfied, promotes a pending proposal into the execution queue
- Policy evaluation runs normally (limits, velocity, etc.)
Budget tracking:
spent_usdincrements when the promoted proposal settles through the normal finalization pathruns_completedtracks settled runsin_flight_proposal_idandin_flight_usdreserve the promoted run until it settles or is clearedmax_runs,end_at, andtotal_budget_usdstop future execution; the account is closed explicitly withclose_scheduled_intent
In-flight protection
While a promoted run is pending, the intent cannot be executed again. Use clear_scheduled_intent_in_flight to recover from abandoned proposals.
Recurrence
Scheduled intents use a fixed interval_secs cadence with start_at, optional end_at, optional max_runs, catch_up, and skip_on_deny controls.
args: {
intervalSecs: 86_400, // daily cadence
startAt,
endAt: null,
maxRuns: 30,
catchUp: false,
}Conditional Proposals
Park a proposal behind runtime conditions instead of executing immediately:
await instructions.execution.sendProposeConditionalTransaction(
client,
aiAuthority,
proposeConditionalInput,
);Trigger mechanism:
- Conditional proposal stored in
ConditionalProposalPDA - Any caller invokes
try_triggerperiodically - On-chain conditions evaluated:
- Price feeds checked through verified Pyth/Switchboard descriptors or the raw legacy path
- Time windows checked against
Clocksysvar - Balance and oracle-flag conditions evaluated from the condition context
- If all conditions satisfied, proposal promoted into pending queue
Lifecycle:
If conditions are already satisfied at creation, the proposal is promoted immediately and the normal policy engine runs once. Otherwise it is parked, and policy runs when try_trigger later promotes it.
Managing Intents
Pause/Resume:
await instructions.execution.sendPauseScheduledIntent(client, owner, pauseInput);
await instructions.execution.sendResumeScheduledIntent(client, owner, resumeInput);Update budget or conditions:
await instructions.execution.sendUpdateScheduledIntent(client, owner, updateInput);Close intent:
await instructions.execution.sendCloseScheduledIntent(client, owner, closeInput);Closing is refused if an in-flight promoted run is still pending.
Use Cases
Scheduled intents:
- Daily yield harvests
- Weekly treasury rebalancing
- Monthly subscription payments
- Periodic liquidity provisioning
Conditional proposals:
- Buy-the-dip orders (trigger when price drops)
- Take-profit exits (trigger when price rises)
- Time-windowed actions (execute only during configured windows)
- Oracle-gated compliance actions
Combined:
- Recurring intent with price condition: "Every Monday, if ETH < $2500, buy $1000"
- Conditional proposal with balance guard: "When price hits target, sell only if balance > $10k"
Keeper Infrastructure
Scheduled and conditional execution requires off-chain keepers to call execute_scheduled_intent and try_trigger. AURA treasuries can:
- Run their own keeper infrastructure
- Use external keeper networks
- Delegate to protocol-operated keepers
Permissionless execution
try_trigger is permissionless. execute_scheduled_intent is permissionless only when the intent has no keeper; otherwise it is restricted to that configured keeper. Keeper incentives can be funded from the fee vault.
Related Instructions
create_scheduled_intent— Create recurring transactionupdate_scheduled_intent— Edit recurrence/budgetpause_scheduled_intent/resume_scheduled_intent— Toggle executionclose_scheduled_intent— Close intentexecute_scheduled_intent— Run a due slotclear_scheduled_intent_in_flight— Recover from abandoned runpropose_conditional_transaction— Create conditional proposaltry_trigger— Attempt to trigger conditionalclose_conditional_proposal— Clean up conditional proposal