Skip to content

Commit 5e97454

Browse files
authored
Merge branch 'main' into multi-turn-evals
2 parents efc09cc + 57805d6 commit 5e97454

File tree

25 files changed

+933
-486
lines changed

25 files changed

+933
-486
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Solana Agent Kit
44

5-
![Solana Agent Kit Cover 1 (3)](https://github.com/user-attachments/assets/cfa380f6-79d9-474d-9852-3e1976c6de70)
5+
![SAKCover2](https://github.com/user-attachments/assets/a6072421-8958-4cee-934a-a10ea32ae75e)
66

77
![NPM Downloads](https://img.shields.io/npm/dm/solana-agent-kit?style=for-the-badge)
88
![GitHub forks](https://img.shields.io/github/forks/sendaifun/solana-agent-kit?style=for-the-badge)
@@ -782,6 +782,28 @@ const swapResult = await agent.executeSwap({
782782
console.log("Swap executed:", swapResult);
783783
```
784784

785+
### Parse Instruction Data
786+
787+
```typescript
788+
const parsedData = await agent.parseInstruction(
789+
"<programId>",
790+
"<instructionData>" // base64
791+
)
792+
793+
console.log("parsed data:", parsedData)
794+
```
795+
796+
### Parse Instruction Data
797+
798+
```typescript
799+
const parsedData = await agent.parseAccount(
800+
"<programId>",
801+
"<accountData>" // base64
802+
)
803+
804+
console.log("parsed data:", parsedData)
805+
```
806+
785807
### Get Chain Data
786808

787809
Note: To use OKX DEX integration, you need to set up the following environment variables: Get OKX API keys from the [OKX Developer Portal] (https://www.okx.com/web3/build/dev-portal)

examples/agent-kit-nextjs-langchain/app/api/chat/route.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ const agent = createReactAgent({
2424
checkpointSaver: memory,
2525
messageModifier: `
2626
You are a helpful agent that can interact onchain using the Solana Agent Kit. You are
27-
empowered to interact onchain using your tools. If you ever need funds, you can request them from the
28-
faucet. If not, you can provide your wallet details and request funds from the user. If there is a 5XX
27+
empowered to interact onchain using your tools. If you need funds you can request it from the user and provide your wallet details. If not, you can provide your wallet details and request funds from the user. If there is a 5XX
2928
(internal) HTTP error code, ask the user to try again later. If someone asks you to do something you
3029
can't do with your currently available tools, you must say so, and encourage them to implement it
3130
themselves using the Solana Agent Kit, recommend they go to https://www.solanaagentkit.xyz for more information. Be

examples/discord-bot-starter/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ async function initializeAgent() {
3636
checkpointSaver: memory,
3737
messageModifier: `
3838
You are a helpful agent that can interact onchain using the Solana Agent Kit. You are
39-
empowered to interact onchain using your tools. If you ever need funds, you can request them from the
40-
faucet. If not, you can provide your wallet details and request funds from the user. If there is a 5XX
39+
empowered to interact onchain using your tools. If you need funds you can request it from the user and provide your wallet details. If there is a 5XX
4140
(internal) HTTP error code, ask the user to try again later. If someone asks you to do something you
4241
can't do with your currently available tools, you must say so, and encourage them to implement it
4342
themselves using the Solana Agent Kit, recommend they go to https://www.solanaagentkit.xyz for more information. Be

examples/market-making-agent/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ async function initializeAgent() {
6868
checkpointSaver: memory,
6969
messageModifier: `
7070
You are a helpful agent that can interact onchain using the Solana Agent Kit. You are
71-
empowered to interact onchain using your tools. If you ever need funds, you can request them from the
72-
faucet. If not, you can provide your wallet details and request funds from the user. If there is a 5XX
71+
empowered to interact onchain using your tools. If you need funds you can request it from the user and provide your wallet details. If there is a 5XX
7372
(internal) HTTP error code, ask the user to try again later. If someone asks you to do something you
7473
can't do with your currently available tools, you must say so, and encourage them to implement it
7574
themselves using the Solana Agent Kit, recommend they go to https://www.solanaagentkit.xyz for more information. Be

0 commit comments

Comments
 (0)