mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-20 23:57:11 -04:00
[GH-ISSUE #2] [Enhancement]: Updating the same project with complete opensource alternatives #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bb1nfosec on GitHub (Jan 21, 2025).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/2
Originally assigned to: @asdek on GitHub.
Target Component
AI Agents (Researcher/Developer/Executor)
Enhancement Description
This enhancement rewrites PentAGI to eliminate reliance on public APIs (e.g., OpenAI, Google, Tavily). The new architecture is entirely open-source, self-hosted, and locally modifiable. This enables greater flexibility, control, and cost efficiency while ensuring data privacy.
Key Changes
Local Language Model Integration:
Replace public LLM APIs with self-hosted models (e.g., LLaMA, GPT-J).
Host the model locally using frameworks like LocalAI or FastAPI.
Local Search Engine:
Replace external search APIs (e.g., Google/Tavily) with local indexing tools such as Whoosh or OpenSearch.
Locally Installed Tools:
Use open-source pentesting tools installed on the system or Dockerized (e.g., nmap, sqlmap, Metasploit).
Self-Contained Deployment:
Use Docker Compose to manage all components, ensuring easy deployment and scalability.
Custom Reporting:
Use Jinja2 and WeasyPrint for generating detailed HTML and PDF reports.
Technical Details
Implementation Details
Framework: Host models like GPT-J or LLaMA locally with LocalAI.
API Endpoint: Serve via http://localhost:8000/generate.
@mazamizo21 commented on GitHub (Jan 21, 2025):
If we can also include Deepseek, as I have spent a significant amount of money and have never completed the task due to persistent issues with installing tools that repeatedly fail.
I believe it would be a valuable addition to have a comprehensive Docker container with the most widely available tools. This would allow the AI to focus on penetration testing rather than troubleshooting the installation of tools.
@asdek commented on GitHub (Jan 22, 2025):
Hello @bb1nfosec
Thank you for your enhancement request. Let me address each point:
Local Language Model Integration
Currently, you can configure the following environment variables:
LLM_SERVER_URL=LLM_SERVER_KEY=LLM_SERVER_MODEL=These variables allow PentAGI to connect to a local backend (such as vLLM) implementing the OpenAI interaction specification, but it can also be deployed locally. Additionally, you can set up a LiteLLM proxy server, which offers an OpenAI-compatible interface and forwards requests to another local server. I'll going to review the LocalAI specification and get back to you on this. It seems feasible to support this as an option for selecting a custom LLM server.
Local Search Engine
Supporting Whoosh or OpenSearch doesn't appear to be a major issue. However, the data storage structure may impose constraints on configuring such integration. What do you think about developing a simple HTTP-based protocol with a single POST endpoint for search parameters, while the connection logic to local databases is handled separately?
Locally Installed Tools
Currently, when a job is started, a Docker image is automatically selected to serve the flow. All necessary tools are either pre-installed within the image or downloaded as needed. I have considered creating a custom build based on Kali Linux, but have found a suitable image in
booyaabes/kali-linux-full:latest. It wouldn't be difficult to create a Dockerfile with the required tools. Nonetheless, the agents will need internet access during execution to download dependencies and tools from package managers, including those from GitHub. You can see the Docker image selection prompt here: image_chooser.tmpl.Self-Contained Deployment
PentAGI is currently available in a docker-compose format, divided into three parts:
You can view the installation instructions:
I'm planning to create a video guide on setup and configuration, including LangFuse and observability components. There will also be a separate video and guide on securely setting up the Docker environment, covering docker-in-docker and other deployment options. Could you provide more details on what you mean in this section?
Custom Reporting
Currently, this feature is under development. There will be a standard report for flows and separate reports for each task in markdown and PDF formats. If you have specific requirements regarding the format and content of the reports, please share them with us, and we will incorporate them into our feature analysis.
Thank you for helping us enhance our product.
@asdek commented on GitHub (Jan 22, 2025):
Hello @mazamizo21
I apologize for the inconvenience you've experienced. I will try to reproduce this problem on my side. In the meantime, here's a workaround: please ensure that the Docker image
booyaabes/kali-linux-full:latestis selected. This image is about 6GB in size but already contains all the necessary base utilities, as can be mentioned in the job description. Additionally, within your job's instructions, you can specify that during execution, it should first verify whether the required utility is already installed instead of downloading and installing it separately.As an alternative solution, you can add to your prompt that GUI-based utilities should be excluded from use during execution and explicitly list a blacklist of utilities that should neither be installed nor used.
Currently, users can only manage the job text, but we have tasks in our backlog to expand user customization to include system prompts via UI. For better understanding how your task might be executed, please take a look at the list of system prompts here: System Prompts.
Thank you for your patience and understanding.
@vchaplygim commented on GitHub (Apr 6, 2025):
@asdek Hi, thanks for the great tool — it looks very promising. However, I ran into an issue where the image I was using didn’t have zap-cli preinstalled. As a result, I ended up wasting most of my allocated OpenAI API requests on repeated attempts to download and use zap-cli and not only these tool.
I’m now thinking it might be better to use the official image (https://hub.docker.com/r/kalilinux/kali-rolling) and install the full set of tools (apt update && apt -y install kali-linux-large) upfront, instead of relying on someone’s custom image (booyaabes/kali-linux-full:latest - which was last updated a year ago according to Docker Hub) that might be missing essential components.
@asdek commented on GitHub (Apr 6, 2025):
Hi @vchaplygim
You're absolutely right, there need to move away from using
booyaabes/kali-linux-full. I tried quickly building an image with the necessary packages installed, but without proper configuration, not all the utilities are ready to work out of the box. I also had the idea of creating a set of pre-prepared commands wrapped in scripts to minimize the time spent on installation and debugging. This should be available within the next couple of months, maybe sooner.In the meantime, you can check out the prompt for selecting a Docker image here.
According to this, you have the ability to specify in the task description, which kicks off the flow, which Docker image the AI agents should use, with a phrase like:
“At the stage of selecting the Docker image to solve this task, you should use
{YOUR_IMAGE_NAME}.”Also, PentAGI allows you to override the default Docker image if it doesn't find anything more suitable for the solution. To do this, you can use the environment variable
DOCKER_DEFAULT_IMAGE. However, in your case, it might not be used because the task relates to information security. So unless you explicitly specify the necessary image within the task, it will default to usingbooyaabes/kali-linux-full.If you manage to create a working Dockerfile to build an image with the necessary set of utilities based on
kalilinux/kali-rolling, and it performs well during testing, please let me know. I'd really appreciate it, and I can base the Docker image with scripts on it.Thank you for your feedback, it helps us improve the tool! 😉