A plugin enabling integration with the OriginTrail Decentralized Knowledge Graph (DKG) for enhanced search and knowledge management capabilities in ElizaOS agents.
The DKG plugin extends ElizaOS functionality by allowing agents to interact with 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.
pnpm install @elizaos/plugin-dkg
- Perform SPARQL queries on the DKG for knowledge extraction.
- Combine DKG query results with Eliza's internal search capabilities.
- Enhance responses with decentralized and trusted knowledge.
- Automatically generate Knowledge Assets based on interactions.
- Publish memory Knowledge Assets to the DKG for future retrieval.
- Executes SPARQL queries on the OriginTrail DKG.
- Retrieves and formats relevant results.
- Integrates DKG data with Eliza’s response system.
- Creates Knowledge Assets from agent interactions.
- Publishes assets to the DKG with contextual metadata.
- Clone the repository
- Install dependencies:
pnpm install
- Build the plugin:
pnpm run build
- Run linting:
pnpm run lint
- Copy the
.env.example
file and rename it to.env
. - Fill in the necessary details:
- Node information.
- LLM key.
- Twitter credentials.
- Modify the templates in
plugin-dkg/constants.ts
if you need to change the ontology or data format used in the Knowledge Graph. - Check if the graph search provider is passing context to the agent (packages/client-twitter/src/interactions.ts, twitterMessageHandlerTemplate)
- Create a character file in the
characters
folder. - Run the character using the following command:
pnpm start --characters="characters/chatdkg.character.json"
- Ensure you configure the Twitter client and select your LLM provider in the character settings, also include the plugin in your agent.
- @elizaos/core: workspace:*
- SPARQL query library: workspace:*
- DKG JavaScript SDK: dkg.js > ^8.0.4
Contributions are welcome! Please see the CONTRIBUTING.md file for more information.
This plugin is part of the Eliza project. See the main project repository for license information.