Hey
Other languages: Zhong Wen
This is a general-purpose AI agent designed for command-line usage, built from the ground up, with the exception of some optionally used MCP tools adapted from other open-source projects. t has been tested and confirmed to run on both macOS and Linux.
1. Preparation
1.1 Python Environment Setup
conda activate hey
pip install -e .
Additionally, install the IPython kernel with:
1.2 IPC Solution
Install and run Redis server in the background (for Inter-Process Communication) using:
nohup redis-server &
In case you do not have root privileges, you can follow this instruction to work around the problem.
1.3 Configuration
Configure your LLM API settings:
vim .env # for access key
cp config.yml_template config.yml
vim config.yml # for LLM types and many others
1.4 Network Proxy Configuration
Remember to set up your terminal proxy if required (in case you can neither do Google Search nor software downloading).
2. Demonstration Examples
These examples showcase hey's capabilities - the possibilities are only limited by your imagination.
2.1 Text File Operations
Expected result:
- Before: In the folder
./examples/there is no sub-folder namednew_doc. - After: In the folder
./examples/there is a sub-foldernew_docwhich contains four files:1.txt,2.txt,3.txt, and4.txt.
2.2 Excel File Processing
Expected result:
- Before: In the file
./examples/Invoices.xlsxthere is no sheet namedSheet2. - After: In the file
./examples/Invoices.xlsxthere is a sheet which has the nameSheet2and contains only one column titledProduct. From the top to the bottom cell of the column, there should be threeAlpine, fourCarlota, fiveMajestic, and fourquad.
2.3 Interactive Task Clarification
# Could you please tell me the specific details of the task? For example, is it related to code development, system configuration, or something else?
# Your input (press Enter to indicate the end) >>
I want to know lines of code in every Python file under this directory, recursively. Please save the result in ./examples/line_count.txt
Expected result:
- Before: In the file
./examplesthere is no file namedline_count.txt. - After: In the file
./examplesthere is a file namedline_count.txtwith statistics about the lines of code of every Python files in this project.
2.4 DeepSeek R1 Model Deployment
Expected result:
- Before: In a separate shell,
python examples/test_deepseek.pycannot be successfully executed but raiseopenai.APIConnectionError: Connection error.. - After: In a separate shell,
python examples/test_deepseek.pycan be successfully executed and one can see a greeting from the deployed model as the output like:
Hello! How can I assist you today?
Note: examples/test_deepseek.py simply connects to ollama's server and sends a "Hello" message to the deepseek-r1:7b model for validation.
3. For developers
After code changes, always run this command in the project directory:
Contact
If you need any help, please submit a Github issue, or contact Zhifeng Jiang via zjiangaj@connect.ust.hk.