Skip to content

Commit b15eb45

Browse files
authored
Merge pull request #9 from OriginTrail/improvements/code-cleanup
Code cleanup, readme update, added example character
2 parents ec1d92c + 9ec5656 commit b15eb45

File tree

4 files changed

+533
-475
lines changed

4 files changed

+533
-475
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ timeline_cache.json
4242

4343
*.sqlite
4444

45-
characters/
46-
4745
packages/core/src/providers/cache
4846
packages/core/src/providers/cache/*
4947
cache/*

README.md

Lines changed: 64 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,181 +1,112 @@
1-
# Eliza 🤖
1+
![image](https://github.com/user-attachments/assets/17da3a5f-aed1-43d4-ab83-d984a9cc06df)
22

3-
<div align="center">
4-
<img src="./docs/static/img/eliza_banner.jpg" alt="Eliza Banner" width="100%" />
5-
</div>
3+
# Elizagraph - DKG Eliza Agent starter kit
64

7-
<div align="center">
5+
ElizaOS agent powered by Knowledge Graph memories.
6+
Based on the ElizaOS plugin enabling integration with the OriginTrail Decentralized Knowledge Graph (DKG) for enhanced knowledge graph retrieval, search and knowledge management with ElizaOS agents.
87

9-
📑 [Technical Report](https://arxiv.org/pdf/2501.06781) | 📖 [Documentation](https://elizaos.github.io/eliza/) | 🎯 [Examples](https://github.com/thejoven/awesome-eliza)
8+
## Description
109

11-
</div>
10+
The DKG plugin extends ElizaOS functionality by allowing agents to create knowledge graph based memories in the form of Knowledge assets on the OriginTrail Decentralized Knowledge Graph. This plugin enables SPARQL-based searches on the DKG and combines these results with Eliza's regular search results. Additionally, it creates a memory as a Knowledge Asset on the DKG after a response, making it available for future SPARQL queries.
1211

13-
## 🌍 README Translations
12+
This is an experimental project. Feel free to clone, play around and contribute bug fixes or new features. Use this repo as a "agent starter repo". The plugin-dkg will be included into the official ElizaOS repo as well in the coming weeks
1413

15-
[中文说明](i18n/readme/README_CN.md) | [日本語の説明](i18n/readme/README_JA.md) | [한국어 설명](i18n/readme/README_KOR.md) | [Persian](i18n/readme/README_FA.md) | [Français](i18n/readme/README_FR.md) | [Português](i18n/readme/README_PTBR.md) | [Türkçe](i18n/readme/README_TR.md) | [Русский](i18n/readme/README_RU.md) | [Español](i18n/readme/README_ES.md) | [Italiano](i18n/readme/README_IT.md) | [ไทย](i18n/readme/README_TH.md) | [Deutsch](i18n/readme/README_DE.md) | [Tiếng Việt](i18n/readme/README_VI.md) | [עִברִית](i18n/readme/README_HE.md) | [Tagalog](i18n/readme/README_TG.md) | [Polski](i18n/readme/README_PL.md) | [Arabic](i18n/readme/README_AR.md) | [Hungarian](i18n/readme/README_HU.md) | [Srpski](i18n/readme/README_RS.md) | [Română](i18n/readme/README_RO.md) | [Nederlands](i18n/readme/README_NL.md) | [Ελληνικά](i18n/readme/README_GR.md)
14+
Check out the example agent running on X: https://x.com/ChatDKG
1615

17-
## 🚩 Overview
16+
## Features
1817

19-
<div align="center">
20-
<img src="./docs/static/img/eliza_diagram.png" alt="Eliza Diagram" width="100%" />
21-
</div>
18+
### 1. OriginTrail DKG Integration
2219

23-
## ✨ Features
20+
- Perform knowledge graph queries on the DKG for knowledge extraction (using SPARQL)
21+
- Combine DKG query results with Eliza's internal search capabilities.
22+
- Enhance responses with decentralized and trusted knowledge.
2423

25-
- 🛠️ Full-featured Discord, Twitter and Telegram connectors
26-
- 🔗 Support for every model (Llama, Grok, OpenAI, Anthropic, Gemini, 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-
- 📦 Just works!
24+
### 2. Knowledge Asset Creation
3225

33-
## Video Tutorials
26+
- Automatically generate Knowledge Assets based on interactions.
27+
- Publish memory Knowledge Assets to the DKG for future retrieval.
3428

35-
[AI Agent Dev School](https://www.youtube.com/watch?v=ArptLpQiKfI&list=PLx5pnFXdPTRzWla0RaOxALTSTnVq53fKL)
29+
## Providers
3630

37-
## 🎯 Use Cases
31+
### 1. DKG Search Provider
3832

39-
- 🤖 Chatbots
40-
- 🕵️ Autonomous Agents
41-
- 📈 Business Process Handling
42-
- 🎮 Video Game NPCs
43-
- 🧠 Trading
33+
- Executes SPARQL queries on the OriginTrail DKG.
34+
- Retrieves and formats relevant results.
35+
- Integrates DKG data with Eliza’s response system.
4436

45-
## 🚀 Quick Start
37+
## Plugins
4638

47-
### Prerequisites
39+
### 1. Memory Creation Plugin
4840

49-
- [Python 2.7+](https://www.python.org/downloads/)
50-
- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
51-
- [pnpm](https://pnpm.io/installation)
41+
- Creates Knowledge Assets from agent interactions.
42+
- Publishes assets to the DKG with contextual metadata.
5243

53-
> **Note for Windows Users:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) is required.
44+
## INSTALLATION
5445

55-
### Use the Starter (Recommended)
46+
## Prerequisites
5647

57-
```bash
58-
git clone https://github.com/elizaos/eliza-starter.git
59-
cd eliza-starter
60-
cp .env.example .env
61-
pnpm i && pnpm build && pnpm start
62-
```
48+
- Python 2.7+
49+
- Node.js 23+
50+
- pnpm
6351

64-
### Manually Start Eliza (Only recommended if you know what you are doing)
52+
## Development
6553

66-
#### Checkout the latest release
54+
1. Clone the repository
55+
2. Install dependencies:
6756

6857
```bash
69-
# Clone the repository
70-
git clone https://github.com/elizaos/eliza.git
71-
72-
# This project iterates fast, so we recommend checking out the latest release
73-
git checkout $(git describe --tags --abbrev=0)
74-
# If the above doesn't checkout the latest release, this should work:
75-
# git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
76-
```
77-
78-
#### Edit the .env file
79-
80-
Copy .env.example to .env and fill in the appropriate values.
81-
82-
```
83-
cp .env.example .env
58+
pnpm install
8459
```
8560

86-
Note: .env is optional. If you're planning to run multiple distinct agents, you can pass secrets through the character JSON
87-
88-
#### Start Eliza
89-
90-
```bash
91-
pnpm i
92-
pnpm build
93-
pnpm start
94-
95-
# The project iterates fast, sometimes you need to clean the project if you are coming back to the project
96-
pnpm clean
97-
```
98-
99-
### Interact via Browser
100-
101-
Once the agent is running, you should see the message to run "pnpm start:client" at the end.
102-
103-
Open another terminal, move to same directory, run the command below, then follow the URL to chat with your agent.
61+
3. Build the plugin:
10462

10563
```bash
106-
pnpm start:client
64+
pnpm run build
10765
```
10866

109-
Then read the [Documentation](https://elizaos.github.io/eliza/) to learn how to customize your Eliza.
110-
111-
---
112-
113-
### Automatically Start Eliza
114-
115-
The start script provides an automated way to set up and run Eliza:
67+
4. Run linting:
11668

11769
```bash
118-
sh scripts/start.sh
70+
pnpm run lint
11971
```
12072

121-
For detailed instructions on using the start script, including character management and troubleshooting, see our [Start Script Guide](./docs/docs/guides/start-script.md).
73+
## Usage
12274

123-
> **Note**: The start script handles all dependencies, environment setup, and character management automatically.
75+
### 1. Set Up Environment Variables
12476

125-
---
77+
- Copy the `.env.example` file and rename it to `.env`.
78+
- Fill in the necessary details:
79+
- Node information.
80+
- LLM key.
81+
- Twitter credentials.
12682

127-
### Modify Character
83+
### 2. Customize DKG Knowledge Asset & Query Templates
12884

129-
1. Open `packages/core/src/defaultCharacter.ts` to modify the default character. Uncomment and edit.
85+
- Modify the templates in `plugin-dkg/constants.ts` if you need to change the ontology or data format used in the Knowledge Graph.
13086

131-
2. To load custom characters:
132-
- Use `pnpm start --characters="path/to/your/character.json"`
133-
- Multiple character files can be loaded simultaneously
134-
3. Connect with X (Twitter)
135-
- change `"clients": []` to `"clients": ["twitter"]` in the character file to connect with X
87+
### 3. Create a Character and Run the Agent
13688

137-
---
89+
- Create a character file in the `characters` folder.
90+
- Run the character using the following command:
91+
```bash
92+
pnpm start --characters="characters/chatdkg.character.json"
93+
```
13894

139-
#### Additional Requirements
140-
141-
You may need to install Sharp. If you see an error when starting up, try installing it with the following command:
142-
143-
```
144-
pnpm install --include=optional sharp
145-
```
95+
### Notes
14696

147-
---
97+
- There is no need to manually add `plugin-dkg` to the `plugins` array; You should instead change the plugins imported in the agent/src/index.ts file.
98+
- Ensure you configure the Twitter client and select your LLM provider in the character settings.
14899

149-
### Start Eliza with Gitpod
150-
151-
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/elizaos/eliza/tree/main)
152-
153-
---
154-
155-
### Community & contact
156-
157-
- [GitHub Issues](https://github.com/elizaos/eliza/issues). Best for: bugs you encounter using Eliza, and feature proposals.
158-
- [Discord](https://discord.gg/ai16z). Best for: sharing your applications and hanging out with the community.
159-
160-
## Citation
161-
162-
We now have a [paper](https://arxiv.org/pdf/2501.06781) you can cite for the Eliza OS:
163-
```bibtex
164-
@article{walters2025eliza,
165-
title={Eliza: A Web3 friendly AI Agent Operating System},
166-
author={Walters, Shaw and Gao, Sam and Nerd, Shakker and Da, Feng and Williams, Warren and Meng, Ting-Chien and Han, Hunter and He, Frank and Zhang, Allen and Wu, Ming and others},
167-
journal={arXiv preprint arXiv:2501.06781},
168-
year={2025}
169-
}
170-
```
100+
## Dependencies
171101

172-
## Contributors
102+
- @elizaos/core: workspace:\*
103+
- SPARQL query library: workspace:\*
104+
- DKG JavaScript SDK: dkg.js > ^8.0.4
173105

174-
<a href="https://github.com/elizaos/eliza/graphs/contributors">
175-
<img src="https://contrib.rocks/image?repo=elizaos/eliza" alt="Eliza project contributors" />
176-
</a>
106+
## Contributing
177107

108+
Contributions are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information.
178109

179-
## Star History
110+
## License
180111

181-
[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date)
112+
This plugin is part of the Eliza project. See the main project repository for license information.

0 commit comments

Comments
 (0)