Skip to content

Agent Zero AI framework

browser-use fix

frdel3e187e8e314f
diff --git a/.gitignore b/.gitignore
index 7bc74397d..a1d30de3b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,4 +45,5 @@ instruments/**
!instruments/default/**
# Global rule to include .gitkeep files anywhere
-!**/.gitkeep
\ No newline at end of file
+!**/.gitkeep
+agent_history.gif
diff --git a/docker/exe/Dockerfile b/docker/exe/Dockerfile
deleted file mode 100644
index 9840f655c..000000000
--- a/docker/exe/Dockerfile
+++ /dev/null
@@ -1,53 +0,0 @@
-# Use the latest slim version of Debian
-FROM --platform=$TARGETPLATFORM debian:bookworm-slim
-
-# Set ARG for platform-specific commands
-ARG TARGETPLATFORM
-
-# Update and install necessary packages
-RUN apt-get update && apt-get install -y \
- python3 \
- python3-pip \
- python3-venv \
- nodejs \
- npm \
- openssh-server \
- sudo \
- curl \
- wget \
- git
-
-# Cleanup package list
-RUN rm -rf /var/lib/apt/lists/*
-
-# Set up SSH
-RUN mkdir /var/run/sshd && \
- echo 'root:toor' | chpasswd && \
- sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
-
-# Create and activate Python virtual environment
-ENV VIRTUAL_ENV=/opt/venv
-RUN python3 -m venv $VIRTUAL_ENV
-
-# Copy the script to ensure .bashrc is in the root directory
-COPY initialize.sh /usr/local/bin/initialize.sh
-RUN chmod +x /usr/local/bin/initialize.sh
-
-# Copy contents of filesystem directory to /fs
-COPY ./fs/ /fs
-
-# Ensure the virtual environment and pip setup
-RUN $VIRTUAL_ENV/bin/pip install --upgrade pip
-
-# Install additional python packages
-RUN $VIRTUAL_ENV/bin/pip install \
- ipython \
- requests
-
-# Expose SSH port
-EXPOSE 22
-
-# Init .bashrc
-CMD ["/usr/local/bin/initialize.sh"]
-
-
diff --git a/docker/exe/build.txt b/docker/exe/build.txt
deleted file mode 100644
index 647037929..000000000
--- a/docker/exe/build.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-docker login
-docker buildx build --platform linux/amd64,linux/arm64 -t frdel/agent-zero-exe:latest --push .
\ No newline at end of file
diff --git a/docker/exe/fs/exe/node_eval.js b/docker/exe/fs/exe/node_eval.js
deleted file mode 100644
index 52b7888e9..000000000
--- a/docker/exe/fs/exe/node_eval.js
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env node
-
-const vm = require('vm');
-const path = require('path');
-const Module = require('module');
-
- // Enhance `require` to search CWD and parent directories first, then globally
-function customRequire(moduleName) {
- let currentDir = process.cwd();
- const root = path.parse(currentDir).root;
-
- do {
- try {
- const modulePath = path.join(currentDir, 'node_modules', moduleName);
- return require(modulePath);
- } catch (err) {
- currentDir = path.dirname(currentDir);
- }
- } while (currentDir !== root);
-
- try {
- return require(moduleName);
- } catch (globalErr) {
- console.error(`Cannot find module: ${moduleName}`);
- throw globalErr;
- }
-}
-
-// Create the VM context
-const context = vm.createContext({
- ...global,
- require: customRequire, // Use the custom require
- __filename: path.join(process.cwd(), 'eval.js'),
- __dirname: process.cwd(),
- module: { exports: {} },
- exports: module.exports,
- console: console,
- process: process,
- Buffer: Buffer,
- setTimeout: setTimeout,
- setInterval: setInterval,
- setImmediate: setImmediate,
- clearTimeout: clearTimeout,
- clearInterval: clearInterval,
- clearImmediate: clearImmediate,
-});
-
-// Retrieve the code from the command-line argument
-const code = process.argv[2];
-
-const wrappedCode = `
- (async function() {
- try {
- const __result__ = await eval(${JSON.stringify(code)});
- if (__result__ !== undefined) console.log('Out[1]:', __result__);
- } catch (error) {
- console.error(error);
- }
- })();
-`;
-
-vm.runInContext(wrappedCode, context, {
- filename: 'eval.js',
- lineOffset: -2,
- columnOffset: 0,
-}).catch(console.error);
diff --git a/docker/exe/fs/root/.bashrc b/docker/exe/fs/root/.bashrc
deleted file mode 100644
index 88a273c5f..000000000
--- a/docker/exe/fs/root/.bashrc
+++ /dev/null
@@ -1,9 +0,0 @@
-# .bashrc
-
-# Source global definitions
-if [ -f /etc/bashrc ]; then
- . /etc/bashrc
-fi
-
-# Activate the virtual environment
-source /opt/venv/bin/activate
diff --git a/docker/exe/fs/root/.profile b/docker/exe/fs/root/.profile
deleted file mode 100644
index 88a273c5f..000000000
--- a/docker/exe/fs/root/.profile
+++ /dev/null
@@ -1,9 +0,0 @@
-# .bashrc
-
-# Source global definitions
-if [ -f /etc/bashrc ]; then
- . /etc/bashrc
-fi
-
-# Activate the virtual environment
-source /opt/venv/bin/activate
diff --git a/docker/exe/initialize.sh b/docker/exe/initialize.sh
deleted file mode 100644
index 115097ab9..000000000
--- a/docker/exe/initialize.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-# Copy all contents from /fs to root directory (/) with overwriting
-cp -r /fs/* / --no-preserve=ownership,mode
-
-# allow execution of /root/.bashrc and /root/.profile
-chmod 444 /root/.bashrc
-chmod 444 /root/.profile
-
-# update package list to save time later
-apt-get update
-
-# Start SSH service
-exec /usr/sbin/sshd -D
\ No newline at end of file
diff --git a/docker/run/fs/ins/install_additional.sh b/docker/run/fs/ins/install_additional.sh
index ef433341f..e857ef471 100644
--- a/docker/run/fs/ins/install_additional.sh
+++ b/docker/run/fs/ins/install_additional.sh
@@ -1,7 +1,4 @@
#!/bin/bash
# searxng
-bash /ins/install_searxng.sh "$@"
-
-# playwright
-bash /ins/install_playwright.sh "$@"
\ No newline at end of file
+bash /ins/install_searxng.sh "$@"
\ No newline at end of file
diff --git a/docker/run/fs/ins/install_playwright.sh b/docker/run/fs/ins/install_playwright.sh
index 23bc7a804..cd5755424 100644
--- a/docker/run/fs/ins/install_playwright.sh
+++ b/docker/run/fs/ins/install_playwright.sh
@@ -3,8 +3,8 @@
# activate venv
. "/ins/setup_venv.sh" "$@"
-# install playwright
+# install playwright if not installed
pip install playwright
# install chromium with dependencies
-playwright install --with-deps chromium
+playwright install --with-deps chromium-headless-shell
diff --git a/docker/run/fs/ins/post_install.sh b/docker/run/fs/ins/post_install.sh
index 410ff19a7..c1a7e1d18 100644
--- a/docker/run/fs/ins/post_install.sh
+++ b/docker/run/fs/ins/post_install.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+# install playwright
+bash /ins/install_playwright.sh "$@"
+
# Cleanup package list
rm -rf /var/lib/apt/lists/*
apt-get clean
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 7f30230e9..cda993a66 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
ansio==0.0.1
beautifulsoup4==4.12.3
-browser-use==0.1.17
+browser-use==0.1.37
docker==7.1.0
duckduckgo-search==6.1.12
faiss-cpu==1.8.0.post1
@@ -8,14 +8,14 @@ flask[async]==3.0.3
flask-basicauth==0.2.0
GitPython==3.1.43
inputimeout==1.0.4
-langchain-anthropic==0.3.1
+langchain-anthropic==0.3.3
langchain-community==0.3.13
-langchain-google-genai==2.0.7
+langchain-google-genai==2.0.8
langchain-groq==0.2.2
langchain-huggingface==0.1.2
langchain-mistralai==0.2.4
langchain-ollama==0.2.2
-langchain-openai==0.3.4
+langchain-openai==0.3.1
openai-whisper==20240930
lxml_html_clean==0.3.1
markdown==3.7