You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/HEDERAPLUGINS.md
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,3 +251,75 @@ The Python SDK currently supports one agent mode:
251
251
252
252
> **Coming Soon:**`AgentMode.RETURN_BYTES` - In this mode, the agent creates the transaction and returns the bytes for
253
253
> the user to execute in another tool (human-in-the-loop pattern).
254
+
255
+
---
256
+
257
+
## Scheduling Transactions
258
+
259
+
Most tools in the Hedera Agent Kit support **scheduled transactions**. This allows you to create a transaction that will be executed at a later time or once specific signatures are collected.
260
+
261
+
### Scheduling Parameters
262
+
263
+
When a tool supports scheduling, it accepts an optional `schedulingParams` object with the following fields:
264
+
265
+
| Field | Type | Description |
266
+
|---|---|---|
267
+
|`is_scheduled`|`boolean`| Set to `true` to create a scheduled transaction instead of executing immediately. |
268
+
|`expiration_time`|`string`| ISO 8601 formatted date string (e.g., "2026-02-01T00:00:00Z") when the transaction expires if not fully signed. |
269
+
|`wait_for_expiry`|`boolean`| If `true`, the transaction executes only at `expiration_time`. If `false` (default), it executes as soon as signatures are collected. |
270
+
|`admin_key`|`boolean \| string`| Admin key to manage the scheduled transaction. `true` uses the operator key. |
271
+
|`payer_account_id`|`string`| Account ID that pays the execution fee. Defaults to the operator. |
272
+
273
+
### Supported Tools
274
+
275
+
The following tools currently support transaction scheduling:
276
+
277
+
**Core Account Plugin**
278
+
*`CREATE_ACCOUNT_TOOL`
279
+
*`UPDATE_ACCOUNT_TOOL`
280
+
*`TRANSFER_HBAR_TOOL`
281
+
282
+
**Core Token Plugin**
283
+
*`CREATE_FUNGIBLE_TOKEN_TOOL`
284
+
*`CREATE_NON_FUNGIBLE_TOKEN_TOOL`
285
+
*`MINT_FUNGIBLE_TOKEN_TOOL`
286
+
*`MINT_NON_FUNGIBLE_TOKEN_TOOL`
287
+
*`TRANSFER_NON_FUNGIBLE_TOKEN_TOOL`
288
+
*`TRANSFER_NFT_WITH_ALLOWANCE_TOOL`
289
+
*`TRANSFER_FUNGIBLE_TOKEN_WITH_ALLOWANCE_TOOL`
290
+
*`AIRDROP_FUNGIBLE_TOKEN_TOOL`
291
+
*`DISSOCIATE_TOKEN_TOOL`
292
+
*`DELETE_NON_FUNGIBLE_TOKEN_ALLOWANCE_TOOL`
293
+
294
+
**Core Consensus Plugin**
295
+
*`SUBMIT_TOPIC_MESSAGE_TOOL`
296
+
297
+
**Core EVM Plugin**
298
+
*`CREATE_ERC20_TOOL`
299
+
*`TRANSFER_ERC20_TOOL`
300
+
*`CREATE_ERC721_TOOL`
301
+
*`MINT_ERC721_TOOL`
302
+
*`TRANSFER_ERC721_TOOL`
303
+
304
+
### Prompting Best Practices
305
+
306
+
To successfully create a scheduled transaction via an AI agent, use clear and explicit prompts:
307
+
308
+
1.**Explicit Intent**: clearly state that you want to *schedule* the transaction.
309
+
2.**Specific Timestamps**: Use exact dates for expiration or execution time. Avoid relative terms like "tomorrow" or "in 2 days" if possible, or ensure the agent can resolve them to a specific date.
310
+
311
+
**Good Examples:**
312
+
* "Transfer 10 HBAR to 0.0.12345 and schedule it to expire on 2025-12-31."
313
+
* "Create a scheduled transaction to mint 100 tokens of 0.0.56789, executing on 2026-01-01."
314
+
315
+
**Bad Examples:**
316
+
* "Transfer 10 HBAR later." (Vague timing)
317
+
* "Schedule a transfer." (Missing expiration details might default unexpectedly)
318
+
319
+
### Python SDK Implementation
320
+
321
+
In the Python SDK, scheduling is handled via the `OptionalScheduledTransactionParams` schema in `hedera_agent_kit.shared.parameter_schemas.common_schema`. Tools inheriting from this schema automatically support the parameters listed above.
322
+
323
+
To enable scheduling in a custom tool:
324
+
1. Inherit from `OptionalScheduledTransactionParams`.
325
+
2. In your tool's logic, use `HederaBuilder.maybe_wrap_in_schedule` to conditionally wrap the transaction.
0 commit comments