AutoGPT
AutoGPT copied to clipboard
Auto-GPT System Awareness
System Awareness
- [X] I have searched the existing issues
Summary 💡
Before going out to look at the internet It would be helpful if upon activation the AI took inventory of the system it was on and shared the available tools and capabilities and if they were insufficient begin researching and developing GAP tools to use during the session with the expressed request to push the GAP tools via PR back to the community
Examples 🌈
AI System initializing
- MacOS
- Python3
- Pip
- Shell Commands available...
- Desktop App skills available...
What are your goals?
Motivation 🔦
usuability
perhaps self-diagnostics and repair would be more appropriate concept
import os import subprocess
Define a function to analyze available tools and capabilities def analyze_system_capabilities(): # Get the operating system name os_name = os.name
Initialize the list of required tools
required_tools = []
Analyze available tools and capabilities based on the operating system
if os_name == 'posix': # Unix-like systems such as macOS and Linux # View system information subprocess.run(['uname', '-a'])
# List installed software
subprocess.run(['apt', 'list'])
# View hardware information
subprocess.run(['lshw'])
# Check if required packages or libraries are installed, and add them to the list if needed
required_packages = ['python3', 'pip']
for package in required_packages:
result = subprocess.run(['which', package], capture_output=True, text=True)
if not result.stdout:
required_tools.append(package)
elif os_name == 'nt': # Windows # View system information subprocess.run('systeminfo', shell=True)
# List installed software
subprocess.run('wmic product get name', shell=True)
# View hardware information
subprocess.run('dxdiag', shell=True)
# Check if required packages or libraries are installed, and add them to the list if needed
required_packages = ['python', 'pip']
for package in required_packages:
result = subprocess.run(['where', package], capture_output=True, text=True)
if not result.stdout:
required_tools.append(package)
else: print('Unsupported operating system')
Install any missing required tools
if required_tools: print(f'The following tools are required but missing: {", ".join(required_tools)}') install_command = ['pip', 'install'] + required_tools subprocess.run(install_command)
TODO: Add more analysis for specific tools and capabilities as needed
Define a function to initialize the GPT agent def initialize_gpt_agent(): # Analyze available tools and capabilities analyze_system_capabilities()
TODO: Add more initialization steps if needed
Start the agent
print('GPT agent initialized.') Call the function to initialize the GPT agent initialize_gpt_agent()
Like this?
related comments/efforts:
- https://github.com/Significant-Gravitas/Auto-GPT/issues/2987#issuecomment-1531131136
- https://github.com/Significant-Gravitas/Auto-GPT/issues/2987#issuecomment-1536929354
- #56
- https://github.com/Significant-Gravitas/Auto-GPT/issues/3820#issuecomment-1535732259
- #3911
After having tinkered around with agpt for a while now, we're also missing "meta" commands to inspect the workspace directory - which, after many runs, will often contain leftovers from previous sessions that could probably be used. The file logger or something similar could be used to encode some meta info for all these artifacts - list_files could probably be adapted easily if it were to also link in the info from file_logger.txt or some other source - to at least have /something/ to bootstrap the new session
There also is the distinction to be made between local and remote system capabilities (such as GPT 4 being available or not)
See also: #4127
Semi-related: https://github.com/Significant-Gravitas/Auto-GPT/pull/4548 will automatically install requirements.txt files of plugins that are in directories.
This issue was closed automatically because it has been stale for 10 days with no activity.