This incremental re-architecture unifies Agent code and plugins, so everything is component-based. ## Breaking changes - Removed command categories and `DISABLED_COMMAND_CATEGORIES` environment variable. Use `DISABLED_COMMANDS` environment variable to disable individual commands. - Changed `command` decorator; old-style commands are no longer supported. Implement `CommandProvider` on components instead. - Removed `CommandRegistry`, now all commands are provided by components implementing `CommandProvider`. - Removed `prompt_config` from `AgentSettings`. - Removed plugin support: old plugins will no longer be loaded and executed. - Removed `PromptScratchpad`, it was used by plugins and is no longer needed. - Changed `ThoughtProcessOutput` from tuple to pydantic `BaseModel`. ## Other changes - Created `AgentComponent`, protocols and logic to execute them. - `BaseAgent` and `Agent` is now composed of components. - Moved some logic from `BaseAgent` to `Agent`. - Moved agent features and commands to components. - Removed check if the same operation is about to be executed twice in a row. - Removed file logging from `FileManagerComponent` (formerly `AgentFileManagerMixin`) - Updated tests - Added docs See [Introduction](https://github.com/kcze/AutoGPT/blob/kpczerwinski/open-440-modular-agents/docs/content/AutoGPT/component%20agent/introduction.md) for more information.
3.1 KiB
Built-in Components
This page lists all 🧩 Components and ⚙️ Protocols they implement that are natively provided. They are used by the AutoGPT agent.
SystemComponent
Essential component to allow an agent to finish.
DirectiveProvider
- Constraints about API budget
MessageProvider
- Current time and date
- Remaining API budget and warnings if budget is low
CommandProvider
finishused when task is completed
UserInteractionComponent
Adds ability to interact with user in CLI.
CommandProvider
ask_userused to ask user for input
FileManagerComponent
Adds ability to read and write persistent files to local storage, Google Cloud Storage or Amazon's S3. Necessary for saving and loading agent's state (preserving session).
DirectiveProvider
- Resource information that it's possible to read and write files
CommandProvider
read_fileused to read filewrite_fileused to write filelist_folderlists all files in a folder
CodeExecutorComponent
Lets the agent execute non-interactive Shell commands and Python code. Python execution works only if Docker is available.
CommandProvider
execute_shellexecute shell commandexecute_shell_popenexecute shell command with popenexecute_python_codeexecute Python codeexecute_python_fileexecute Python file
EventHistoryComponent
Keeps track of agent's actions and their outcomes. Provides their summary to the prompt.
MessageProvider
- Agent's progress summary
AfterParse
- Register agent's action
ExecutionFailuer
- Rewinds the agent's action, so it isn't saved
AfterExecute
- Saves the agent's action result in the history
GitOperationsComponent
CommandProvider
clone_repositoryused to clone a git repository
ImageGeneratorComponent
Adds ability to generate images using various providers, see Image Generation configuration to learn more.
CommandProvider
generate_imageused to generate an image given a prompt
WebSearchComponent
Allows agent to search the web.
DirectiveProvider
- Resource information that it's possible to search the web
CommandProvider
search_webused to search the web using DuckDuckGogoogleused to search the web using Google, requires API key
WebSeleniumComponent
Allows agent to read websites using Selenium.
DirectiveProvider
- Resource information that it's possible to read websites
CommandProvider
read_websiteused to read a specific url and look for specific topics or answer a question
ContextComponent
Adds ability to keep up-to-date file and folder content in the prompt.
MessageProvider
- Content of elements in the context
CommandProvider
open_fileused to open a file into contextopen_folderused to open a folder into contextclose_context_itemremove an item from the context
WatchdogComponent
Watches if agent is looping and switches to smart mode if necessary.
AfterParse
- Investigates what happened and switches to smart mode if necessary