Skip to Content

ElizaOS

This integration provides following methods:

  1. Use ElizaOS plugins within Alith: You can directly leverage a variety of plugins from the eliza ecosystem without the need to rewrite them in Alith. However, this method still requires you to handle complex template engineering to extract structured data from natural language.
  2. Enable the Alith plugin in ElizaOS: You can achieve multi-agent interaction by passing an instance of the Alith agent to the Alith plugin. Additionally, you can utilize Alith’s advanced features such as tools and extractors to develop complex plugins without the need for template engineering. This approach is simple and easy to use while benefiting from Alith’s high-performance inference optimization capabilities.
  • Install the dependency.
pnpm i elizaos-alith
  • Use ElizaOS plugins within Alith
import { Agent } from "elizaos-alith"; const agent = new Agent({ model: "gpt-4", runtime: // Set your custom elizaos agent runtime, preamble: "You are a calculator here to help the user perform arithmetic operations. Use the tools provided to answer the user question.", plugins: [ // Put your elizaos plugins here. ], }); const result = agent.prompt("Calculate 10 - 3"); console.log(result);
  • Enable the Alith plugin in ElizaOS
import { createAlithPlugin } from "elizaos-alith"; import { Agent } from "alith"; import { AgentRuntime } from "@elizaos/core"; const agent = new Agent({ model: "gpt-4", preamble: "You are a comedian here to entertain the user using humour and jokes.", }); const runtime = new AgentRuntime({ // Add Alith plugin in the ElizaOS agent runtime. plugins: [ createAlithPlugin(agent), // Omit other plugins ], // Omit other fields });
Last updated on