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
- Python
- TypeScript
log(): Send messages to users and log locallymemory: Session-scoped key-value storageplatforms: Platform integrations (Polymarket, Hyperliquid)swidge: Cross-chain swap and bridge operationssign_and_send(): Sign and broadcast transactionssign_message(): Sign messages (EVM only)transactions(): Get transaction historyget_current_positions(): Get live positionsclear_suggested_transactions(): 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