-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Readme-File' into 'main'
Finish: Finish document for agent tools See merge request nsysu_mis_projects/misb114/course_mis324!34
- Loading branch information
Showing
8 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
111 changes: 111 additions & 0 deletions
111
Documents/docs/docs/features/automated-tasks/agent-tools-introduction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
33 changes: 33 additions & 0 deletions
33
Documents/docs/docs/features/automated-tasks/configuration.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.