This project provides an experimental framework for building fully local AI agents. It now includes a small retrieval-augmented generation (RAG) example using the open-source Qwen model. The agent can respond using a local text-to-speech engine configured with a British accent.
- Works completely offline. Models are expected to be available locally.
- Simple FAISS index for document retrieval.
- Text-to-speech output using
pyttsx3. A British voice is selected by default, but you can specify any installed voice with thevoice_nameargument. Calllist_available_voices()to see voices detected on your system. - Example script
rag_assistant.pythat demonstrates question answering over a small set of documents. Conversation logs can optionally be stored in SurrealDB.
Run one_click_setup.sh on Linux/macOS or one_click_setup.bat on Windows to
create a virtual environment, install dependencies, and register the assistant
to start automatically whenever you log in. After running the script, the
assistant launches immediately and will auto-start on reboot.
- Download the desired Qwen model (for example
Qwen/Qwen-7B-Chat) and place it in a local directory. - Install dependencies (or just run the one-click script):
Alternatively, execute
pip install -r requirements.txt
./one_click_setup.shorone_click_setup.batwhich will install everything automatically. - Prepare a set of text documents you want the assistant to search through.
- Run the example:
Ask a question and the assistant will respond aloud with a British accent. To use a specific installed voice, pass the
python rag_assistant.py
voice_nameargument when creatingLocalRAGAssistant, e.g.LocalRAGAssistant(model_path="Qwen/Qwen-7B-Chat", voice_name="lottie"). You can also enable the BMAD Method and Evolve 2 workflow withuse_bmad=Trueand by passing a customEvolve2Workflowinstance.
You can store conversation history using a local SurrealDB instance. Run surreal start to launch the database, then execute the assistant with logging enabled:
python rag_assistant.pyThe default configuration assumes the database is available at http://localhost:8000 with the default root credentials. Results will be stored in a conversation table and can be inspected using the Surrealist UI.
A minimal React Native app is included in rn_app/. It provides a simple text-based interface to the assistant and is intended as a starting point for integrating the Evolve 2 workflow engine.
To run the React Native demo (dependencies must be installed beforehand):
cd rn_app
npm startThe demo uses placeholders for backend calls. Connect it to your local Python assistant or Evolve 2 service as needed.
workflow_engine.py includes minimal stubs for the BMAD Method and the
Evolve 2 workflow engine. Enable these components when creating
LocalRAGAssistant to preprocess input or orchestrate multi-step agent
behaviors.
You can create standalone binaries of rag_assistant.py using PyInstaller.
pip install pyinstaller
./build_exe.shRun the commands inside a Windows environment:
pip install pyinstaller
build_exe.batThe resulting executable will appear in the dist/ folder. Because PyInstaller
does not cross-compile, you must run the build command on each platform you want
to target.