Flow-dedicated Autonomous Agents powered by Eliza.
Basic Features
Check out the Eliza's README
Extra Features
- Provide Flow-dedicated Agent without other extra blockchain dependencies runtime(by default).
- You can still use other blockchains if you want.
- Use InversifyJS for dependency injection.
- Share the same instances of providers across the application and plugins.
- All actions / evaluators / providers for plugins can be dynamically loaded and injected.
- Provide standard action / evaluator wrapper for plugins.
- Let develoeprs focus on the business logic of actions / evaluators.
- Use shared
flow.json
for all Flow Cadence contracts dependencies in Flow relevant plugins. - Both Flow EVM and Flow Cadence projects will be supported.
Note for Windows Users: WSL 2 is required.
# Clone the repository
git clone --recurse-submodules https://github.com/fixes-world/elizaOnFlow.git
# If you already cloned without submodules, run:
git submodule update --init --recursive
This will run everything to setup the project and start the bot with the default character.
sh scripts/start.sh
- Open
agent/src/character.ts
to apply modifications on the default character. - To load custom characters:
- Use
pnpm start --characters="path/to/your/character.json"
- Multiple character files can be loaded simultaneously
- Use
- Connect with X (Twitter)
- change
"clients": []
to"clients": ["twitter"]
in the character file to connect with X
- change
pnpm i
pnpm build
pnpm start
# The project iterates fast, sometimes you need to clean the project if you are coming back to the project
pnpm clean
All Flow Cadence contracts dependencies should be installed to flow.json
file.
To ensure development and deployment, you need to install all dependencies.
flow deps install
And if you want to add a new contract dependency, you can use the following command:
flow deps add mainnet://0xAddress.ContractName
Plugins from ElizaOnFlow is compatible with the original Eliza framework but you need to apply dependency injection when you use them. You can use the following code to use the plugins from ElizaOnFlow in the original Eliza framework.
# Import packages from ElizaOnFlow to your Eliza project
pnpm add @fixes-ai/core @fixes-ai/common
Open the agent/src/index.ts
file and add the following code:
// Import the normalizeCharacter function from the core package
import { normalizeCharacter } from "@fixes-ai/core";
// Load the character file
const startAgents = async () => {
// ... existing code
if (charactersArg) {
characters = await loadCharacters(charactersArg, defaultCharacter);
}
// Right after loading the characters
// Add this line to apply dependency injection and normalize characters, all dependencies will be injected
characters = await Promise.all(characters.map(normalizeCharacter));
// ... existing code
}
You may need to install Sharp. If you see an error when starting up, try installing it with the following command:
pnpm install --include=optional sharp
- GitHub Issues. Best for: bugs you encounter using ElizaOnFlow, and feature proposals.
- Fixes Telegram. Best for: sharing your applications and hanging out with the Fixes community.
- Eliza Discord
- Flow Discord