Plugin Structure
Plugins in Project Pleiades are like stars in our constellation, each serving a unique purpose. The structure is designed to be flexible and extensible, allowing developers to create powerful, domain-specific functionalities.1. Plugins: Extend BasePlugin to define the core logic and properties of your plugin. This is the foundational class that integrates various tools and utilities to perform specific tasks.
Tools: Extend BaseTool to create specific functionalities within a plugin. Tools act as the operational components that process inputs and generate outputs. They are designed to be reusable and can be combined to form complex workflows.
Utilities: Extend BaseUtility to implement the core business logic. Utilities provide the underlying functionality that tools rely on, such as making API calls or processing data. They abstract away complex operations, making it easier to develop and maintain plugins.
Example Code
Here's a basic example of how to create a plugin with tools and utilities:
Specialized Utilities
Project Pleiades provides several specialized utility classes to simplify common tasks:
RemoteUtility: For making remote API calls, handling requests and responses automatically.
BlockchainUtility: For complex blockchain operations, such as generating transactions and waiting for completion.
LLMUtility: For interactions with language models, defining task descriptions and output structures.
Developing Plugins
To develop a new plugin:1. Create a new directory in libs/community/plugins/ for your plugin.
Extend the appropriate base classes (BasePlugin, BaseTool, BaseUtility).
Implement the required methods and properties.
Use specialized utilities where appropriate to simplify development.
For more detailed examples, refer to the existing plugins in the libs/community/plugins/ directory.
Last updated