From 4e2457b05d36640f08e001005c49242ab4af52e3 Mon Sep 17 00:00:00 2001 From: martin legrand Date: Thu, 20 Mar 2025 19:38:15 +0100 Subject: [PATCH 1/8] Doc: readme --- README.md | 36 ++++++++++++++++++++++++++++++------ requirements.txt | 8 +++++--- setup.py | 3 ++- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 728e98c..d00b1b9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ **A fully local alternative to Manus AI**, a voice-enabled AI assistant that codes, explores your filesystem, browse the web and correct it's mistakes all without sending a byte of data to the cloud. Built with reasoning models like DeepSeek R1, this autonomous agent runs entirely on your hardware, keeping your data private. -[![Visit AgenticSeek](https://img.shields.io/static/v1?label=Website&message=AgenticSeek&color=blue&style=flat-square)](https://fosowl.github.io/agenticSeek.html) ![License](https://img.shields.io/badge/license-GPL--3.0-green) ![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white) +[![Visit AgenticSeek](https://img.shields.io/static/v1?label=Website&message=AgenticSeek&color=blue&style=flat-square)](https://fosowl.github.io/agenticSeek.html) ![License](https://img.shields.io/badge/license-GPL--3.0-green) [![Discord](https://img.shields.io/badge/Discord-Join%20Us-7289DA?logo=discord&logoColor=white)](https://discord.gg/4Ub2D6Fj) + > 🛠️ **Work in Progress** – Looking for contributors! ![alt text](./media/whale_readme.jpg) @@ -51,7 +52,7 @@ ## **Installation** -Make sure you have chrome driver and docker installed. +Make sure you have chrome driver, docker and python3.10 (or newer) installed. For issues related to chrome driver, see the **Chromedriver** section. @@ -124,7 +125,7 @@ provider_server_address = 127.0.0.1:11434 start all services : ```sh -./start_services.sh +sudo ./start_services.sh ``` Run the assistant: @@ -149,7 +150,7 @@ Warning: currently the system that choose the best AI agent routing system will Make sure the services are up and running with `./start_services.sh` and run the agenticSeek with `python3 main.py` ```sh -./start_services.sh +sudo ./start_services.sh python3 main.py ``` @@ -246,7 +247,7 @@ provider_server_address = x.x.x.x:5000 Run the assistant: ```sh -./start_services.sh +sudo ./start_services.sh python3 main.py ``` @@ -267,7 +268,7 @@ provider_server_address = 127.0.0.1:5000 # can be set to anything, not used Run the assistant: ```sh -./start_services.sh +sudo ./start_services.sh python3 main.py ``` @@ -349,7 +350,30 @@ And download the chromedriver version matching your OS. ![alt text](./media/chromedriver_readme.png) +## Docker issues + +**Known error #1:** *chromedriver mismatch* + +``` +requests.exceptions.InvalidURL: Not supported URL scheme http+docker +Error: Failed to start containers. Check Docker logs with 'docker compose logs'. +Possible fixes: Run with sudo or ensure port 8080 is free. +``` + +**Solution:** + +Get the PID of program using port 8080: + +`lsof -i :8080` + +If a program appear and you are not using it, kill it with: + +`sudo kill -9 ` + +Run with sudo: `sudo ./start_services.sh` + ## FAQ + **Q: What hardware do I need?** 7B Model: GPU with 8GB VRAM. diff --git a/requirements.txt b/requirements.txt index d2eae9e..cff6b5b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ requests==2.31.0 -openai==1.61.1 colorama==0.4.6 python-dotenv==1.0.0 playsound==1.3.0 soundfile==0.13.1 -transformers==4.48.3 -torch==2.5.1 +transformers==4.46.3 +python-dotenv==1.0.0 +torch==2.4.1 ollama==0.4.7 scipy==1.15.1 kokoro==0.7.12 @@ -28,6 +28,8 @@ distro>=1.7.0,<2 jiter>=0.4.0,<1 sniffio tqdm>4 +# for api provider +openai # if use chinese ordered_set pypinyin diff --git a/setup.py b/setup.py index a309b45..1758d1d 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( include_package_data=True, install_requires=[ "requests==2.31.0", - "openai==1.61.1", + "openai", "colorama==0.4.6", "python-dotenv==1.0.0", "playsound==1.3.0", @@ -35,6 +35,7 @@ setup( "selenium==4.29.0", "markdownify==1.1.0", "text2emotion==0.0.5", + "python-dotenv==1.0.0", "langid==1.1.6", "httpx>=0.27,<0.29", "anyio>=3.5.0,<5", From 6a825cf3fd38fb4bfcf90a30b17681336d7e24e9 Mon Sep 17 00:00:00 2001 From: martin legrand Date: Fri, 21 Mar 2025 10:15:25 +0100 Subject: [PATCH 2/8] Fix: requirement version --- README.md | 22 ---------------------- requirements.txt | 4 ++-- searxng/docker-compose.yml | 1 + 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d00b1b9..6ba550f 100644 --- a/README.md +++ b/README.md @@ -350,28 +350,6 @@ And download the chromedriver version matching your OS. ![alt text](./media/chromedriver_readme.png) -## Docker issues - -**Known error #1:** *chromedriver mismatch* - -``` -requests.exceptions.InvalidURL: Not supported URL scheme http+docker -Error: Failed to start containers. Check Docker logs with 'docker compose logs'. -Possible fixes: Run with sudo or ensure port 8080 is free. -``` - -**Solution:** - -Get the PID of program using port 8080: - -`lsof -i :8080` - -If a program appear and you are not using it, kill it with: - -`sudo kill -9 ` - -Run with sudo: `sudo ./start_services.sh` - ## FAQ **Q: What hardware do I need?** diff --git a/requirements.txt b/requirements.txt index cff6b5b..1455329 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,9 +3,9 @@ colorama==0.4.6 python-dotenv==1.0.0 playsound==1.3.0 soundfile==0.13.1 -transformers==4.46.3 +transformers>=4.46.3 +torch>=2.4.1 python-dotenv==1.0.0 -torch==2.4.1 ollama==0.4.7 scipy==1.15.1 kokoro==0.7.12 diff --git a/searxng/docker-compose.yml b/searxng/docker-compose.yml index d3b4920..156b73f 100644 --- a/searxng/docker-compose.yml +++ b/searxng/docker-compose.yml @@ -1,3 +1,4 @@ +version: '3' services: redis: container_name: redis From 6e1ab5f103ff652e44c9cc0a5a2656167516c4f9 Mon Sep 17 00:00:00 2001 From: martin legrand Date: Fri, 21 Mar 2025 10:27:04 +0100 Subject: [PATCH 3/8] fix setup.py python version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1758d1d..c6278a0 100644 --- a/setup.py +++ b/setup.py @@ -62,5 +62,5 @@ setup( "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", ], - python_requires=">=3.6", + python_requires=">=3.9", ) From cb1a5c90e6167302676c269fa354b233d90bbf1a Mon Sep 17 00:00:00 2001 From: martin legrand Date: Fri, 21 Mar 2025 10:30:24 +0100 Subject: [PATCH 4/8] fix setup.py python version --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c6278a0..d839c9c 100644 --- a/setup.py +++ b/setup.py @@ -21,8 +21,8 @@ setup( "python-dotenv==1.0.0", "playsound==1.3.0", "soundfile==0.13.1", - "transformers==4.48.3", - "torch==2.5.1", + "transformers==4.46.3", + "torch>=2.4.1", "ollama==0.4.7", "scipy==1.15.1", "kokoro==0.7.12", From 6b69651a21cf8c505b1c02e6ce586afee577b9fc Mon Sep 17 00:00:00 2001 From: martin legrand Date: Fri, 21 Mar 2025 10:37:44 +0100 Subject: [PATCH 5/8] fix install setup requirement --- requirements.txt | 44 ++++++++++++++++++++-------------------- scripts/linux_install.sh | 2 ++ setup.py | 40 ++++++++++++++++++------------------ 3 files changed, 44 insertions(+), 42 deletions(-) diff --git a/requirements.txt b/requirements.txt index 1455329..db9b52c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,27 +1,27 @@ -requests==2.31.0 -colorama==0.4.6 -python-dotenv==1.0.0 -playsound==1.3.0 -soundfile==0.13.1 +requests>=2.31.0 +colorama>=0.4.6 +python-dotenv>=1.0.0 +playsound>=1.3.0 +soundfile>=0.13.1 transformers>=4.46.3 torch>=2.4.1 -python-dotenv==1.0.0 -ollama==0.4.7 -scipy==1.15.1 -kokoro==0.7.12 -flask==3.1.0 -soundfile==0.13.1 -protobuf==3.20.3 -termcolor==2.5.0 -ipython==8.34.0 -gliclass==0.1.8 -pyaudio==0.2.14 -librosa==0.10.2.post1 -selenium==4.29.0 -markdownify==1.1.0 -text2emotion==0.0.5 -langid==1.1.6 -chromedriver-autoinstaller==0.6.4 +python-dotenv>=1.0.0 +ollama>=0.4.7 +scipy>=1.15.1 +kokoro>=0.7.12 +flask>=3.1.0 +soundfile>=0.13.1 +protobuf>=3.20.3 +termcolor>=2.5.0 +ipython>=8.34.0 +gliclass>=0.1.8 +pyaudio>=0.2.14 +librosa>=0.10.2.post1 +selenium>=4.29.0 +markdownify>=1.1.0 +text2emotion>=0.0.5 +langid>=1.1.6 +chromedriver-autoinstaller>=0.6.4 httpx>=0.27,<0.29 anyio>=3.5.0,<5 distro>=1.7.0,<2 diff --git a/scripts/linux_install.sh b/scripts/linux_install.sh index 8222e20..c43a41e 100644 --- a/scripts/linux_install.sh +++ b/scripts/linux_install.sh @@ -5,6 +5,8 @@ echo "Starting installation for Linux..." # Update package list sudo apt-get update +pip install --upgrade pip + # Install Python dependencies from requirements.txt pip3 install -r requirements.txt diff --git a/setup.py b/setup.py index d839c9c..67b4487 100644 --- a/setup.py +++ b/setup.py @@ -15,28 +15,28 @@ setup( packages=find_packages(), include_package_data=True, install_requires=[ - "requests==2.31.0", + "requests>=2.31.0", "openai", - "colorama==0.4.6", - "python-dotenv==1.0.0", - "playsound==1.3.0", - "soundfile==0.13.1", - "transformers==4.46.3", + "colorama>=0.4.6", + "python-dotenv>=1.0.0", + "playsound>=1.3.0", + "soundfile>=0.13.1", + "transformers>=4.46.3", "torch>=2.4.1", - "ollama==0.4.7", - "scipy==1.15.1", - "kokoro==0.7.12", - "flask==3.1.0", - "protobuf==3.20.3", - "termcolor==2.5.0", - "gliclass==0.1.8", - "ipython==8.34.0", - "librosa==0.10.2.post1", - "selenium==4.29.0", - "markdownify==1.1.0", - "text2emotion==0.0.5", - "python-dotenv==1.0.0", - "langid==1.1.6", + "ollama>=0.4.7", + "scipy>=1.15.1", + "kokoro>=0.7.12", + "flask>=3.1.0", + "protobuf>=3.20.3", + "termcolor>=2.5.0", + "gliclass>=0.1.8", + "ipython>=8.34.0", + "librosa>=0.10.2.post1", + "selenium>=4.29.0", + "markdownify>=1.1.0", + "text2emotion>=0.0.5", + "python-dotenv>=1.0.0", + "langid>=1.1.6", "httpx>=0.27,<0.29", "anyio>=3.5.0,<5", "distro>=1.7.0,<2", From 6e2954d446a22a4c336940c99854a383e4c9c88f Mon Sep 17 00:00:00 2001 From: martin legrand Date: Fri, 21 Mar 2025 13:22:08 +0100 Subject: [PATCH 6/8] setup.py description --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 67b4487..002f842 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( version="0.1.0", author="Fosowl", author_email="mlg.fcu@gmail.com", - description="A Python project for agentic search and processing", + description="The open, local alternative to ManusAI", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/Fosowl/agenticSeek", From b40322dc2c6cbf3406bd833462118f43f4159d08 Mon Sep 17 00:00:00 2001 From: martin legrand Date: Fri, 21 Mar 2025 19:27:37 +0100 Subject: [PATCH 7/8] readme update & fix provider not auto downloading model --- README.md | 20 +++++++++----------- sources/llm_provider.py | 4 +++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6ba550f..ab8826f 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,7 @@ - **Memory**: Remembers what’s useful, your preferences and past sessions conversation. -- **Web Browsing**: Autonomous web navigation is underway. - +- **Web Browsing**: Autonomous web navigation. ### Searching the web with agenticSeek : @@ -278,22 +277,25 @@ python3 main.py ## Speech to Text -The speech to text is disabled by default, you can enable it by setting listen to true in the config.ini: +The speech-to-text functionality is disabled by default. To enable it, set the listen option to True in the config.ini file: ``` listen = True ``` -The speech to text will await for a AI name as a trigger keyword before it start listening, you can change the AI name by changing the agent_name in the config.ini: +When enabled, the speech-to-text feature listens for a trigger keyword, which is the agent's name, before it begins processing your input. You can customize the agent's name by updating the `agent_name` value in the *config.ini* file: ``` agent_name = Friday ``` -It will work better if you use a common english name like John or Emma. +For optimal recognition, we recommend using a common English name like "John" or "Emma" as the agent name -After hearing it's name agenticSeek will listen until it hear one of the following keyword for confirmation: +Once you see the transcript start to appear, say the agent's name aloud to wake it up (e.g., "Friday"). +Speak your query clearly. + +End your request with a confirmation phrase to signal the system to proceed. Examples of confirmation phrases include: ``` "do it", "go ahead", "execute", "run", "start", "thanks", "would ya", "please", "okay?", "proceed", "continue", "go on", "do that", "go it", "do you understand?" ``` @@ -321,7 +323,7 @@ provider_server_address = 127.0.0.1:5000 ``` `is_local`: should be True for any locally running LLM, otherwise False. -`provider_name`: Select the provider to use by its name, see the provider list above. +`provider_name`: Select the provider to use by it's name, see the provider list above. `provider_model`: Set the model to use by the agent. @@ -366,10 +368,6 @@ Deepseek R1 excels at reasoning and tool use for its size. We think it’s a sol Ensure Ollama is running (`ollama serve`), your `config.ini` matches your provider, and dependencies are installed. If none work feel free to raise an issue. -**Q: How to join the discord ?** - -Ask in the Community section for an invite. - **Q: Can it really run 100% locally?** Yes with Ollama or Server providers, all speech to text, LLM and text to speech model run locally. Non-local options (OpenAI or others API) are optional. diff --git a/sources/llm_provider.py b/sources/llm_provider.py index b3f30e9..2e74cd2 100644 --- a/sources/llm_provider.py +++ b/sources/llm_provider.py @@ -33,7 +33,7 @@ class Provider: if self.provider_name in self.unsafe_providers: pretty_print("Warning: you are using an API provider. You data will be sent to the cloud.", color="warning") self.api_key = self.get_api_key(self.provider_name) - elif self.server != "": + elif self.server != "ollama": pretty_print(f"Provider: {provider_name} initialized at {self.server}", color="success") self.check_address_format(self.server) if not self.is_ip_online(self.server.split(':')[0]): @@ -54,6 +54,7 @@ class Provider: Validate if the address is valid IP. """ try: + address = address.replace('http://', '') ip, port = address.rsplit(":", 1) if all(c.lower() in ".:abcdef0123456789" for c in ip): ipaddress.ip_address(ip) @@ -143,6 +144,7 @@ class Provider: if e.status_code == 404: animate_thinking(f"Downloading {self.model}...") ollama.pull(self.model) + self.ollama_fn(history, verbose) if "refused" in str(e).lower(): raise Exception("Ollama connection failed. is the server running ?") from e raise e From b1ad6433648bf1b06d7f49442905a8a695f38b30 Mon Sep 17 00:00:00 2001 From: martin legrand Date: Fri, 21 Mar 2025 19:34:57 +0100 Subject: [PATCH 8/8] Fix : pyaudio.paInt16 missing in AudioRecorder class init --- sources/speech_to_text.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/speech_to_text.py b/sources/speech_to_text.py index 776dce3..2d76c11 100644 --- a/sources/speech_to_text.py +++ b/sources/speech_to_text.py @@ -6,6 +6,7 @@ import torch from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline import time import librosa +import pyaudio audio_queue = queue.Queue() done = False @@ -14,7 +15,7 @@ class AudioRecorder: """ AudioRecorder is a class that records audio from the microphone and adds it to the audio queue. """ - def __init__(self, format: int, channels: int = 1, rate: int = 4096, chunk: int = 8192, record_seconds: int = 5, verbose: bool = False): + def __init__(self, format: int = pyaudio.paInt16, channels: int = 1, rate: int = 4096, chunk: int = 8192, record_seconds: int = 5, verbose: bool = False): import pyaudio self.format = format self.channels = channels