- Swapping tokens on Uniswap and Aerodrome
- Lending or borrowing assets using protocols on Aave
- Providing liquidity on Aerodrome and Uniswap
- Transferring funds between wallets.
- Querying balances, portfolios and monitoring positions.
Overview
Integration details
| Class | Package | Serializable | JS support | Version |
|---|---|---|---|---|
| LangchainCompassToolkit | langchain-compass | ❌ | ❌ |
Tool features
Here’s a sample of the tools this toolkit provides (subject to change daily):aave_supply: Supply assets to Aave to earn interest.aave_borrow: Borrow assets from Aave using collateral.uniswap_swap_sell_exactly: Swap a specific amount of one token on Uniswap.generic_portfolio_get: Retrieve a wallet’s portfolio in USD and token balances.generic_transfer_erc20: Transfer ERC20 tokens between addresses.
Setup
Here we will:- Install the langchain package
- Import and instantiate the toolkit
- Pass the tools to your agent with
toolkit.get_tools()
Installation
This toolkit lives in thelangchain-compass package:
Environment Setup
To run these examples, ensure LangChain has access to an LLM service. For instance, if you’re using GPT-4o, create a.env file containing:
Instantiation
Now we can instantiate our toolkit:Tools
View available tools:Invocation
To invoke a single tool programmatically:Use within an agent
We will need a LLM or chat model:API reference
langchain-compass is built on top of the Compass API. Each tool corresponds to an API endpoint. Please check out the docs here
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.