Understanding how plugins are built
Plugins in Auto-GPT are built using a modular and extensible architecture. The exact process of building a plugin may vary depending on the type and complexity of the plugin.
Structure of a plugin
The plugin should be in its own folder and contain a __init__.py
, which contains the AutoGPTPluginsTemplate
class reference. Each of the class methods contains a method that determines whether the following method is active, for example:
post_prompt
is only active if can_ post_prompt
returns True
.
As we are limited to the plugin template, we can only use the methods that the template provides. Each method has a can_handle
method that returns a boolean
value, which is used to determine whether the plugin can handle the current prompt or method. The plugin methods are scattered all over the Auto-GPT code and allow plugins to add functions as commands that Auto-GPT can cognitively call to give Auto-GPT agents new abilities.
Here are some of...