diff --git a/Documents/docs/docs/features/automated-tasks/agent-tools-introduction.md b/Documents/docs/docs/features/automated-tasks/agent-tools-introduction.md new file mode 100644 index 00000000..ae5138b3 --- /dev/null +++ b/Documents/docs/docs/features/automated-tasks/agent-tools-introduction.md @@ -0,0 +1,111 @@ +# Agent Tools Introduction + +## Overview +The agent tools provide a comprehensive set of functionalities to interact with files, execute commands, search content, and perform web-related tasks. These tools are designed to help accomplish various computational and information-gathering tasks efficiently. + +## Available Tools + +### 1. Web and URL Tools +#### webSearch +- **Purpose**: Fetch the latest information from the web +- **Key Parameters**: + - `query`: Search query (required) + - `maxCharsPerPage`: Limit characters per page (optional, default: 6000) + - `numResults`: Number of search results (optional, default: 4) + +#### urlFetcher +- **Purpose**: Extract content from a specific URL +- **Key Parameters**: + - `url`: URL to fetch content from (required) + - `maxCharsPerPage`: Limit characters extracted (optional, default: 6000) + +### 2. File Management Tools +#### readFile +- **Purpose**: Read contents of a file +- **Key Parameters**: + - `relativeFilePath`: Path to the file to read (required) +- **Special Features**: + - Automatically extracts text from PDF and DOCX files + - Returns raw content as a string + +#### writeToFile +- **Purpose**: Write content to a file +- **Key Parameters**: + - `relativePath`: Path where file will be written (required) + - `content`: Full content to write (required) +- **Special Features**: + - Creates directories if they don't exist + - Overwrites existing files + +#### searchFiles +- **Purpose**: Perform regex search across multiple files +- **Key Parameters**: + - `relativePath`: Directory to search (required) + - `regex`: Regular expression pattern (required) + - `filePattern`: Optional file type filter (e.g., '*.ts') + +#### listFiles +- **Purpose**: List files and directories in a specified path +- **Key Parameters**: + - `relativePath`: Path to list contents (required) + - `recursive`: Whether to list files recursively (optional) + +### 3. Code and Development Tools +#### listCodeDefinitionNames +- **Purpose**: List top-level code definitions in a directory +- **Key Parameters**: + - `relativePath`: Directory to analyze (required) +- **Insights**: + - Reveals classes, functions, methods at the top level + - Helps understand code structure and architecture + +### 4. System and Command Tools +#### executeCommand +- **Purpose**: Run CLI commands on the system +- **Key Parameters**: + - `command`: CLI command to execute (required) + - `relativePath`: Optional directory to run the command + - `timeoutDuration`: Command execution timeout (default: 10 seconds) + +### 5. Web Interaction Tools +#### inspectSite +- **Purpose**: Capture initial state of a website +- **Key Parameters**: + - `url`: Website URL to inspect (required) +- **Features**: + - Takes full-page screenshot + - Captures initial console logs + - Does not interact with page after initial load + +### 6. Interactive Tools +#### askFollowUpQuestion +- **Purpose**: Gather additional information from the user +- **Key Parameters**: + - `question`: Specific question to ask (required) +- **Use Case**: Clarify ambiguities or request more details + +#### attemptCompletion +- **Purpose**: Present task results +- **Key Parameters**: + - `result`: Final task outcome (required) + - `command`: Optional CLI command to demonstrate result + +## Usage Guidelines +1. Choose the appropriate tool based on your specific task +2. Provide required parameters carefully +3. Use tools in a sequential, logical manner +4. Be mindful of file paths and system limitations + +## Best Practices +- Use `relativePath` to maintain context +- Validate inputs before executing commands +- Handle potential errors gracefully +- Leverage combination of tools for complex tasks + +## Limitations +- Some tools have character or result limits +- Network-dependent tools may have connectivity issues +- System-specific commands might not work across all environments + +## Security Note +Always verify commands and URLs to prevent unintended actions or security risks. diff --git a/Documents/docs/docs/features/automated-tasks/configuration.md b/Documents/docs/docs/features/automated-tasks/configuration.md index a025a48b..f117b93b 100644 --- a/Documents/docs/docs/features/automated-tasks/configuration.md +++ b/Documents/docs/docs/features/automated-tasks/configuration.md @@ -1 +1,34 @@ # Configuration + +You can configure the active tools which can be used in the automated tasks feature. +Below is a guide on how to configure the tools. + +## Configuration + +To toggle on or off the tools, click the magic wand icon on the bottom right of the code editor. + +![ToggleTools](/img/automatedTasks/ToggleTools.png) + +## Tools + +After clicking the magic wand icon, a list of tools will appear. You can toggle on or off the tools you want to use. + +![ToggleToolsList](/img/automatedTasks/ToggleToolsList.png) + +The three icons on the right side of the tool name are as follows: + +- Web Search: Search the web for information. The feature is further extended the capability of the LLM to able to use + latest information from the web. + + ![WebSearch](/img/automatedTasks/WebSearch.png) + +- Url Fetcher: Fetch information from a URL. The feature is able to let LLM fetch information from a URL, this mainly + used for fetching documentation or GitHub issues. Which can be used to fix bugs or implement new features. + + ![UrlFetcher](/img/automatedTasks/UrlFetcher.png) + +- Agent Tools: As the name is "Agent Tools", there is a bunch of tools that can be used to interact with the VSCode + editor. This is mainly used for automating tasks in the editor. We will discuss this in detail in the following + sections. + + ![AgentTools](/img/automatedTasks/AgentTools.png) diff --git a/Documents/sidebars.ts b/Documents/sidebars.ts index 7dd409ad..eacf2838 100644 --- a/Documents/sidebars.ts +++ b/Documents/sidebars.ts @@ -55,6 +55,7 @@ const sidebars: SidebarsConfig = { items: [ "docs/features/automated-tasks/configuration", "docs/features/automated-tasks/agent-tools", + "docs/features/automated-tasks/agent-tools-introduction", ], }, ], diff --git a/Documents/static/img/automatedTasks/AgentTools.png b/Documents/static/img/automatedTasks/AgentTools.png new file mode 100644 index 00000000..069c8a30 Binary files /dev/null and b/Documents/static/img/automatedTasks/AgentTools.png differ diff --git a/Documents/static/img/automatedTasks/ToggleTools.png b/Documents/static/img/automatedTasks/ToggleTools.png new file mode 100644 index 00000000..3d220d51 Binary files /dev/null and b/Documents/static/img/automatedTasks/ToggleTools.png differ diff --git a/Documents/static/img/automatedTasks/ToggleToolsList.png b/Documents/static/img/automatedTasks/ToggleToolsList.png new file mode 100644 index 00000000..42458d2c Binary files /dev/null and b/Documents/static/img/automatedTasks/ToggleToolsList.png differ diff --git a/Documents/static/img/automatedTasks/UrlFetcher.png b/Documents/static/img/automatedTasks/UrlFetcher.png new file mode 100644 index 00000000..69b2fdad Binary files /dev/null and b/Documents/static/img/automatedTasks/UrlFetcher.png differ diff --git a/Documents/static/img/automatedTasks/WebSearch.png b/Documents/static/img/automatedTasks/WebSearch.png new file mode 100644 index 00000000..d5fc8312 Binary files /dev/null and b/Documents/static/img/automatedTasks/WebSearch.png differ