513f59708088eb3d75258592ce17e0acc6d13067
Botbot
Botbot, your not so friendly Bot
A Matrix chat bot that listens to specified rooms, records conversations, leverages OpenAI for AI-driven summaries, and assists with answering questions.
Future Objectives
- Enhance discussion summaries to capture actionable items, deadlines, and decisions.
- Support additional AI backends beyond OpenAI (e.g., local LLMs, alternative APIs).
- Refine unanswered-question detection with customizable thresholds and notifications.
- Integrate with project management tools (e.g., Jira, Trello) for seamless task creation.
- Offer scheduled summary reports (daily, weekly) and export capabilities.
Current Features
- Auto-join Rooms: Automatically joins rooms when invited.
- Message Callbacks: Responds to basic commands:
!ping→Pong!hello botbot→ Greeting
- Conversation Recording: Persists room sync tokens and history to support summaries.
- AI Summaries: Uses OpenAI to generate summaries of discussions, extracting projects, subjects, schedules, etc.
- Unanswered Question Handling: Monitors messages and attempts to answer questions left unanswered after a configurable delay or when @botname is mentioned.
Prerequisites
- Docker & Docker Compose (or Python 3.8+)
- A Matrix account for the bot
- OpenAI API key
Installation
-
Clone the repository
git clone https://gitea.alluna.pt/jfig/botbot.git cd botbot -
Configure environment variables
Copy the example file and edit it:
cp .env.example .envThen open
.envand set:LOG_LEVEL=INFO HOMESERVER_URL=https://matrix.org USER_ID=@botbot_user:matrix.org PASSWORD=your_matrix_password OPENAI_API_KEY=your_openai_api_key
Usage
Using Docker Compose (development/hot-reload)
docker-compose up --build
Building and Running Manually (production)
# Build container
docker build -t botbot .
# Run container
docker run -d --env-file .env \
-v matrix_data:/app/data \
--restart unless-stopped \
botbot
Configuration Options
LOG_LEVEL: One ofCRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET.HOMESERVER_URL: Matrix homeserver endpoint (e.g.,https://matrix.org).USER_ID: Bot's full Matrix user ID (e.g.,@botbot_user:matrix.org).PASSWORD: Password for the bot account.OPENAI_API_KEY: API key for OpenAI usage.
How It Works
- Startup: Loads environment and logs into the Matrix homeserver.
- Callbacks:
message_callback: Handles text messages and triggers AI logic.invite_cb: Joins rooms on invitation.
- AI Integration: Future development will:
- Pull recent chat history.
- Call OpenAI endpoints to generate summaries or answers.
Contributing
- Fork the repository.
- Create a feature branch (
git checkout -b feature/xyz). - Commit changes and push (
git push origin feature/xyz). - Open a pull request with a description of your changes.
License
This project is licensed under the MIT License.
Description
Languages
Python
92.4%
Dockerfile
7.6%