Skip to main content

aeiva is a general AI agent framework

Project description

AEIVA

AEIVA: An Evolving Intelligent Virtual Assistant

CN doc EN doc License: Apache 2.0

Introduction

In this project, our objective is to develop a modular and flexible intelligent agent and society system, designed as a virtual assistant capable of performing diverse tasks, learning from data, environment, and interactions, and self-evolving over time. The system will leverage deep learning models, primarily transformers, while also exploring innovative models and learning methods.

Our ultimate goal is to develop a General AI Agent System capable of forming a “genius society” of AI agents. These agents will:

  • Collaboratively address and solve societal challenges across domains.
  • Function in diverse environments, from virtual simulations to real-world applications.
  • Continuously evolve and improve through self-assessment and adaptation.
  • Serve as versatile assistants in various roles, such as AI researchers, software engineers, game players, or digital society members.

Currently, Aeiva supports the following interaction modes:

  • Chat in terminal: chat with an agent in the terminal interface
  • Chat with Gradio Webui: we developed a gradio web UI interface that allows user to chat with the agent. We plan to support multimodality in the near future.
  • Chat with desktop Waifu mode: by combining with our another project Maid, we can use our agent as the backend and call it through Maid desktop assistant.

⭐️ Documentation 👉 aeiva documentation

Key Features

Currently, we features with the following functionalities:

  • Rich Toolkits: I have implemented a series of different API tools and I'm keep improving the API library.
  • Open Operator: By implementing computer-use related tools, aeiva is able to understand and operate user's computer and complete daily tasks. We are keep enhancing the functionality in this part. Note: use this feature with caution!
  • Memory Palace: I have designed and implemented a layered memory palace for storaging agent memories. It is flexible and can be customized to represent and query different types of memories.

More functionalities and modules will be implemented gradually. Keep tuned! If you find any errors or bugs, feel free to report by opening an issue, thanks a lot!

Installation

To install AEIVA, follow these steps:

Prerequisites

  • Python 3.10 or newer
  • pip (Python package manager)

Option 1: Install via pip [recommended]

You can easily install vai pip by:

pip install aeiva

Option 2: Install from Repository

  1. Clone the AEIVA Repository

    First, clone the AEIVA repository to your local machine using Git:

    git clone https://github.com/chatsci/Aeiva.git
    cd Aeiva
    
  2. Create a Virtual Environment (Recommended) It's a good practice to create a virtual environment for Python projects. This keeps dependencies required by different projects separate. Use the following command to create a virtual environment with conda:

    conda create --name <my-env>
    

    Replace <my-env> with the name of your environment.

    To acivate your env:

    conda activate <my-env>
    

    For more advanced configurations or options, please check the online document of conda.

  3. Install Dependencies Install all dependencies listed in requirements.txt:

    pip install -r requirements.txt
    
  4. Install Aeiva Finally, install AEIVA using the setup.py script:

    python setup.py install
    
  5. Verify Installation To verify that AEIVA has been installed correctly, you can run the following command:

    python -c "import aeiva; print(aeiva.__version__)"
    

Dependencies

Our memory module utilizes different types of databases.

  1. Vector Database: Our memory module also utilizes vector database. Please install vector database such as milvus (recommended), chroma, qdrant, or weaviate.

  2. Graph Database: Ensure Neo4j is installed and the NEO4J_HOME environment variable is set.

  3. Relational Database: We use sqlite (recommended) or postgre sql.

Commands

After installing Neo4j and setting the environment variable, follow these steps to run different aeiva chat commands.

🪄⭐Aeiva Chat in Terminal Mode

Run the following command in terminal:

aeiva-chat-terminal --config configs/agent_config.yaml --verbose
  • Options:

    • --config or -c: Path to the configuration file (default: configs/agent_config.yaml).
    • --verbose or -v: Enable verbose logging for detailed output.
  • Using the Interface:

    • Interact with the chatbot directly in your terminal after running the command. * View Logs:
    • Logs are stored at ~/.aeiva/logs/aeiva-chat-terminal.log.
    • To monitor logs in real-time, use:
      tail -f ~/.aeiva/logs/aeiva-chat-terminal.log
      

You will see your terminal is like below:

Terminal Chatbot

🪄⭐Aeiva Chat in Gradio Mode

Run the following command in terminal:

aeiva-chat-gradio --config configs/agent_config.yaml --verbose
  • Options:

    • --config or -c: Path to the configuration file (default: configs/agent_config.yaml).
    • --verbose or -v: Enable verbose logging for detailed output.
  • Access the Gradio Interface:

  • View Logs:

    • Logs are stored at ~/.aeiva/logs/aeiva-chat-gradio.log.
    • To monitor logs in real-time, use:
      tail -f ~/.aeiva/logs/aeiva-chat-gradio.log
      

By visiting the gradio interface, you will see a gradio web-ui like below:


Gradio Chatbot


🪄⭐Aeiva Server

Run the following command in terminal:

aeiva-server --config configs/agent_config.yaml --host 0.0.0.0 --port 8000 --verbose
  • Options:
    • --config or -c: Path to the configuration file (default: configs/agent_config.yaml).
    • --host or -H: Host address to run the server on (default: 0.0.0.0).
    • --port or -p: Port number to run the server on (default: 8000).
    • --verbose or -v: Enable verbose logging for detailed output.
  • Access the Server:
    • Open your web browser and navigate to http://localhost:8000/docs to access the interactive API documentation.
  • View Logs:
    • Logs are stored at ~/.aeiva/logs/aeiva-server.log.
    • To monitor logs in real-time, use:
       tail -f ~/.aeiva/logs/aeiva-server.log
      

🪄⭐Maid Chat (Your Intelligent Assistant on Desktop!)

Run the following command in terminal to get an animated virtual assisatnt on your deskto that you can talk in voice mode or by typing:

maid-chat --config configs/agent_config.yaml --host 0.0.0.0 --port 8000 --verbose
  • Options:

    • --config or -c: Path to the configuration file (default: configs/agent_config.yaml).
    • --host or -H: Host address to run the server on (default: 0.0.0.0).
    • --port or -p: Port number to run the server on (default: 8000).
    • --verbose or -v: Enable verbose logging for detailed output.
  • Download Maid.app:

    • Download Maid.app from here.
  • Set MAID_HOME Environment Variable:

    • Unix/Linux/macOS:
      export MAID_HOME='/path/to/my/unity.app/Contents/MacOS/Maid - Your Intelligent Waifu !'
      source ~/.bashrc  # or source ~/.zshrc
      
    • Windows (Command Prompt):
      set MAID_HOME=C:\path\to\my\unity\app
      
    • Windows (PowerShell):
      $env:MAID_HOME = "C:\path\to\my\unity\app"
      
      Replace /path/to/my/unity/app or C:\path\to\my\unity\app with the actual path to your Unity application.
  • Using the Interface:

    • Interact with the server through the Maid.app Unity application after running the command.
  • View Logs:

    • Logs are stored at ~/.aeiva/logs/maid-chat.log.
    • To monitor logs in real-time, use:
    tail -f ~/.aeiva/logs/maid-chat.log
    
  • Troubleshooting:

    • Permission Denied Error When Starting Unity Application: If you encounter an error like:

      Error: Failed to start Unity application: [Errno 13] Permission denied: '/path/to/my/unity/app'
      

      Solution:

      • macOS Users:

        1. Open System Preferences.
        2. Navigate to Security & Privacy.
        3. Click on the Privacy tab.
        4. Select Accessibility from the sidebar.
        5. Click the lock icon to make changes and enter your password.
        6. Click the "+" button and add your terminal application (e.g., Terminal, iTerm).
        7. Ensure that your terminal application is checked, granting it the necessary permissions to run the Unity application.
      • Windows Users:

        1. Right-click on the Unity application executable.
        2. Select Properties.
        3. Go to the Compatibility tab.
        4. Check Run this program as an administrator.
        5. Click Apply, then OK.
        6. Try running the command again.

      Ensure that the MAID_HOME environment variable points to the correct path of your Unity application.

Demo of Maid-chat:

Maid Chat

Citation

To cite Aeiva in publications, please use the following BibTeX entries.

@misc{bang2024aeiva,
      title={Aeiva: An Evolving Intelligent Virtual Assistant}, 
      author={Bang Liu},
      year={2024},
      url={https://github.com/chatsci/Aeiva}
}

Contact

contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aeiva-0.8.2.5.tar.gz (362.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aeiva-0.8.2.5-py3-none-any.whl (606.8 kB view details)

Uploaded Python 3

File details

Details for the file aeiva-0.8.2.5.tar.gz.

File metadata

  • Download URL: aeiva-0.8.2.5.tar.gz
  • Upload date:
  • Size: 362.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.0.0

File hashes

Hashes for aeiva-0.8.2.5.tar.gz
Algorithm Hash digest
SHA256 642131c2762e7040cf6287d7ca11a9d0cfc3cdab812f1afe611bbf9c2d8387ec
MD5 93c8c693d273e9e243c524f09a2c02cc
BLAKE2b-256 11b12b13229b64c4ea4b9b7a1ae913d5ff1ae6d7858e2945c9a20c7c0c334a64

See more details on using hashes here.

File details

Details for the file aeiva-0.8.2.5-py3-none-any.whl.

File metadata

  • Download URL: aeiva-0.8.2.5-py3-none-any.whl
  • Upload date:
  • Size: 606.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/24.0.0

File hashes

Hashes for aeiva-0.8.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7929ef0125dbdb736f19baf4eec81799176370b279fcf6200d89b233a753667c
MD5 ada98aed25cc8bcf914b25dde0972ac8
BLAKE2b-256 2cc0a46e2b839006f4d592a856591d141a7fa474f14d3f5e0a75780dab1aceac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page