GOAT
GOAT is the finance toolkit for AI agents.
Overview
Create agents that can:
- Send and receive payments
- Purchase physical and digital goods and services
- Engage in various investment strategies:
- Earn yield
- Bet on prediction markets
- Purchase crypto assets
- Tokenize any asset
- Get financial insights
How it works
GOAT leverages blockchains, cryptocurrencies (such as stablecoins), and wallets as the infrastructure to enable agents to become economic actors:
- Give your agent a wallet
- Allow it to transact anywhere
- Use more than +200 tools
See everything GOAT supports here.
Lightweight and extendable Different from other toolkits, GOAT is designed to be lightweight and extendable by keeping its core minimal and allowing you to install only the tools you need.
If you don't find what you need on our more than 200 integrations you can easily:
- Create your own plugin
- Integrate a new chain
- Integrate a new wallet
- Integrate a new agent framework
See how to do it here.
Quickstarts
The best way to get started is by using the quickstarts below. See how you can configure GOAT to achieve any of the use cases below.
- By use case
- By wallet
- See all python quickstarts here.
Setup
- Install the core package and langchain adapter:
pip install goat-sdk goat-sdk-adapter-langchain
- Install the type of wallet you want to use (e.g solana):
pip install goat-sdk-wallet-solana
- Install the plugins you want to use in that chain:
pip install goat-sdk-plugin-spl-token
Instantiation
Now we can instantiate our toolkit:
from goat_adapters.langchain import get_on_chain_tools
from goat_wallets.solana import solana, send_solana
from goat_plugins.spl_token import spl_token, SplTokenPluginOptions
from goat_plugins.spl_token.tokens import SPL_TOKENS
# Initialize Solana client
client = SolanaClient(os.getenv("SOLANA_RPC_ENDPOINT"))
# Initialize regular Solana wallet
keypair = Keypair.from_base58_string(os.getenv("SOLANA_WALLET_SEED") or "")
wallet = solana(client, keypair)
tools = get_on_chain_tools(
wallet=wallet,
plugins=[
send_solana(),
spl_token(SplTokenPluginOptions(
network="mainnet", # Using devnet as specified in .env
tokens=SPL_TOKENS
)),
],
)
Invocation
tools["get_balance"].invoke({ "address": "0x1234567890123456789012345678901234567890" })
Use within an agent
import os
import asyncio
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
from solana.rpc.api import Client as SolanaClient
from solders.keypair import Keypair
from goat_adapters.langchain import get_on_chain_tools
from goat_wallets.solana import solana, send_solana
from goat_plugins.spl_token import spl_token, SplTokenPluginOptions
from goat_plugins.spl_token.tokens import SPL_TOKENS
# Initialize Solana client
client = SolanaClient(os.getenv("SOLANA_RPC_ENDPOINT"))
# Initialize regular Solana wallet
keypair = Keypair.from_base58_string(os.getenv("SOLANA_WALLET_SEED") or "")
wallet = solana(client, keypair)
# Initialize LLM
llm = ChatOpenAI(model="gpt-4o-mini")
def main():
# Initialize tools with Solana wallet
tools = get_on_chain_tools(
wallet=wallet,
plugins=[
send_solana(),
spl_token(SplTokenPluginOptions(
network="mainnet", # Using devnet as specified in .env
tokens=SPL_TOKENS
)),
],
)
# Initialize agent
# Your agent code here
if __name__ == "__main__":
main()
API reference
- For a complete list of tools, see the GOAT SDK documentation.
Related
- Tool conceptual guide
- Tool how-to guides