AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Auto-GPT System Awareness

Open dvelle opened this issue 1 year ago • 4 comments

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

dvelle avatar Apr 08 '23 21:04 dvelle

perhaps self-diagnostics and repair would be more appropriate concept

dvelle avatar Apr 08 '23 21:04 dvelle

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?

reconsumeralization avatar Apr 11 '23 00:04 reconsumeralization

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

Boostrix avatar May 07 '23 16:05 Boostrix

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

Boostrix avatar May 08 '23 19:05 Boostrix

Semi-related: https://github.com/Significant-Gravitas/Auto-GPT/pull/4548 will automatically install requirements.txt files of plugins that are in directories.

erik-megarad avatar Jun 02 '23 16:06 erik-megarad

This issue was closed automatically because it has been stale for 10 days with no activity.

github-actions[bot] avatar Sep 17 '23 01:09 github-actions[bot]