update readme

This commit is contained in:
martin
2025-06-14 17:15:48 +02:00
parent 807358937e
commit 8888f3c481
3 changed files with 133 additions and 32 deletions
+103 -26
View File
@@ -36,6 +36,7 @@ Disclaimer: This demo, including all the files that appear (e.g: CV_candidates.z
> 🙏 This project started as a side-project and has zero roadmap and zero funding. It's grown way beyond what I expected by ending in GitHub Trending. Contributions, feedback, and patience are deeply appreciated. > 🙏 This project started as a side-project and has zero roadmap and zero funding. It's grown way beyond what I expected by ending in GitHub Trending. Contributions, feedback, and patience are deeply appreciated.
## Prerequisites
Before you begin, ensure you have the following software installed: Before you begin, ensure you have the following software installed:
@@ -44,11 +45,6 @@ Before you begin, ensure you have the following software installed:
* **Docker Engine & Docker Compose:** For running bundled services like SearxNG. * **Docker Engine & Docker Compose:** For running bundled services like SearxNG.
* Install Docker Desktop (which includes Docker Compose V2): [Windows](https://docs.docker.com/desktop/install/windows-install/) | [Mac](https://docs.docker.com/desktop/install/mac-install/) | [Linux](https://docs.docker.com/desktop/install/linux-install/) * Install Docker Desktop (which includes Docker Compose V2): [Windows](https://docs.docker.com/desktop/install/windows-install/) | [Mac](https://docs.docker.com/desktop/install/mac-install/) | [Linux](https://docs.docker.com/desktop/install/linux-install/)
* Alternatively, install Docker Engine and Docker Compose separately on Linux: [Docker Engine](https://docs.docker.com/engine/install/) | [Docker Compose](https://docs.docker.com/compose/install/) (ensure you install Compose V2, e.g., `sudo apt-get install docker-compose-plugin`). * Alternatively, install Docker Engine and Docker Compose separately on Linux: [Docker Engine](https://docs.docker.com/engine/install/) | [Docker Compose](https://docs.docker.com/compose/install/) (ensure you install Compose V2, e.g., `sudo apt-get install docker-compose-plugin`).
* **Google Chrome:** The web browser used for autonomous browsing tasks. [Download Chrome](https://www.google.com/chrome/).
* **ChromeDriver:** The WebDriver for Chrome. This is crucial for browser automation.
* **Important:** Your ChromeDriver version *must* match your installed Google Chrome version. See the [ChromeDriver Installation](#chromedriver-installation) subsection for detailed instructions.
For issues related to ChromeDriver after attempting installation, see the [Known Issues](#chromedriver-issues) section.
### 1. **Clone the repository and setup** ### 1. **Clone the repository and setup**
@@ -58,20 +54,54 @@ cd agenticSeek
mv .env.example .env mv .env.example .env
``` ```
Modify your `config.ini` file: ### 2. Change the .env file content
```ini
[MAIN] ```sh
is_local = True SEARXNG_BASE_URL="http://127.0.0.1:8080"
provider_name = ollama # Or lm-studio, openai (for compatible local servers) REDIS_BASE_URL="redis://redis:6379/0"
provider_model = deepseekcoder:6.7b # Or the model you downloaded/selected for your provider WORK_DIR="/Users/mlg/Documents/workspace_for_ai"
provider_server_address = http://127.0.0.1:11434 # Default for Ollama. For LM-Studio, usually http://127.0.0.1:1234. Adjust if needed. OLLAMA_PORT="11434"
# ... other settings ... LM_STUDIO_PORT="1234"
CUSTOM_ADDITIONAL_LLM_PORT="11435"
OPENAI_API_KEY='optional'
DEEPSEEK_API_KEY='optional'
OPENROUTER_API_KEY='optional'
TOGETHER_API_KEY='optional'
GOOGLE_API_KEY='optional'
ANTHROPIC_API_KEY='optional'
``` ```
* **Important:**
* For `lm-studio` or other OpenAI-compatible local servers, ensure `provider_server_address` includes the `http://` prefix and the correct port. Update the `.env` file with your own values as needed:
* If using LM-Studio, set `provider_name = lm-studio`, not `openai`.
* If using a generic OpenAI-compatible local server, set `provider_name = openai`. - **SEARXNG_BASE_URL**: Leave unchanged
- **REDIS_BASE_URL**: Leave unchanged
- **WORK_DIR**: Path to your working directory on your local machine. AgenticSeek will be able to read and interact with these files.
- **OLLAMA_PORT**: Port number for the Ollama service.
- **LM_STUDIO_PORT**: Port number for the LM Studio service.
- **CUSTOM_ADDITIONAL_LLM_PORT**: Port for any additional custom LLM service.
**API Key are totally optional for user who choose to run LLM locally. Which is the primary purpose of this project. Leave empty if you have sufficient hardware**
### 3. **Start Docker**
Make sure Docker is installed and running on your system. You can start Docker using the following commands:
- **On Linux/macOS:**
Open a terminal and run:
```sh
sudo systemctl start docker
```
Or launch Docker Desktop from your applications menu if installed.
- **On Windows:**
Start Docker Desktop from the Start menu.
You can verify Docker is running by executing:
```sh
docker info
```
If you see information about your Docker installation, it is running correctly.
See the table of [Local Providers](#list-of-local-providers) below for a summary. See the table of [Local Providers](#list-of-local-providers) below for a summary.
@@ -79,6 +109,20 @@ See the table of [Local Providers](#list-of-local-providers) below for a summary
To run LLMs locally, you'll need sufficient hardware. At a minimum, a GPU capable of running Qwen/Deepseek 14B is required. See the FAQ for detailed model/performance recommendations. To run LLMs locally, you'll need sufficient hardware. At a minimum, a GPU capable of running Qwen/Deepseek 14B is required. See the FAQ for detailed model/performance recommendations.
Next step: [Run AgenticSeek locally](#start-services-and-run)
*See the [Troubleshooting](#troubleshooting) section if you are having issues.*
*If your hardware can't run LLMs locally, see [Setup to run with an API](#setup-to-run-with-an-api).*
*For detailed `config.ini` explanations, see [Config Section](#config).*
---
## Setup for running LLM locally on your machine
**Hardware Requirements:**
To run LLMs locally, you'll need sufficient hardware. At a minimum, a GPU capable of running Qwen/Deepseek 14B is required. See the FAQ for detailed model/performance recommendations.
**Setup your local provider** **Setup your local provider**
Start your local provider, for example with ollama: Start your local provider, for example with ollama:
@@ -100,7 +144,7 @@ See the **FAQ** at the end of the README for required hardware.
is_local = True # Whenever you are running locally or with remote provider. is_local = True # Whenever you are running locally or with remote provider.
provider_name = ollama # or lm-studio, openai, etc.. provider_name = ollama # or lm-studio, openai, etc..
provider_model = deepseek-r1:14b # choose a model that fit your hardware provider_model = deepseek-r1:14b # choose a model that fit your hardware
provider_server_address = http://127.0.0.1:11434 # Default for Ollama. Use http://127.0.0.1:1234 for LM-Studio. provider_server_address = 127.0.0.1:11434
agent_name = Jarvis # name of your AI agent_name = Jarvis # name of your AI
recover_last_session = True # whenever to recover the previous session recover_last_session = True # whenever to recover the previous session
save_session = True # whenever to remember the current session save_session = True # whenever to remember the current session
@@ -113,14 +157,29 @@ headless_browser = True # leave unchanged unless using CLI on host.
stealth_mode = True # Use undetected selenium to reduce browser detection stealth_mode = True # Use undetected selenium to reduce browser detection
``` ```
Next step: [Start services and run AgenticSeek](#start-services-and-run) **Warning**:
- The `config.ini` file format does not support comments.
Do not copy and paste the example configuration directly, as comments will cause errors. Instead, manually modify the `config.ini` file with your desired settings, excluding any comments.
- Do *NOT* set provider_name to `openai` if using LM-studio for running LLMs. Set it to `lm-studio`.
- Some provider (eg: lm-studio) require you to have `http://` in front of the IP. For example `http://127.0.0.1:1234`
**List of local providers**
| Provider | Local? | Description |
|-----------|--------|-----------------------------------------------------------|
| ollama | Yes | Run LLMs locally with ease using ollama as a LLM provider |
| lm-studio | Yes | Run LLM locally with LM studio (set `provider_name` to `lm-studio`)|
| openai | Yes | Use openai compatible API (eg: llama.cpp server) |
Next step: [Start services and run AgenticSeek](#Start-services-and-Run)
*See the [Troubleshooting](#troubleshooting) section if you are having issues.* *See the [Troubleshooting](#troubleshooting) section if you are having issues.*
*If your hardware can't run LLMs locally, see [Setup to run with an API](#setup-to-run-with-an-api).* *If your hardware can't run LLMs locally, see [Setup to run with an API](#setup-to-run-with-an-api).*
*For detailed `config.ini` explanations, see [Config Section](#config).* *For detailed `config.ini` explanations, see [Config Section](#config).*
---
## Setup to run with an API ## Setup to run with an API
This setup uses external, cloud-based LLM providers. You'll need an API key from your chosen service. This setup uses external, cloud-based LLM providers. You'll need an API key from your chosen service.
@@ -192,14 +251,26 @@ Next step: [Start services and run AgenticSeek](#Start-services-and-Run)
## Start services and Run ## Start services and Run
``` By default AgenticSeek is run fully in docker.
*Troubleshooting service start:* If these scripts fail, ensure Docker Engine is running and Docker Compose (V2, `docker compose`) is correctly installed. Check the output in the terminal for error messages. See [FAQ: Help! I get an error when running AgenticSeek or its scripts.](#faq-troubleshooting)
**Warning:** This step will download and load all Docker images, which may take up to 30 minutes. After starting the services, please wait until the backend service is fully running (you should see backend: <info> in the log) before sending any messages. The backend services may take longer to start than others. Start required services. This will start all services from the docker-compose.yml, including:
- searxng
- redis (required by searxng)
- frontend
- backend (if using `full`)
```sh
./start_services.sh full # MacOS
start ./start_services.cmd full # Window
```
**Warning:** This step will download and load all Docker images, which may take up to 30 minutes. After starting the services, please wait until the backend service is fully running (you should see **backend: "GET /health HTTP/1.1" 200 OK** in the log) before sending any messages. The backend services might take 5 minute to start on first run.
Go to `http://localhost:3000/` and you should see the web interface. Go to `http://localhost:3000/` and you should see the web interface.
**Optional:** Run with the CLI interface: *Troubleshooting service start:* If these scripts fail, ensure Docker Engine is running and Docker Compose (V2, `docker compose`) is correctly installed. Check the output in the terminal for error messages. See [FAQ: Help! I get an error when running AgenticSeek or its scripts.](#faq-troubleshooting)
**Optional:** Run on host (CLI mode):
To run with CLI interface you would have to install package on host: To run with CLI interface you would have to install package on host:
@@ -215,7 +286,8 @@ Start services:
start ./start_services.cmd # Window start ./start_services.cmd # Window
``` ```
Then run : `python3 cli.py` Use the CLI: `python3 cli.py`
--- ---
@@ -496,3 +568,8 @@ Were looking for developers to improve AgenticSeek! Check out open issues or
> [tcsenpai](https://github.com/tcsenpai) and [plitc](https://github.com/plitc) For helping with backend dockerization > [tcsenpai](https://github.com/tcsenpai) and [plitc](https://github.com/plitc) For helping with backend dockerization
## Sponsors:
5$ or more Monthly sponsor appear here:
- **tatra-labs**
+2
View File
@@ -34,6 +34,7 @@ dependencies = [
"pydantic-core>=2.27.2", "pydantic-core>=2.27.2",
"pypdf>=5.4.0", "pypdf>=5.4.0",
"pypinyin>=0.54.0", "pypinyin>=0.54.0",
"pyreadline3>=3.5.4",
"python-dotenv>=1.0.0", "python-dotenv>=1.0.0",
"requests>=2.31.0", "requests>=2.31.0",
"sacremoses>=0.0.53", "sacremoses>=0.0.53",
@@ -46,6 +47,7 @@ dependencies = [
"soundfile>=0.13.1", "soundfile>=0.13.1",
"termcolor>=2.4.0", "termcolor>=2.4.0",
"text2emotion>=0.0.5", "text2emotion>=0.0.5",
"together>=1.5.0",
"torch>=2.4.1", "torch>=2.4.1",
"tqdm>4", "tqdm>4",
"transformers>=4.46.3", "transformers>=4.46.3",
+27 -5
View File
@@ -337,9 +337,7 @@ class Provider:
def lm_studio_fn(self, history, verbose=False): def lm_studio_fn(self, history, verbose=False):
""" """
Use local lm-studio server to generate text. Use local lm-studio server to generate text.
lm studio use endpoint /v1/chat/completions not /chat/completions like openai
""" """
thought = ""
url = self.internal_url if self.in_docker else self.server_ip url = self.internal_url if self.in_docker else self.server_ip
route_start = f"{url}/v1/chat/completions" route_start = f"{url}/v1/chat/completions"
payload = { payload = {
@@ -348,16 +346,40 @@ class Provider:
"max_tokens": 4096, "max_tokens": 4096,
"model": self.model "model": self.model
} }
try:
response = requests.post(route_start, json=payload, timeout=30)
if response.status_code != 200:
raise Exception(f"LM Studio returned status {response.status_code}: {response.text}")
if not response.text.strip():
raise Exception("LM Studio returned empty response")
try: try:
response = requests.post(route_start, json=payload)
result = response.json() result = response.json()
except ValueError as json_err:
raise Exception(f"Invalid JSON from LM Studio: {response.text[:200]}") from json_err
if verbose: if verbose:
print("Response from LM Studio:", result) print("Response from LM Studio:", result)
return result.get("choices", [{}])[0].get("message", {}).get("content", "") choices = result.get("choices", [])
if not choices:
raise Exception(f"No choices in LM Studio response: {result}")
message = choices[0].get("message", {})
content = message.get("content", "")
if not content:
raise Exception(f"Empty content in LM Studio response: {result}")
return content
except requests.exceptions.Timeout:
raise Exception("LM Studio request timed out - check if server is responsive")
except requests.exceptions.ConnectionError:
raise Exception(f"Cannot connect to LM Studio at {route_start} - check if server is running")
except requests.exceptions.RequestException as e: except requests.exceptions.RequestException as e:
raise Exception(f"HTTP request failed: {str(e)}") from e raise Exception(f"HTTP request failed: {str(e)}") from e
except Exception as e: except Exception as e:
raise Exception(f"An error occurred: {str(e)}") from e if "LM Studio" in str(e):
raise # Re-raise our custom exceptions
raise Exception(f"Unexpected error: {str(e)}") from e
return thought return thought
def openrouter_fn(self, history, verbose=False): def openrouter_fn(self, history, verbose=False):