How to HyperMetaGPT | Setup and get up and running with HyperMetaGPT

How to setup, install and run HyperMetaGPT | Build an entire project with a single prompt

Arunabh Das
Developers Inc
7 min readOct 9, 2023

--

HyperMetaGPT

The full source code of HyperMetaGPT is available here

Introduction

We detail the steps for setup, installation and running HyperMetaGPT on your local machine.

Steps for installation

Clone the repo

First clone the repo for HyperMetaGPT to your local machine as below


git clone git@github.com:arunabhdas/HyperMetaGPT.git

Create conda environment

Next, create a local conda environment as below

conda create -n metagpt python=3.10.0

Activate the conda environment

conda activate metagpt

Check if node is installed

npm --version

node --version

Install mermaid-js as below


npm install -g @mermaid-js/mermaid-cli

Use requirements.txt or setup.py to install package dependencies


python setup.py install

pip install -r requirements.txt

Setup the API keys in config/key.yaml

Try to setup the key.yaml by adding OPEN_API_KEY and other keys in the format specified in the config/config.yaml file


# DO NOT MODIFY THIS FILE, create a new key.yaml, define OPENAI_API_KEY.
# The configuration of key.yaml has a higher priority and will not enter git

#### if OpenAI
## The official OPENAI_API_BASE is https://api.openai.com/v1
## If the official OPENAI_API_BASE is not available, we recommend using the [openai-forward](https://github.com/beidongjiedeguang/openai-forward).
## Or, you can configure OPENAI_PROXY to access official OPENAI_API_BASE.
OPENAI_API_BASE: "https://api.openai.com/v1"
#OPENAI_PROXY: "http://127.0.0.1:8118"
#OPENAI_API_KEY: "YOUR_API_KEY"
OPENAI_API_MODEL: "gpt-4"
MAX_TOKENS: 1500
RPM: 10

#### if Anthropic
#Anthropic_API_KEY: "YOUR_API_KEY"

#### if AZURE, check https://github.com/openai/openai-cookbook/blob/main/examples/azure/chat.ipynb
#### You can use ENGINE or DEPLOYMENT mode
#OPENAI_API_TYPE: "azure"
#OPENAI_API_BASE: "YOUR_AZURE_ENDPOINT"
#OPENAI_API_KEY: "YOUR_AZURE_API_KEY"
#OPENAI_API_VERSION: "YOUR_AZURE_API_VERSION"
#DEPLOYMENT_NAME: "YOUR_DEPLOYMENT_NAME"
#DEPLOYMENT_ID: "YOUR_DEPLOYMENT_ID"

#### for Search

## Supported values: serpapi/google/serper/ddg
#SEARCH_ENGINE: serpapi

## Visit https://serpapi.com/ to get key.
#SERPAPI_API_KEY: "YOUR_API_KEY"

## Visit https://console.cloud.google.com/apis/credentials to get key.
#GOOGLE_API_KEY: "YOUR_API_KEY"
## Visit https://programmablesearchengine.google.com/controlpanel/create to get id.
#GOOGLE_CSE_ID: "YOUR_CSE_ID"

## Visit https://serper.dev/ to get key.
#SERPER_API_KEY: "YOUR_API_KEY"

#### for web access

## Supported values: playwright/selenium
#WEB_BROWSER_ENGINE: playwright

## Supported values: chromium/firefox/webkit, visit https://playwright.dev/python/docs/api/class-browsertype
##PLAYWRIGHT_BROWSER_TYPE: chromium

## Supported values: chrome/firefox/edge/ie, visit https://www.selenium.dev/documentation/webdriver/browsers/
# SELENIUM_BROWSER_TYPE: chrome

#### for TTS

#AZURE_TTS_SUBSCRIPTION_KEY: "YOUR_API_KEY"
#AZURE_TTS_REGION: "eastus"

#### for Stable Diffusion
## Use SD service, based on https://github.com/AUTOMATIC1111/stable-diffusion-webui
SD_URL: "YOUR_SD_URL"
SD_T2I_API: "/sdapi/v1/txt2img"

#### for Execution
#LONG_TERM_MEMORY: false

#### for Mermaid CLI
## If you installed mmdc (Mermaid CLI) only for metagpt then enable the following configuration.
#PUPPETEER_CONFIG: "./config/puppeteer-config.json"
#MMDC: "./node_modules/.bin/mmdc"


### for calc_usage
# CALC_USAGE: false

### for Research
MODEL_FOR_RESEARCHER_SUMMARY: gpt-3.5-turbo
MODEL_FOR_RESEARCHER_REPORT: gpt-3.5-turbo-16k

### choose the engine for mermaid conversion,
# default is nodejs, you can change it to playwright,pyppeteer or ink
# MERMAID_ENGINE: nodejs

### browser path for pyppeteer engine, support Chrome, Chromium,MS Edge
#PYPPETEER_EXECUTABLE_PATH: "/usr/bin/google-chrome-stable"

PROMPT_FORMAT: json #json or markdown

Project Kickoff

Kickoff project implementation using the below example command


python startup.py "Write an Android app using Kotlin and Modern Android Development design patterns for creating a crypto wallet app which allows the wallet user to swap and trade crypto assets and also watch the prices of bitcoin, ether and various alt coins" --implement True

Before the project implementation, the docs are created by HyperMetaGPT

Docs

The following docs are produced in the workspace/crypto_wallet folder

Competitive Analysis

Data API Design

Sequence and Flow Diagram

System Design


## Implementation approach

We will use the Django framework for backend development and Django REST framework for API development. Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Django REST framework is a powerful and flexible toolkit for building Web APIs. For real-time tracking of Bitcoin, Ether and various alt coins, we will use the CoinGecko API which provides comprehensive cryptocurrency data. For secure trading and swapping of crypto assets, we will use the CCXT library which provides a unified way to interact with cryptocurrency exchanges. The app will be developed following the Model-View-Controller (MVC) design pattern.

## Python package name

crypto_wallet

## File list

- main.py
- models.py
- views.py
- urls.py
- serializers.py
- services.py

## Data structures and interface definitions


classDiagram
class User{
+str username
+str password
+str email
+dict assets
+register(username: str, password: str, email: str)
+login(username: str, password: str)
+trade(asset: str, amount: float)
+swap(asset1: str, asset2: str, amount: float)
}
class Asset{
+str name
+float price
+update_price()
}
User "1" -- "*" Asset: has

## Program call flow


sequenceDiagram
participant U as User
participant A as Asset
U->>U: register(username, password, email)
U->>U: login(username, password)
U->>A: trade(asset, amount)
U->>U: swap(asset1, asset2, amount)
A->>A: update_price()

## Anything UNCLEAR

The specific alt coins to be included in the app are not specified. The security measures to be implemented for trading and swapping crypto assets are also not detailed.

PRD

The below PRD is produced

## Original Requirements

Create an Android app using Kotlin and Modern Android Development design patterns for creating a crypto wallet app which allows the wallet user to swap and trade crypto assets and also watch the prices of bitcoin, ether and various alt coins

## Product Goals

- Provide a secure and efficient platform for trading and swapping crypto assets
- Offer real-time tracking of Bitcoin, Ether and various alt coins prices
- Ensure a user-friendly interface for easy navigation and usage

## User Stories

- As a user, I want to securely trade and swap my crypto assets without any hassle
- As a user, I want to monitor the prices of Bitcoin, Ether and various alt coins in real-time
- As a user, I want an intuitive interface that allows me to navigate the app easily

## Competitive Analysis

- Coinbase: Offers a secure platform for trading but lacks real-time tracking of alt coins
- Binance: Provides real-time tracking of various coins but the interface is not user-friendly
- Kraken: Offers a user-friendly interface but lacks efficient trading and swapping of crypto assets
- eToro: Provides efficient trading but lacks real-time tracking of Bitcoin and Ether
- Gemini: Offers real-time tracking of Bitcoin and Ether but lacks a user-friendly interface

## Competitive Quadrant Chart

quadrantChart
title Reach and engagement of campaigns
x-axis Low Reach --> High Reach
y-axis Low Engagement --> High Engagement
quadrant-1 We should expand
quadrant-2 Need to promote
quadrant-3 Re-evaluate
quadrant-4 May be improved
Coinbase: [0.3, 0.6]
Binance: [0.45, 0.23]
Kraken: [0.57, 0.69]
eToro: [0.78, 0.34]
Gemini: [0.40, 0.34]
Our Target Product: [0.5, 0.6]

## Requirement Analysis

The app should be developed using Kotlin and Modern Android Development design patterns. It should allow users to trade and swap crypto assets securely. The app should also provide real-time tracking of Bitcoin, Ether and various alt coins. The interface should be user-friendly for easy navigation and usage.

## Requirement Pool

- ['P0', 'Develop the app using Kotlin and Modern Android Development design patterns']
- ['P0', 'Implement a secure platform for trading and swapping crypto assets']
- ['P0', 'Integrate real-time tracking of Bitcoin, Ether and various alt coins']
- ['P1', 'Design a user-friendly interface for easy navigation and usage']

## UI Design draft

The app should have a clean and minimalist design with easy-to-read fonts and intuitive icons. The home screen should display the current prices of Bitcoin, Ether and various alt coins. There should be a separate section for trading and swapping crypto assets. The navigation should be intuitive and user-friendly.

## Anything UNCLEAR

The specific alt coins to be included in the app are not specified. The security measures to be implemented for trading and swapping crypto assets are also not detailed.

System Design


## Implementation approach

We will use the Django framework for backend development and Django REST framework for API development. Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Django REST framework is a powerful and flexible toolkit for building Web APIs. For real-time tracking of Bitcoin, Ether and various alt coins, we will use the CoinGecko API which provides comprehensive cryptocurrency data. For secure trading and swapping of crypto assets, we will use the CCXT library which provides a unified way to interact with cryptocurrency exchanges. The app will be developed following the Model-View-Controller (MVC) design pattern.

## Python package name

crypto_wallet

## File list

- main.py
- models.py
- views.py
- urls.py
- serializers.py
- services.py

## Data structures and interface definitions


classDiagram
class User{
+str username
+str password
+str email
+dict assets
+register(username: str, password: str, email: str)
+login(username: str, password: str)
+trade(asset: str, amount: float)
+swap(asset1: str, asset2: str, amount: float)
}
class Asset{
+str name
+float price
+update_price()
}
User "1" -- "*" Asset: has

## Program call flow


sequenceDiagram
participant U as User
participant A as Asset
U->>U: register(username, password, email)
U->>U: login(username, password)
U->>A: trade(asset, amount)
U->>U: swap(asset1, asset2, amount)
A->>A: update_price()

## Anything UNCLEAR

The specific alt coins to be included in the app are not specified. The security measures to be implemented for trading and swapping crypto assets are also not detailed.

Conclusion

HyperMetaGPT seems to be promising. However, the code that it output doesn’t seem to implement what was expected. Perhaps, improvements are needed before HyperMetaGPT replaces human software engineers.

--

--

Arunabh Das
Developers Inc

Sort of an executive-officer-of-the-week of a-techno-syndicalist commune. Cypherpunk, techno-idealist, peacenik, spiritual, humanist