Compare commits

...

13 Commits

Author SHA1 Message Date
Eugene Yurtsev
f17a8a9341 Merge branch 'master' into agentic-finance 2025-03-27 15:16:17 -04:00
Agustin Armellini Fischer
9455a9acb1 Fix table not rendering 2025-03-25 21:35:26 +01:00
Agustin Armellini Fischer
da7517b407 Fix finance table 2025-03-25 21:20:47 +01:00
Agustin Armellini Fischer
0e03664c16 Add missing provider 2025-03-25 21:08:03 +01:00
Agustin Armellini Fischer
45657cfd5b Remove agentic finance references 2025-03-25 19:02:00 +01:00
Agustin Armellini Fischer
58c2f34c35 Remove unused imports 2025-03-25 18:45:19 +01:00
Agustin Armellini Fischer
cfd413f51e Address comments 2025-03-25 18:41:23 +01:00
Agustin Armellini Fischer
f47a65c509 Add overview 2025-03-25 18:04:42 +01:00
Agustin Armellini Fischer
0e3c1d3639 Add needed sections to doc 2025-03-25 18:01:19 +01:00
Agus
dce8ed57a3 Merge branch 'master' into agentic-finance 2025-03-25 17:44:14 +01:00
Agustin Armellini Fischer
4d4a2249d3 Add GOAT to libs/packages.yml 2025-03-25 17:43:14 +01:00
Agustin Armellini Fischer
12063b47b5 Fix lint 2025-03-25 17:35:55 +01:00
Agustin Armellini Fischer
20893e2e49 Add GOAT integration to docs 2025-03-25 17:34:10 +01:00
4 changed files with 292 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
# GOAT
[GOAT](https://github.com/goat-sdk/goat) is the finance toolkit for AI agents.
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:
1. Give your agent a [wallet](https://github.com/goat-sdk/goat/tree/main#chains-and-wallets)
2. Allow it to transact [anywhere](https://github.com/goat-sdk/goat/tree/main#chains-and-wallets)
3. Use more than [+200 tools](https://github.com/goat-sdk/goat/tree/main#tools)
See everything GOAT supports [here](https://github.com/goat-sdk/goat/tree/main#chains-and-wallets).
**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](https://github.com/goat-sdk/goat/tree/main#-contributing).
## Installation and Setup
Check out our [quickstart](https://github.com/goat-sdk/goat/tree/main/python/examples/by-framework/langchain) to see how to set up and install GOAT.

View File

@@ -0,0 +1,217 @@
{
"cells": [
{
"cell_type": "raw",
"id": "afaf8039",
"metadata": {
"vscode": {
"languageId": "raw"
}
},
"source": [
"---\n",
"sidebar_label: GOAT\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "e49f1e0d",
"metadata": {},
"source": [
"# GOAT\n",
"\n",
"[GOAT](https://github.com/goat-sdk/goat) is the finance toolkit for AI agents.\n",
"\n",
"## Overview\n",
"\n",
"Create agents that can:\n",
"\n",
"- Send and receive payments\n",
"- Purchase physical and digital goods and services\n",
"- Engage in various investment strategies:\n",
" - Earn yield\n",
" - Bet on prediction markets\n",
"- Purchase crypto assets\n",
"- Tokenize any asset\n",
"- Get financial insights\n",
"\n",
"### How it works\n",
"GOAT leverages blockchains, cryptocurrencies (such as stablecoins), and wallets as the infrastructure to enable agents to become economic actors:\n",
"\n",
"1. Give your agent a [wallet](https://github.com/goat-sdk/goat/tree/main#chains-and-wallets)\n",
"2. Allow it to transact [anywhere](https://github.com/goat-sdk/goat/tree/main#chains-and-wallets)\n",
"3. Use more than [+200 tools](https://github.com/goat-sdk/goat/tree/main#tools)\n",
"\n",
"See everything GOAT supports [here](https://github.com/goat-sdk/goat/tree/main#chains-and-wallets).\n",
"\n",
"**Lightweight and extendable**\n",
"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.\n",
"\n",
"If you don't find what you need on our more than 200 integrations you can easily:\n",
"\n",
"- Create your own plugin\n",
"- Integrate a new chain\n",
"- Integrate a new wallet\n",
"- Integrate a new agent framework\n",
"\n",
"See how to do it [here](https://github.com/goat-sdk/goat/tree/main#-contributing)."
]
},
{
"cell_type": "markdown",
"id": "0730d6a1-c893-4840-9817-5e5251676d5d",
"metadata": {},
"source": [
"### Quickstarts\n",
"\n",
"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.\n",
"\n",
"- **By use case**\n",
" - **Money transmission**\n",
" - Send and receive payments [[EVM](https://github.com/goat-sdk/goat/tree/main/python/examples/by-use-case/evm-send-and-receive-tokens), [Solana](https://github.com/goat-sdk/goat/tree/main/python/examples/by-use-case/solana-send-and-receive-tokens)]\n",
" - **Investing**\n",
" - Generate yield [[Solana](https://github.com/goat-sdk/goat/tree/main/python/examples/by-use-case/solana-usdc-yield-deposit)]\n",
" - Purchase crypto assets [[EVM](https://github.com/goat-sdk/goat/tree/main/python/examples/by-use-case/evm-swap-tokens), [Solana](https://github.com/goat-sdk/goat/tree/main/python/examples/by-use-case/solana-swap-tokens)]\n",
"- **By wallet**\n",
" - [Crossmint](https://github.com/goat-sdk/goat/tree/main/python/examples/by-wallet/crossmint)\n",
"- **See all python quickstarts [here](https://github.com/goat-sdk/goat/tree/main/python/examples).**\n"
]
},
{
"cell_type": "markdown",
"id": "abd26764",
"metadata": {},
"source": [
"## Setup\n",
"\n",
"1. Install the core package and langchain adapter:\n",
"\n",
"```bash\n",
"pip install goat-sdk goat-sdk-adapter-langchain\n",
"```\n",
"\n",
"2. Install the type of wallet you want to use (e.g solana):\n",
"\n",
"```bash\n",
"pip install goat-sdk-wallet-solana\n",
"```\n",
"\n",
"3. Install the plugins you want to use in that chain:\n",
"\n",
"```bash\n",
"pip install goat-sdk-plugin-spl-token\n",
"```\n",
"\n",
"## Instantiation\n",
"\n",
"Now we can instantiate our toolkit:\n",
"\n",
"```python\n",
"from goat_adapters.langchain import get_on_chain_tools\n",
"from goat_wallets.solana import solana, send_solana\n",
"from goat_plugins.spl_token import spl_token, SplTokenPluginOptions\n",
"from goat_plugins.spl_token.tokens import SPL_TOKENS\n",
"\n",
"# Initialize Solana client\n",
"client = SolanaClient(os.getenv(\"SOLANA_RPC_ENDPOINT\"))\n",
"\n",
"# Initialize regular Solana wallet\n",
"keypair = Keypair.from_base58_string(os.getenv(\"SOLANA_WALLET_SEED\") or \"\")\n",
"wallet = solana(client, keypair)\n",
"\n",
"tools = get_on_chain_tools(\n",
" wallet=wallet,\n",
" plugins=[\n",
" send_solana(),\n",
" spl_token(SplTokenPluginOptions(\n",
" network=\"mainnet\", # Using devnet as specified in .env\n",
" tokens=SPL_TOKENS\n",
" )),\n",
" ],\n",
" )\n",
"```\n",
"\n",
"## Invocation\n",
"```python\n",
"tools[\"get_balance\"].invoke({ \"address\": \"0x1234567890123456789012345678901234567890\" })\n",
"```\n",
"\n",
"## Use within an agent\n",
"\n",
"```python\n",
"import os\n",
"import asyncio\n",
"from dotenv import load_dotenv\n",
"\n",
"# Load environment variables\n",
"load_dotenv()\n",
"\n",
"from solana.rpc.api import Client as SolanaClient\n",
"from solders.keypair import Keypair\n",
"\n",
"from goat_adapters.langchain import get_on_chain_tools\n",
"from goat_wallets.solana import solana, send_solana\n",
"from goat_plugins.spl_token import spl_token, SplTokenPluginOptions\n",
"from goat_plugins.spl_token.tokens import SPL_TOKENS\n",
"\n",
"# Initialize Solana client\n",
"client = SolanaClient(os.getenv(\"SOLANA_RPC_ENDPOINT\"))\n",
"\n",
"# Initialize regular Solana wallet\n",
"keypair = Keypair.from_base58_string(os.getenv(\"SOLANA_WALLET_SEED\") or \"\")\n",
"wallet = solana(client, keypair)\n",
"\n",
"# Initialize LLM\n",
"llm = ChatOpenAI(model=\"gpt-4o-mini\")\n",
"\n",
"def main():\n",
" # Initialize tools with Solana wallet\n",
" tools = get_on_chain_tools(\n",
" wallet=wallet,\n",
" plugins=[\n",
" send_solana(),\n",
" spl_token(SplTokenPluginOptions(\n",
" network=\"mainnet\", # Using devnet as specified in .env\n",
" tokens=SPL_TOKENS\n",
" )),\n",
" ],\n",
" )\n",
"\n",
" # Initialize agent\n",
" # Your agent code here\n",
"\n",
"\n",
"if __name__ == \"__main__\":\n",
" main()\n",
"```\n",
"\n",
"## API reference\n",
"\n",
"- For a complete list of tools, see the [GOAT SDK documentation](https://github.com/goat-sdk/goat).\n",
"\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -169,6 +169,14 @@ DATABASE_TOOL_FEAT_TABLE = {
},
}
FINANCE_TOOL_FEAT_TABLE = {
"GOAT": {
"link": "/docs/integrations/tools/goat",
"pricing": "Free",
"capabilities": "Create and receive payments, purchase physical goods, make investments, and more.",
},
}
TOOLS_TEMPLATE = """\
---
sidebar_position: 0
@@ -220,6 +228,12 @@ The following table shows tools that can be used to automate tasks in databases:
{database_table}
## Finance
The following table shows tools that can be used to execute financial transactions such as payments, purchases, and more:
{finance_table}
## All tools
import {{ IndexTable }} from "@theme/FeatureTables";
@@ -290,6 +304,22 @@ def get_database_table() -> str:
return "\n".join(["|".join(row) for row in rows])
def get_finance_table() -> str:
"""Get the table of finance tools."""
header = ["tool", "pricing", "capabilities"]
title = ["Tool/Toolkit", "Pricing", "Capabilities"]
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
for finance_tool, feats in sorted(FINANCE_TOOL_FEAT_TABLE.items()):
# Fields are in the order of the header
row = [
f"[{finance_tool}]({feats['link']})",
]
for h in header[1:]:
row.append(feats.get(h))
rows.append(row)
return "\n".join(["|".join(row) for row in rows])
def get_search_tools_table() -> str:
"""Get the table of search tools."""
header = ["tool", "pricing", "available_data"]
@@ -355,6 +385,7 @@ if __name__ == "__main__":
productivity_table=get_productivity_table(),
webbrowsing_table=get_webbrowsing_table(),
database_table=get_database_table(),
finance_table=get_finance_table(),
)
with open(output_integrations_dir / "tools" / "index.mdx", "w") as f:
f.write(tools_page)

View File

@@ -551,6 +551,11 @@ packages:
provider_page: naver
path: .
repo: e7217/langchain-naver-community
- name: goat-sdk-adapter-langchain
path: python/src/adapters/langchain
repo: goat-sdk/goat
name_title: GOAT SDK
provider_page: goat
- name: langchain-memgraph
path: .
repo: memgraph/langchain-memgraph