server-personification/README.md

1.5 KiB

server-personification

It would be funny if computers could talk.

This is a project to personify computer systems and give them a voice. OpenAI is used to create an agent you can converse with and use for server management.

Install

  1. Install Redis:

    sudo apt install -y redis && sudo systemctl enable --now redis-server

  2. Install dependencies:

    pip install -r requirements.txt

  3. Install the Chrome browser so the agent can use it in headless mode.

  4. Copy the config file:

    cp config.yml.sample config.yml

  5. Edit the config and fill in openai_key (required).

  6. Start the program with ./run.py

You can symlink ./launcher.sh to your ~/bin or whatever to easily start the program.

To Do

  • Cache per-hostname conversation history in a database. Store message timestamps as well. Summarize conversations.
  • Feed the conversation history to the AI and make sure to give it relative dates of the conversations as well.
  • Log all commands and their outputs to the database.
  • Implement context cutoff based on token counts
  • Option to have the bot send the user a welcome message when they connect
  • Streaming
  • Add a Matrix bot.
  • Integrate Icinga2 host and service checks functions.
  • Figure out system permissions and how to run as a special user.
  • Give the agent instructions on how to run the system (pulled from the database).
  • Have the agent run every n minutes to check Icinga2 and take action if necessary.