Skip to content

Commit 03182de

Browse files
committed
prepping for Eliza PR
1 parent d2b4adf commit 03182de

File tree

5 files changed

+124
-197
lines changed

5 files changed

+124
-197
lines changed

README.md

+116-38
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,151 @@
1-
![SBF](sbf.png)
1+
# Eliza 🤖
22

3-
# Eliza Solana Plugin Upgrade 🤖
3+
<div align="center">
4+
<img src="./docs/static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" />
5+
</div>
46

5-
This is a fork of the Eliza client repository with an improved Solana plug-in and a new character who handles all Solana based transactions: SBF.
7+
<div align="center">
68

7-
The transfer action in solana-plugin was split into two separate actions: SEND_SOL and SEND_TOKEN.
9+
📖 [Documentation](https://elizaos.github.io/eliza/) | 🎯 [Examples](https://github.com/thejoven/awesome-eliza)
810

9-
This way the agent can handle different transactions better than having both actions in one.
11+
</div>
1012

11-
Also added more detailed logging and transaction state monitoring.
13+
## 🌍 README Translations
1214

13-
WARNING: as of this fresh release, there are yet no confirmations before sending out SOL or SPL tokens, so use for experimentation only.
15+
[中文说明](./README_CN.md) | [日本語の説明](./README_JA.md) | [한국어 설명](./README_KOR.md) | [Persian](./README_FA.md) | [Français](./README_FR.md) | [Português](./README_PTBR.md) | [Türkçe](./README_TR.md) | [Русский](./README_RU.md) | [Español](./README_ES.md) | [Italiano](./README_IT.md) | [ไทย](./README_TH.md) | [Deutsch](./README_DE.md) | [Tiếng Việt](./README_VI.md) | [עִברִית](https://github.com/elizaos/Elisa/blob/main/README_HE.md) | [Tagalog](./README_TG.md) | [Polski](./README_PL.md) | [Arabic](./README_AR.md) | [Hungarian](./README_HU.md) | [Srpski](./README_RS.md) | [Română](./README_RO.md) | [Nederlands](./README_NL.md)
1416

15-
Works with client-twitter, too.
17+
## 🚩 Overview
1618

17-
# SBF handles Solana transactions
19+
<div align="center">
20+
<img src="./docs/static/img/eliza_diagram.png" alt="Eliza Diagram" width="100%" />
21+
</div>
1822

19-
As plugins and characters in Eliza agentic world go hand-in-hand, SBF is a character made for leveraging Solana plugin.
23+
## ✨ Features
2024

21-
# Setup the client
25+
- 🛠️ Full-featured Discord, Twitter and Telegram connectors
26+
- 🔗 Support for every model (Llama, Grok, OpenAI, Anthropic, etc.)
27+
- 👥 Multi-agent and room support
28+
- 📚 Easily ingest and interact with your documents
29+
- 💾 Retrievable memory and document store
30+
- 🚀 Highly extensible - create your own actions and clients
31+
- ☁️ Supports many models (local Llama, OpenAI, Anthropic, Groq, etc.)
32+
- 📦 Just works!
2233

23-
`cp .env.example .env`
34+
## Video Tutorials
2435

25-
Input your ANTHROPIC_API_KEY, SOLANA_PRIVATE_KEY and SOLANA_PUBLIC_KEY in .env.
36+
[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL)
2637

27-
I recommend using Anthropic's Claude, because the success rate of calling transfer actions is highly correlated with the intelligence of the AI used, but instead of ANTHROPIC_API_KEY, you can use any other model, so long as you specify it in the character.json file.
38+
## 🎯 Use Cases
2839

29-
If you plan on using the client-twitter feature, in sbf.character.json change `"clients": []` to `"clients": ["twitter"]`
40+
- 🤖 Chatbots
41+
- 🕵️ Autonomous Agents
42+
- 📈 Business Process Handling
43+
- 🎮 Video Game NPCs
44+
- 🧠 Trading
3045

31-
then you need to input your TWITTER_USERNAME, TWITTER_PASSWORD and TWITTER_EMAIL.
46+
## 🚀 Quick Start
3247

33-
Put in the usernames you want to target in TWITTER_TARGET_USERS separated by commas.
48+
### Prerequisites
3449

50+
- [Python 2.7+](https://www.python.org/downloads/)
51+
- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
52+
- [pnpm](https://pnpm.io/installation)
3553

36-
run `pnpm install --no-frozen-lockfile` and `pnpm build` to install dependencies and build the project.
54+
> **Note for Windows Users:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) is required.
3755
38-
run `pnpm start --character="characters/sbf.character.json"` to start SBF agent up.
56+
### Use the Starter (Recommended)
3957

40-
run `pnpm start:client` to start the client and chat with SBF using the client.
58+
```bash
59+
git clone https://github.com/elizaos/eliza-starter.git
60+
cd eliza-starter
61+
cp .env.example .env
62+
pnpm i && pnpm build && pnpm start
63+
```
4164

42-
NOTE: If something does not work, make the appropriate changes, delete the agent/data/db.sqlite file and `pnpm build` again to make sure your changes are reflected.
65+
Once the agent is running, you should see the message to run "pnpm start:client" at the end.
66+
Open another terminal and move to same directory and then run below command and follow the URL to chat to your agent.
4367

44-
# Using the Solana plug-in
68+
```bash
69+
pnpm start:client
70+
```
4571

46-
If you want the agent to send you SOL or SPL tokens, you need to simply tell the agent to do so.
72+
Then read the [Documentation](https://elizaos.github.io/eliza/) to learn how to customize your Eliza.
4773

48-
For example type "send 1.5 SOL to Ae8GkmtaJmr3MS3oKStkZyPHuQf3hawn53XD4bQjVQiu".
74+
### Manually Start Eliza (Only recommended if you know what you are doing)
4975

50-
This will send 1.5 SOL to the address Ae8GkmtaJmr3MS3oKStkZyPHuQf3hawn53XD4bQjVQiu.
76+
```bash
77+
# Clone the repository
78+
git clone https://github.com/elizaos/eliza.git
5179

52-
For sending SPL native tokens, apart from the destination address and amount, the token contract address is also needed.
80+
# Checkout the latest release
81+
# This project iterates fast, so we recommend checking out the latest release
82+
git checkout $(git describe --tags --abbrev=0)
83+
# If the above doesn't checkout the latest release, this should work:
84+
# git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
85+
```
5386

87+
### Start Eliza with Gitpod
5488

55-
example:
89+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main)
5690

57-
"send 69 GODS (CA: GEVqugYZESSzZaYU6SKdpW6znCCEtH7aoSTzPHbqpump) to Ae8GkmtaJmr3MS3oKStkZyPHuQf3hawn53XD4bQjVQiu"
91+
### Edit the .env file
5892

59-
That's it. Upon success, you will be sent a transaction hash.
93+
Copy .env.example to .env and fill in the appropriate values.
6094

61-
## extra feats in client-twitter
95+
```
96+
cp .env.example .env
97+
```
6298

63-
client-twitter was modified to a more sophisticated self-tweet handling - it will still process self-tweets if they're from target users.
99+
Note: .env is optional. If you're planning to run multiple distinct agents, you can pass secrets through the character JSON
64100

65-
Features:
66-
1. More sophisticated handling of self-tweets and target users
67-
2. Enhanced debugging capabilities
68-
3. More robust state handling and action processing
69-
4. Better formatting of character examples and actions
101+
### Automatically Start Eliza
70102

71-
Let SBF manage your Solana transactions.
103+
This will run everything to set up the project and start the bot with the default character.
72104

73-
*note: this message was sent from federal prison, but that's totally unrelated to any of this*
105+
```bash
106+
sh scripts/start.sh
107+
```
108+
109+
### Edit the character file
110+
111+
1. Open `packages/core/src/defaultCharacter.ts` to modify the default character. Uncomment and edit.
112+
113+
2. To load custom characters:
114+
- Use `pnpm start --characters="path/to/your/character.json"`
115+
- Multiple character files can be loaded simultaneously
116+
3. Connect with X (Twitter)
117+
- change `"clients": []` to `"clients": ["twitter"]` in the character file to connect with X
118+
119+
### Manually Start Eliza
120+
121+
```bash
122+
pnpm i
123+
pnpm build
124+
pnpm start
125+
126+
# The project iterates fast, sometimes you need to clean the project if you are coming back to the project
127+
pnpm clean
128+
```
129+
130+
#### Additional Requirements
131+
132+
You may need to install Sharp. If you see an error when starting up, try installing it with the following command:
133+
134+
```
135+
pnpm install --include=optional sharp
136+
```
137+
138+
### Community & contact
139+
140+
- [GitHub Issues](https://github.com/elizaos/eliza/issues). Best for: bugs you encounter using Eliza, and feature proposals.
141+
- [Discord](https://discord.gg/ai16z). Best for: sharing your applications and hanging out with the community.
142+
143+
## Contributors
144+
145+
<a href="https://github.com/elizaos/eliza/graphs/contributors">
146+
<img src="https://contrib.rocks/image?repo=elizaos/eliza" />
147+
</a>
148+
149+
## Star History
150+
151+
[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date)

README_original.md

-151
This file was deleted.

packages/plugin-solana/src/actions/transfer.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default {
101101
if (!isTransferContent(runtime, content)) {
102102
if (callback) {
103103
callback({
104-
text: "look, i need like, the token address and stuff to make this work. it's pretty basic protocol stuff, you know?",
104+
text: "Token address needed to send the token.",
105105
content: { error: "Invalid transfer content" },
106106
});
107107
}
@@ -158,7 +158,7 @@ export default {
158158

159159
if (callback) {
160160
callback({
161-
text: `yeah so like, i sent ${content.amount} tokens to ${content.recipient}\nhere's the receipt thing: ${signature}`,
161+
text: `Sent ${content.amount} tokens to ${content.recipient}\nTransaction hash: ${signature}`,
162162
content: {
163163
success: true,
164164
signature,
@@ -173,7 +173,7 @@ export default {
173173
elizaLogger.error("Error during token transfer:", error);
174174
if (callback) {
175175
callback({
176-
text: `uh... there might be a small issue with the transfer: ${error.message}`,
176+
text: `Issue with the transfer: ${error.message}`,
177177
content: { error: error.message },
178178
});
179179
}
@@ -192,7 +192,7 @@ export default {
192192
{
193193
user: "{{user2}}",
194194
content: {
195-
text: "cool cool, sending those tokens now...",
195+
text: "Sending the tokens now...",
196196
action: "SEND_TOKEN",
197197
},
198198
},

0 commit comments

Comments
 (0)