sidebar_position |
---|
2 |
Before getting started with Eliza, ensure you have:
- Node.js 23+ (using nvm is recommended)
- pnpm 9+
- Git for version control
- A code editor (VS Code, Cursor or VSCodium recommended)
- Flow-cli for Flow blockchain interaction.
Note for Windows Users: WSL 2 is required.
ElizaOnFlow is a Flow-dedicated Eliza extension, so:
- The plugins from this repository are also compatible with the origin Eliza.
- You can also use any plugins from origin Eliza in this repository.
# Clone the repository, with origin Eliza as submodule
git clone --recurse-submodules https://github.com/fixes-world/elizaOnFlow.git
# Enter directory
cd elizaOnFlow
# If you already cloned without submodules, please run:
git submodule update --init --recursive
Install dependencies
pnpm install --no-frozen-lockfile
Note: Please only use the
--no-frozen-lockfile
option when you're initially instantiating the repo or are bumping the version of a package or adding a new package to your package.json. This practice helps maintain consistency in your project's dependencies and prevents unintended changes to the lockfile.
Install Flow Cadence contracts dependencies
flow deps install
Build the local libraries
pnpm build
Copy .env.example to .env and fill in the appropriate values.
cp .env.example .env
Note:
.env
is optional. If you're planning to run multiple distinct agents, you can pass secrets through the character JSON. But the following guide will use.env
as example.
Edit .env
and add your values. Do NOT add this file to version control.
Eliza supports multiple AI models and you set which model to use inside the character JSON file. But remember, once you chosed a model, you need to set up the relevent configuration.
Check full list of supported LLMs in origin Eliza: Models.ts
Suggested models:
- Use API to access LLM providers
- OpenAI: set modelProvider as
openai
, and setOPENAI_API_KEY
in.env
- Deepseek: set modelProvider as
deepseek
, and setDEEPSEEK_API_KEY
in.env
- Grok: set modelProvider as
grok
, and setGROK_API_KEY
in.env
- OpenAI: set modelProvider as
- Use local inference
- Ollama: set modelProvider as
ollama
, and setOLLAMA_MODEL
in.env
to the model name you are using in ollama.
- Ollama: set modelProvider as
To choose model, you need to set in charactor configuration. For example: OPENAI, please set
modelProvider: "openai"
in charactor JSON file ormodelProvider: ModelProviderName.OPENAI
incharactor.ts
Create a new Flow account for the Agent, doc
flow accounts create
Set Flow blockchain configuration in .env
with new generated Flow account.
FLOW_ADDRESS=
FLOW_PRIVATE_KEY=
FLOW_NETWORK= # Default: mainnet
FLOW_ENDPOINT_URL= # Default: <https://mainnet.onflow.org>
Check out the deps/eliza/characters/
directory for a number of character files to try out.
Additionally you can override Eliza's defaultCharacter
by editting charactor.ts which will be default used if no character json provided.
Copy one of the example character files and make it your own
cp deps/eliza/characters/sbf.character.json characters/deep-thought.character.json
Inform it which character you want to run:
pnpm start --character="characters/deep-thought.character.json"
Or you can use pnpm start:debug
for more debugging logs.
pnpm start:debug --character="characters/deep-thought.character.json"
You can load multiple characters with a comma-separated list:
pnpm start --characters="characters/deep-thought.character.json, deps/eliza/characters/sbf.character.json"
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
Now you're ready to start a conversation with your agent.
Open a new terminal window and run the client's http server.
pnpm start:client
Once the client is running, you'll see a message like this:
➜ Local: http://localhost:5173/
Simply click the link or open your browser to http://localhost:5173/
. You'll see the chat interface connect to the system, and you can begin interacting with your character.
You can also connect your agent to social platforms like Twitter, Discord, and Telegram.
For example, connect with X (Twitter) by using @elizaos/client-twitter
:
- change
"clients": []
to"clients": ["twitter"]
in the character file to connect with X
For more details, please check the orgin Eliza's Platform Integration
Please check the orgin Eliza's Common Issues & Solutions