OpenClaw Assistant is a comprehensive AI-powered assistant project. It integrates various functionalities including web search, research paper retrieval (via arXiv), document parsing (PDFs), and a Retrieval-Augmented Generation (RAG) system. The project also features a Telegram bot interface, an API powered by FastAPI, and a task scheduler.
- API: Built with FastAPI and Uvicorn for serving requests.
- Telegram Bot: Integration with the
python-telegram-botlibrary to interact with users via Telegram. - Tools:
- Web Search: Uses
requestsandbeautifulsoup4for web scraping (e.g., DuckDuckGo searches). - arXiv Downloader: Leverages
feedparserto query and download research papers from arXiv. - PDF Parser: Uses
pypdfto extract text from documents.
- Web Search: Uses
- RAG (Retrieval-Augmented Generation):
- Vector embeddings via
sentence-transformers. - Vector database integration using
chromadb.
- Vector embeddings via
- Scheduler: Background task scheduling and reminders.
- Agents/Core logic: Modular architecture for AI agents and core application logic.
/api- FastAPI endpoints and server logic./agents- AI agents and prompt handling./core- Core business logic and configurations./data- Directory for storing local files like PDFs or databases./rag- Retrieval-Augmented Generation pipelines and database interactions./scheduler- Cron jobs, background tasks, and reminder services./telegram- Handlers and setup for the Telegram bot interface./tools- Utility scripts (e.g.,web_search.py,arxiv_downloader.py,pdf_parser.py).
- Clone the repository.
- Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows use: .venv\Scripts\activate
- Install the required dependencies:
pip install -r requirements.txt
The project uses python-dotenv for environment variable management. Create a .env file in the root directory and add any necessary configuration values (such as API keys, Telegram Bot Tokens, etc.).
(Provide specific commands based on your main entry points, e.g.:)
To run the API:
uvicorn api.main:app --reloadTo run the Telegram Bot:
python telegram/bot.py