The public REST API provides pool, token, and protocol data without requiring a wallet or on-chain connection. Base URL: https://api.orca.so/v2/solanaInstall the requests library if you don’t already have it:
Both approaches above are straightforward to wrap as tools in Python-based agent frameworks.Pattern for a read-only pool monitoring tool:
Use the REST API to fetch pool data (no wallet, no async complexity)
Parse the JSON response and return structured data to your agent
Use this to drive decisions: is APY above threshold? Is the price in a target range?
Pattern for an execution tool:
Use whirlpool-essentials for on-chain reads and transaction building
Load a wallet from a keypair file (keep it isolated from production funds)
Execute swaps or position operations in response to agent decisions
Never expose private keys in agent prompts, logs, or environment variables visible to external services. Use a dedicated, isolated keypair for any automated agent.