AgentContext is passed to your run and unwind functions. It has session data and all SDK methods.
Session Data
sessionId(number): Unique session identifiersessionWalletAddress(string): Wallet address for this sessioncurrentPositions(array): Assets allocated to the agent at the start of executionexecutionMode(string):"auto"or"manual"
SDK Methods
- TypeScript
- Python
log(): Send messages to users and log locallymemory: Session-scoped key-value storageplatforms: Platform integrations (Polymarket, Hyperliquid)swidge: Cross-chain swap and bridge operationssignAndSend(): Sign and broadcast transactionssignMessage(): Sign messages (EVM only)transactions(): Get transaction historygetCurrentPositions(): Get live positionsclearSuggestedTransactions(): Clear pending suggestions (manual mode)
Basic Usage
Current Positions
currentPositions is a snapshot taken at execution start. After transactions, use getCurrentPositions() for updated balances. See Positions for full details.
See Also
- Quick Reference — All SDK methods at a glance
- Execution Model — How sessions and the run loop work
- Positions — Full position management reference