Skip to main content

Openhands integrated with aact

Project description

Openhands x AAct

Overview

This project integrates the Openhands framework with AAct to create a runtime environment for executing actions and handling events. The openhands_node.py file defines the OpenHands class, which is a node that processes actions and communicates with a runtime environment.

Project Structure

  • openhands/: Contains the core implementation of the Openhands node and related utilities.

    • openhands_node.py: Main implementation of the OpenHands node.
    • utils.py: Contains utility classes and functions, including AgentAction and ActionType.
    • __init__.py: Marks the directory as a Python package.
  • examples/: Contains example configuration files.

    • openhands_node.toml: Configuration file for running the OpenHands node.
  • pyproject.toml: Configuration file for managing dependencies with Poetry.

Installation

To set up the project, ensure you have Python 3.12 installed. Then, follow these steps:

  1. Install Poetry: If you haven't already, install Poetry for dependency management.

    curl -sSL https://install.python-poetry.org | python3 -
    
  2. Install Dependencies: Navigate to the project directory and install the dependencies.

    poetry install
    

Setting Up Environment Variables

To run the OpenHands node, you need to set up your environment variables. Follow these steps:

  1. Obtain Modal API Keys:

    • Sign Up / Log In: Go to the Modal website and sign up or log in to your account.
    • Navigate to API Keys: Once logged in, navigate to the API keys section, usually found under account settings.
    • Generate API Keys: Generate a new API key pair. You should receive a MODAL_API_TOKEN_ID and a MODAL_API_TOKEN_SECRET.
    • Secure Your Keys: Store these keys securely. Do not share them publicly or commit them to version control.
  2. Create a .env File: Copy the env.example file to a new file named .env in the root of your project directory:

    cp env.example .env
    
  3. Edit the .env File: Open the .env file and replace the placeholder values with your actual API keys and URLs:

    MODAL_API_TOKEN_ID=your_actual_modal_api_token_id
    MODAL_API_TOKEN_SECRET=your_actual_modal_api_token_secret
    

Usage

Running the OpenHands Node

To run the OpenHands node with the provided configuration, use the following command:

poetry run aact run-dataflow examples/openhands_node.toml

Upon successful execution, you should see output similar to the following:

16:41:26 - openhands:INFO: openhands_node.py:120 - --------------------
16:41:26 - openhands:INFO: openhands_node.py:121 - RUNTIME CONNECTED
16:41:26 - openhands:INFO: openhands_node.py:122 - --------------------
16:41:26 - openhands:INFO: openhands_node.py:127 - Runtime initialization took 157.77 seconds.

Troubleshooting

If you encounter a ModuleNotFoundError, ensure that:

  • The directory structure is correct, and openhands_node.py is located in the openhands directory.
  • The openhands directory contains an __init__.py file.
  • The pyproject.toml file includes the openhands package in the [tool.poetry.packages] section.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or issues, please contact Arpandeep Khatua at arpandeepk@gmail.com.

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

aact_openhands-0.0.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

aact_openhands-0.0.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file aact_openhands-0.0.2.tar.gz.

File metadata

  • Download URL: aact_openhands-0.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for aact_openhands-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8544074fdc8e50d43a96ae524586e11aa5c5abf4e08df60a427ebdeb3e7b7059
MD5 515b15d8ac4b7baf7b6204d878678329
BLAKE2b-256 0097f87d20f93e818e29a3b646ba58136fb43fd241f5caeae34587feebe6d58e

See more details on using hashes here.

File details

Details for the file aact_openhands-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: aact_openhands-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for aact_openhands-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aef0ab3d41475aaa8261c13ba88ad76119a13d051ba85de967a4aadca84d8b51
MD5 f1c476cc45fb3b0e1ea99903273e2597
BLAKE2b-256 1d0e0736b7f7aeaea39a8ea34a4ff011c8739093f9181986250f029e7dca8629

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