Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-GPT System Awareness #528

Closed
1 task done
dvelle opened this issue Apr 8, 2023 · 6 comments
Closed
1 task done

Auto-GPT System Awareness #528

dvelle opened this issue Apr 8, 2023 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers potential plugin This may fit better into our plugin system. Stale

Comments

@dvelle
Copy link

dvelle commented Apr 8, 2023

System Awareness

  • 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
Copy link
Author

dvelle commented Apr 8, 2023

perhaps self-diagnostics and repair would be more appropriate concept

@reconsumeralization
Copy link

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?

@Qoyyuum Qoyyuum added enhancement New feature or request good first issue Good for newcomers potential plugin This may fit better into our plugin system. labels Apr 16, 2023
@Boostrix
Copy link
Contributor

Boostrix commented May 8, 2023

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

@erik-megarad
Copy link
Contributor

Semi-related: #4548 will automatically install requirements.txt files of plugins that are in directories.

@github-actions github-actions bot added the Stale label Sep 6, 2023
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers potential plugin This may fit better into our plugin system. Stale
Projects
None yet
Development

No branches or pull requests

5 participants