AIOS (AI Agent Operating System)

repository·main·Indexed 27 days ago

https://github.com/agiresearch/aios

An AI Agent Operating System that embeds Large Language Models (LLMs) into the OS layer to manage scheduling, memory, storage, and tool execution. The project includes a kernel for resource management, the Cerebrum SDK for application development, and aios-rs, an experimental Rust rewrite scaffold (v0.1.0) defining core traits for context, memory, storage, tools, schedulers, and LLM adapters.

Tokens
14.4K
Snippets
38
Records
97
Agent score
91%

What's inside AIOS

  1. Overview of AIOS Architecture

    main

    AIOS (AI Agent Operating System) is designed to facilitate the development and deployment of LLM-based agents by managing resources like LLM, memory, storage, and tools. The architecture is split into two primary components:

    1. AIOS Kernel: An abstraction layer over the OS kernel that manages agent resources (LLM, memory, storage, tools). This repository contains the kernel.
    2. AIOS SDK (Cerebrum): Designed for developers and users to build and run agent applications by interacting with the kernel. The SDK is located in the Cerebrum repository.

    For computer-use agents, the kernel includes a specialized architecture with a redesigned Tool Manager that incorporates a VM (Virtual Machine) Controller and MCP Server to provide a sandboxed environment.

  2. Install VMware Workstation Pro or VMware Fusion

    main

    To use the VMware provider in AIOS, you must first install the appropriate virtualization software based on your operating system:

    • Linux: Download VMware Workstation Pro (version 17.5.1 is recommended). Run the .bundle installer using the --console flag.
    • Windows: Download VMware Workstation Pro. Ensure you are logged in as an Administrator or a user in the local Administrators group. Run the .exe installer and reboot if prompted.
    • macOS (Apple Silicon): Download VMware Fusion. Open the .dmg file and follow the 'Install Fusion' prompts. You will need to provide your administrator credentials and an activation key during installation.
  3. Configure the Virtual Environment Server

    main

    To set up a machine for the AIOS virtual environment, you must configure the system image to meet specific benchmark requirements. The main configuration areas include:

    1. Account Credentials: Use username user and password password to maintain compatibility with benchmark configurations.
    2. Service Setup: Configure a service that automatically starts at boot time.
    3. Accessibility Tree Support: Install necessary support packages for accessibility tree functionality.
    4. System Service Management: Disable interfering services like automatic updates and notification pop-ups.
    5. Required Software: Install all software packages required by your specific benchmark examples.
    6. Software Configuration: Configure packages (e.g., disabling auto-save or installing plugins).
    7. Port Configuration: Configure specific ports to allow the host machine to monitor and control software states.
    8. Miscellaneous Settings: Configure desktop environment settings and display resolution.
  4. Generate CSV from XLSX using LibreOffice CLI

    main

    Use the LibreOffice command line to convert an XLSX file to a CSV file. This is useful for sheet_print evaluation types.

    Command Syntax: libreoffice --convert-to "csv:Text - txt - csv (StarCalc):44,34,UTF8,,,,false,true,true,false,false,1" --out-dir <output_dir> <input_file>

    Note: The last integer in the conversion options string (e.g., 1) specifies the sheet number to export (starting from 1).

    libreoffice --convert-to "csv:Text - txt - csv (StarCalc):44,34,UTF8,,,,false,true,true,false,false,1" --out-dir /home/user /home/user/abc.xlsx
  5. Configure VLC HTTP Interface for remote control

    main

    To enable remote control of VLC via an HTTP interface:

    1. Open Tools > Preferences.
    2. At the bottom left, select All under Show settings.
    3. Expand Interface > Main interfaces and check Web.
    4. Expand Main interfaces > Lua.
    5. Under Lua HTTP, set a password in the password field.
    6. Save and Restart VLC.
    7. Access the interface at http://localhost:8080 using the password you set.
  6. Enable Chrome Remote Debugging

    main

    To allow tools like Playwright to control an existing Chrome instance, start Chrome with the --remote-debugging-port flag.

    1. Edit your Chrome shortcut properties.
    2. Append --remote-debugging-port=9222 to the end of the Target field.
    3. Example Target: "C:\Path\To\Chrome.exe" --remote-debugging-port=9222.
    4. Verify by navigating to http://localhost:9222 in a browser.
  7. Install VirtualBox for AIOS

    main

    To use VirtualBox as a provider in AIOS, follow these steps:

    1. Download: Get the installer from the official VirtualBox website.
      • Note for Apple Silicon: VirtualBox is not supported on Apple chips (M1, M2, etc.). Use VMware Fusion instead.
    2. Install: Run the installer and follow the provided instructions.
    3. Configure Windows PATH: If you are on Windows, you must add the VirtualBox installation directory to your system PATH environment variable to enable the VBoxManage command. The default path is typically C:\Program Files\Oracle\VirtualBox.
    4. Verify: Confirm the installation by running the version command in your terminal.
    VBoxManage --version
  8. Install the AIOS Kernel

    main

    To install the AIOS kernel, clone the repository and set up a Python environment (Python 3.10 or 3.11 is required). It is recommended to use uv for faster installation.

    Step 1: Clone and Environment Setup

    git clone https://github.com/agiresearch/AIOS.git
    # Using venv
    python3.x -m venv venv
    source venv/bin/activate
    # OR using conda
    conda create -n venv python=3.x
    conda activate venv

    Step 2: Install Dependencies

    For GPU environments:

    uv pip install -r requirements-cuda.txt
    # or with pip
    pip install -r requirements-cuda.txt

    For CPU-only environments:

    uv pip install -r requirements.txt
    # or with pip
    pip install -r requirements.txt
    git clone https://github.com/agiresearch/AIOS.git
    python3.x -m venv venv
    source venv/bin/activate
    uv pip install -r requirements-cuda.txt
  9. Submit a Pull Request to AIOS

    main

    To submit changes:

    1. Push your feature branch to your fork on GitHub.
    2. Click "Compare & pull request".
    3. Select the appropriate base branch:
      • Use the dev branch for new features.
      • Use the main branch if your changes do not affect original functions.
    4. Provide a clear title and description, and select relevant labels.