Agent Context

The AgentContext object provides session data and SDK methods to your agent functions.

Properties

Session Data

  • sessionId (number): Unique session identifier

  • sessionWalletAddress (string): Wallet address for this session

  • currentPositions (array): Assets (positions) allocated to the agent at the start of execution.

  • executionMode (string): Execution mode for the session, will determine if transactions need to be approved by the user, or automatically executed.

SDK Methods

  • log(): Send messages to users and log locally

  • memory: Session-scoped key-value storage

  • platforms: Platform integrations (Polymarket, Hyperliquid)

  • swidge: Cross-chain swap operations

  • signAndSend(): Sign and broadcast transactions

  • signMessage(): Sign messages (EVM only)

  • transactions(): Get transaction history

  • getCurrentPositions(): Get live positions

Basic Usage

See Core Methods and Platforms for more details

Current Positions

currentPositions reflects assets allocated at the start of execution. See Positions for more details.

Next Steps

Last updated