Skip to content

Commit a0814fe

Browse files
committed
agentkit doc edits
1 parent 31891ad commit a0814fe

File tree

4 files changed

+88
-78
lines changed

4 files changed

+88
-78
lines changed

docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/agentkit-flow-guide.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sidebar_position: 2
99

1010
AgentKit is an ecosystem-agnostic modular developer toolkit that lets you rapidly build, deploy, and iterate on AI agents using pre-configured environments and ready-to-use templates.
1111

12-
In this guide, you'll set up your own custom agent running on **Flow's EVM-compatible testnet**, powered by **Langchain** and **Anthropic's Claude** LLM.
12+
In this guide, you'll set up your own custom agent that runs on **Flow's EVM-compatible testnet**, powered by **Langchain** and **Anthropic's Claude** LLM.
1313

1414
---
1515

@@ -38,27 +38,27 @@ Follow the interactive setup:
3838

3939
## Project Setup
4040

41-
Once your scaffold is ready:
41+
When your scaffold is ready:
4242

4343
```bash
4444
cd onchain-agent
4545
npm install
4646
```
4747

48-
Now open the project in your preferred IDE (e.g. Cursor).
48+
Now open the project in your preferred integrated development environment (IDE) (for example, [Cursor](../cursor/index.md).
4949

5050
### Environment Configuration
5151

52-
1. Create a `.env.local` file (or edit the one generated).
52+
1. Create a `.env.local` file (or edit the one that you generated).
5353
2. Add your API keys (we'll use **Anthropic** here).
5454

5555
> You can also use OpenAI, DeepSeek, or any other supported LLM.
5656
5757
### Get Your Anthropic API Key
5858

59-
- Head to [Anthropic Console](https://console.anthropic.com/dashboard)
60-
- Create an account and **purchase credits**
61-
- Click **Create Key**, name it, and copy the API key
59+
- Head to [Anthropic Console](https://console.anthropic.com/dashboard).
60+
- Create an account and **purchase credits**.
61+
- Click **Create Key**, name it, and copy the API key.
6262
- Add this to your `.env.local`:
6363

6464
```env
@@ -67,11 +67,11 @@ ANTHROPIC_API_KEY=your_api_key_here
6767

6868
### Wallet Setup with MetaMask
6969

70-
1. Add [Flow Testnet](https://developers.flow.com/evm/using) to MetaMask
71-
2. Use the [Faucet](https://faucet.flow.com/fund-account) to fund your wallet
70+
1. Add [Flow Testnet](https://developers.flow.com/evm/using) to MetaMask.
71+
2. Use the [Faucet](https://faucet.flow.com/fund-account) to fund your wallet.
7272
3. Get your private key:
73-
- Click the `...` menu in MetaMask > **Account Details**
74-
- Enter your password, copy the private key
73+
- Click the `...` menu in MetaMask > **Account Details**.
74+
- Enter your password, copy the private key.
7575
4. Add it to `.env.local`:
7676

7777
```env
@@ -102,7 +102,7 @@ http://localhost:3000
102102

103103
## Configure Your LLM
104104

105-
If your agent doesn't respond yet no worries! You still need to configure your **LLM and client libraries**.
105+
If your agent doesn't respond yet, no worries! You still need to configure your **LLM and client libraries**.
106106

107107
### Choose a Model
108108

@@ -210,13 +210,13 @@ Want to skip the setup?
210210

211211
> [Fork the Flow AgentKit Starter](https://github.com/Aliserag/flow-agentkit-starter)
212212
213-
This starter includes all necessary config to start building immediately on Flow.
213+
This starter includes all of the necessary configurations to start building immediately on Flow.
214214

215215
---
216216

217217
## Adding AgentKit to an Existing Project
218218

219-
Already have a project and want to add AgentKit? Follow these steps to integrate it into your existing codebase:
219+
Already have a project and want to add AgentKit? Follow these steps to integrate it into your codebase:
220220

221221
### Install the Package
222222

docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/build-plugin.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,24 @@ keywords:
1414

1515
# Eliza Plugin Development Guide
1616

17-
Plugins are a powerful way to extend the functionality of your Eliza AI agents. This guide will walk you through the process of creating custom plugins that can enhance your agent's capabilities, from simple utilities to complex integrations with external services. You'll learn how to leverage the plugin system to create modular and reusable components for your AI agents.
17+
## Overview
18+
19+
Plugins are a powerful way to extend the functionality of your Eliza AI agents. This guide will walk you through the process of how to create custom plugins that can enhance your agent's capabilities, from simple utilities to complex integrations with external services. You'll learn how to leverage the plugin system to create modular and reusable components for your AI agents.
1820

1921
## Learning Objectives
2022

21-
By the end of this tutorial, you will be able to:
23+
After you complete this tutorial, you will be able to:
2224

23-
- Create a new plugin repository from the template
24-
- Understand the plugin development workflow
25-
- Implement custom actions and services
26-
- Integrate plugins with your Eliza agent
27-
- Register and publish plugins to the Eliza Plugin Registry
28-
- Use dependency injection for better plugin architecture
25+
- Create a new plugin repository from the template.
26+
- Understand the plugin development workflow.
27+
- Implement custom actions and services.
28+
- Integrate plugins with your Eliza agent.
29+
- Register and publish plugins to the Eliza Plugin Registry.
30+
- Use dependency injection for better plugin architecture.
2931

3032
## Prerequisites
3133

32-
Before getting started with Eliza, ensure you have:
34+
Before you get started with Eliza, make sure you have:
3335

3436
- [Node.js 23+] (using [nvm] is recommended)
3537
- [pnpm 9+]
@@ -41,17 +43,21 @@ Before getting started with Eliza, ensure you have:
4143
4244
## Quickstart
4345

44-
Please follow the [Quickstart Guide] to set up your development environment.
46+
Follow the [Quickstart Guide] to set up your development environment.
4547

4648
## Plugin Development
4749

4850
### Create a Plugin repository from Template
4951

50-
Visit [Eliza Plugin Template] and click on the "Use this template" button to create a new repository.
52+
Visit [Eliza Plugin Template] and click "Use this template" to create a new repository.
53+
54+
Or, you can create a new empty repository and copy the files from some examples at the [Eliza Plugins] organization.
5155

52-
Or you can create a new empty repository and copy the files from some examples at [Eliza Plugins] organization.
56+
:::note
5357

54-
> Note: Flow's Eliza plugin template is using Dependency Injection(`@elizaos-plugins/plugin-di`), you can learn more about the Dependency Injection in the [plugin's README.md]. It allows you can use `Class` instead of `Object` for your `Actions`, `Providers`, `Services`, and etc. **If you don't want to use it, you can follow the other examples in Eliza Plugins organiazation.**
58+
Flow's Eliza plugin template uses Dependency Injection(`@elizaos-plugins/plugin-di`). You can learn more about the Dependency Injection in the [plugin's README.md]. It allows you can use `Class` instead of `Object` for your `Actions`, `Providers`, `Services`, and so on. **If you don't want to use it, you can follow the other examples in Eliza Plugins organiazation.**
59+
60+
:::
5561

5662
### Add the Plugin repository to your Eliza project
5763

@@ -77,7 +83,7 @@ Add the plugin to agent's `package.json`
7783
pnpm add @elizaos-plugins/plugin-foo@'workspace:*' --filter ./agent
7884
```
7985

80-
Check the `agent/package.json` to ensure the plugin is added, you should see something like this:
86+
Check the `agent/package.json` to make sure the plugin is added. You'll see something like this:
8187

8288
```json
8389
{
@@ -89,7 +95,7 @@ Check the `agent/package.json` to ensure the plugin is added, you should see som
8995

9096
### Build the Plugin
9197

92-
Build the plugin using the following command:
98+
Build the plugin with the following command:
9399

94100
```bash
95101
pnpm build --filter ./packages/plugin-foo
@@ -113,7 +119,7 @@ Let's say you want to add the plugin to the `sample` character which is `charact
113119

114120
:::warning
115121

116-
If you are using Dependency Injection(`@elizaos-plugins/plugin-di`) in your plugin, remember to add it to the `postProcessors` field. And **`clients` field is deprecated** in the latest version of Eliza, so if you want to add clients you also need to use `plugins` field.
122+
If you use Dependency Injection(`@elizaos-plugins/plugin-di`) in your plugin, remember to add it to the `postProcessors` field. And **`clients` field is deprecated** in the latest version of Eliza, so if you want to add clients, you also need to use `plugins` field.
117123

118124
:::
119125

@@ -155,7 +161,7 @@ pnpm start:client
155161

156162
You need to register your plugin in the [Eliza Plugin Registry] to make it available for other users.
157163

158-
Please follow the guide there, modify the [index.json] and submit a PR to the registry repository.
164+
Follow the guide there, modify the [index.json] file, and submit a pull request (PR) to the registry repository.
159165

160166
## Conclusion
161167

docs/blockchain-development-tutorials/use-AI-to-build-on-flow/agents/eliza/index.md

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,24 @@ keywords:
1313

1414
# Quickstart Guide to build AI Agent on Flow with Eliza
1515

16-
Eliza is a powerful framework for building AI agents that can interact with users through natural language. This tutorial will guide you through setting up and deploying an AI agent on the Flow blockchain using Eliza. You'll learn how to create intelligent agents that can understand and respond to user queries, while leveraging Flow's secure and scalable infrastructure.
16+
## Overview
17+
18+
Eliza is a powerful framework for building AI agents that can interact with users through natural language. This tutorial will guide you through how to set up and deploy an AI agent on the Flow blockchain with Eliza. You'll learn how to create intelligent agents that can understand and respond to user queries, while leveraging Flow's secure and scalable infrastructure.
1719

1820
## Learning Objectives
1921

20-
By the end of this tutorial, you will be able to:
22+
After you complete this tutorial, you will be able to:
2123

22-
- Set up the Eliza development environment
23-
- Configure and deploy an AI agent on Flow
24-
- Create and customize character configurations
25-
- Integrate different AI models with your agent
26-
- Interact with your AI agent through a web interface
27-
- Add and develop custom plugins for extended functionality
24+
- Set up the Eliza development environment.
25+
- Configure and deploy an AI agent on Flow.
26+
- Create and customize character configurations.
27+
- Integrate different AI models with your agent.
28+
- Interact with your AI agent through a web interface.
29+
- Add and develop custom plugins for extended functionality.
2830

2931
## Prerequisites
3032

31-
Before getting started with Eliza, ensure you have:
33+
Before you get started started with Eliza, make sure you have:
3234

3335
- [Node.js 23+] (using [nvm] is recommended)
3436
- [pnpm 9+]
@@ -58,7 +60,7 @@ cd elizaOnFlow
5860
git checkout main
5961
```
6062

61-
Or, If you want to use the origin Eliza, please run:
63+
Or, If you want to use the origin Eliza, run:
6264

6365
```bash
6466
# Eliza's characters folder is a submodule
@@ -71,7 +73,7 @@ cd eliza
7173
git checkout $(git describe --tags --abbrev=0)
7274
```
7375

74-
If you already cloned without submodules, please run:
76+
If you already cloned without submodules, run:
7577

7678
```bash
7779
# Fetch submodules
@@ -86,11 +88,11 @@ pnpm install --no-frozen-lockfile
8688

8789
:::warning
8890

89-
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.
91+
Only use the `--no-frozen-lockfile` option when you're initially instantiating the repo or bump the version of a package or add a new package to your `package.json` file. This practice helps maintain consistency in your project's dependencies and prevents unintended changes to the lockfile.
9092

9193
:::
9294

93-
If you are using ElizaOnFlow, you need to install Flow Cadence contracts dependencies to ensure `*.cdc` be correctly linted by Cadence extension.
95+
If you use ElizaOnFlow, you need to install Flow Cadence contracts dependencies to ensure that the Cadence extension correctly lints `*.cdc`.
9496

9597
Install Flow Cadence contracts dependencies:
9698

@@ -106,37 +108,37 @@ pnpm build
106108

107109
## Configure Environment
108110

109-
Copy .env.example to .env and fill in the appropriate values.
111+
Copy `.env.example` to `.env` and fill in the appropriate values.
110112

111113
```bash
112114
cp .env.example .env
113115
```
114116

115117
:::danger
116118

117-
In normal development, it's a best practice to use a `.env` to protect API keys and other sensitive information. When working with crypto, it's **critical** to be disciplined and always use them, even in test projects or tutorials. If you expose a wallet key, you might lose everything in that wallet immediately, or someone might watch it for years and rug you the day you put something valuable there.
119+
In normal development, it's a best practice to use a `.env` to protect API keys and other sensitive information. When you work with crypto, it's **critical** to always use them, even in test projects or tutorials. If you expose a wallet key, you might lose everything in that wallet immediately, or someone might watch it for years and rob you the day you put something valuable there.
118120

119121
:::
120122

121-
Edit `.env` and add your values. Do NOT add this file to version control.
123+
Edit `.env` and add your values. Do **NOT** add this file to version control.
122124

123125
### Choose Your Model
124126

125127
Eliza supports multiple AI models and you set which model to use inside the character JSON file.
126-
But remember, once you chosed a model, you need to set up the relevant configuration.
128+
But remember, after you chosed a model, you need to set up the relevant configuration.
127129

128-
Check full list of supported LLMs in origin Eliza: [Models.ts]
130+
Check the full list of supported LLMs in origin Eliza: [Models.ts]
129131

130132
Suggested models:
131133

132-
- Use API to access LLM providers
133-
- OpenAI: set modelProvider as `openai`, and set `OPENAI_API_KEY` in `.env`
134-
- Deepseek: set modelProvider as `deepseek`, and set `DEEPSEEK_API_KEY` in `.env`
135-
- Grok: set modelProvider as `grok`, and set `GROK_API_KEY` in `.env`
134+
- Use API to access LLM providers:
135+
- OpenAI: set modelProvider as `openai`, and set `OPENAI_API_KEY` in `.env`.
136+
- Deepseek: set modelProvider as `deepseek`, and set `DEEPSEEK_API_KEY` in `.env`.
137+
- Grok: set modelProvider as `grok`, and set `GROK_API_KEY` in `.env`.
136138
- Use local inference
137-
- Ollama: set modelProvider as `ollama`, and set `OLLAMA_MODEL` in `.env` to the model name you are using in ollama.
139+
- Ollama: set modelProvider as `ollama`, and set `OLLAMA_MODEL` in `.env` to the model name you use in ollama.
138140

139-
> To choose model, you need to set in charactor configuration. For example: OPENAI, please set `modelProvider: "openai"` in charactor JSON file or `modelProvider: ModelProviderName.OPENAI` in `charactor.ts`
141+
> To choose a model, you need to set in charactor configuration. For example: OPENAI, set `modelProvider: "openai"` in charactor JSON file or `modelProvider: ModelProviderName.OPENAI` in `charactor.ts`
140142
141143
### Setup Agent's Flow Account
142144

@@ -146,9 +148,9 @@ Create a new Flow account for the Agent. Learn more: [doc]
146148
flow accounts create
147149
```
148150

149-
> If you are using Testnet, you can get free tokens from [Flow Faucet]
151+
> If you use Testnet, you can get free tokens from [Flow Faucet]
150152
151-
Set Flow blockchain configuration in `.env` with new generated Flow account.
153+
Set the Flow blockchain configuration in `.env` with a newly-generated Flow account.
152154

153155
```bash
154156
FLOW_ADDRESS=
@@ -157,16 +159,16 @@ FLOW_NETWORK= # Default: mainnet
157159
FLOW_ENDPOINT_URL= # Default: <https://mainnet.onflow.org>
158160
```
159161

160-
For testnet, please check Flow's [Networks] for more information.
162+
For testnet, check Flow's [Networks] for more information.
161163

162164
## Create Your First Agent
163165

164166
### Create a Character File
165167

166-
Check out the `deps/eliza/characters/` directory for a number of character files to try out.
167-
Additionally you can override Eliza's `defaultCharacter` by editting `charactor.ts` which will be default used if no character json provided.
168+
View the `deps/eliza/characters/` directory for a number of character files to try out.
169+
Additionally, you can edit `charactor.ts` to override Eliza's `defaultCharacter` file, which is the default character file used if no character json files are provided.
168170

169-
Copy one of the example character files and make it your own
171+
Copy one of the example character files and make it your own:
170172

171173
```bash
172174
cp characters/scooby.character.json characters/sample.character.json
@@ -176,13 +178,13 @@ cp characters/scooby.character.json characters/sample.character.json
176178

177179
### **Start the Agent**
178180

179-
Inform it which character you want to run:
181+
Tell it which character you want to run:
180182

181183
```bash
182184
pnpm start --character="characters/sample.character.json"
183185
```
184186

185-
Or you can use `pnpm start:debug` for more debugging logs:
187+
Or, you can use `pnpm start:debug` for more debugging logs:
186188

187189
```bash
188190
pnpm start:debug --character="characters/sample.character.json"
@@ -196,15 +198,15 @@ pnpm start --characters="characters/sample.character.json, characters/scooby.cha
196198

197199
### Add / Develop Plugins
198200

199-
run `npx elizaos plugins list` to get a list of available plugins or visit [Eliza Plugins Registry]
201+
Run `npx elizaos plugins list` to get a list of available plugins or visit [Eliza Plugins Registry]
200202

201-
run `npx elizaos plugins add @elizaos-plugins/plugin-NAME` to install the plugin into your instance
203+
Run `npx elizaos plugins add @elizaos-plugins/plugin-NAME` to install the plugin into your instance
202204

203-
To create a new plugin **for your own business**, you can refer to the [plugin development guide].
205+
To create a new plugin **for your own business**, refer to the [plugin development guide].
204206

205207
#### Additional Requirements
206208

207-
You may need to install Sharp. If you see an error when starting up, try installing it with the following command:
209+
You may need to install Sharp. If you see an error when starting up, install it with the following command:
208210

209211
```bash
210212
pnpm install --include=optional sharp
@@ -220,23 +222,23 @@ Open a new terminal window and run the client's http server.
220222
pnpm start:client
221223
```
222224

223-
Once the client is running, you'll see a message like this:
225+
After the client is running, you'll see a message like this:
224226

225227
```bash
226228
➜ Local: http://localhost:5173/
227229
```
228230

229-
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.
231+
Click the link or open your browser to `http://localhost:5173/`. You'll see the chat interface connect to the system, and you can now interact with your character.
230232

231233
## Common Issues & Solutions
232234

233-
Please check the orgin Eliza's [Common Issues & Solutions]
235+
Check the orgin Eliza's [Common Issues & Solutions]
234236

235237
## Conclusion
236238

237239
In this tutorial, you've learned how to build and deploy an AI agent on the Flow blockchain using Eliza. You've gained hands-on experience with setting up the development environment, configuring agents, creating character configurations, integrating AI models, and developing custom plugins.
238240

239-
The Eliza framework provides a powerful way to create intelligent agents that can understand and respond to user queries while leveraging Flow's secure and scalable infrastructure. By completing this tutorial, you now have the foundation to build more sophisticated AI agents and create unique user experiences through character customization and plugin development.
241+
The Eliza framework provides a powerful way to create intelligent agents that can understand and respond to user queries while leveraging Flow's secure and scalable infrastructure. Now taht you've completed this tutorial, you now have the foundation to build more sophisticated AI agents and create unique user experiences through character customization and plugin development.
240242

241243
[Node.js 23+]: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
242244
[nvm]: https://github.com/nvm-sh/nvm

0 commit comments

Comments
 (0)