Loading repository data…
Loading repository data…
yohannesgk / repository
BlacksmithAI is an OPEN-SOURCE advanced penetration testing framework that leverages multiple AI agents to automate security assessments. The system orchestrates specialized agents through a complete penetration testing lifecycle, from reconnaissance to post-exploitation using professional security tools in a controlled environment.
[OPEN-SOURCE] AI-Powered Penetration Testing Framework
An intelligent multi-agent system for automated security assessment and penetration testing.
A hosted version is available for quick testing without local setup. Blacksmith-AI
Documentation • Quick Start • Architecture • Tools
BlacksmithAI is an opensource advanced penetration testing framework that leverages multiple AI agents to automate security assessments. The system orchestrates specialized agents through a complete penetration testing lifecycle from reconnaissance to post-exploitation using professional security tools in a controlled environment.
BlacksmithAI uses a hierarchical multi-agent system.
Orchestrator
Specialized Subagents
Each sub-agent maintains its own mission planning creating local autonomy, while the Orchestrator retains top-level process control through evaluation
Each sub-agent has access to specific tools tailored to its role, ensuring efficient and focused operations.
BlacksmithAI relies on the following tools:
# Python package & environment manager
uv
# Containerization
Docker & Docker Compose
# Frontend runtime & tooling
Node.js 18+ (LTS recommended)
pnpm (fast JavaScript package manager)
uvuv is a fast, modern Python package manager + environment tool — kind of like a turbocharged combo of pip, pipx, and virtualenv. ([GitHub][1])
uv# Install via official install script
curl -LsSf https://astral.sh/uv/install.sh | sh
If you prefer a Python-packaged version:
pip install uv
# or
pipx install uv
Verify:
uv --version
Notes:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Read uv docs for detailed setup - https://docs.astral.sh/uv/
Docker lets us containerize and run backend services, databases, etc.
sudo apt update
sudo apt install -y docker.io docker-compose
brew install --cask docker
After installing, start Docker Desktop and confirm:
docker --version
docker compose version
If you see version outputs, you’re good to go.
Tip: On Linux you may want to add your user to the docker group:
sudo usermod -aG docker $USER
# Then restart your terminal
We use Node.js for frontend tooling. Node 18+ is required for modern pnpm and ecosystem compatibility.
# Using NodeSource setup (recommended for precise versions)
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
Install with Homebrew:
brew install node@18
Verify:
node --version
npm --version
pnpm is preferred for consistent, fast installs and predictable lockfiles. ([pnpm.cn][4])
You can install via one of these:
npm install -g pnpm
curl -fsSL https://get.pnpm.io/install.sh | sh -
corepack enable
corepack prepare pnpm@latest --activate
Verify:
pnpm --version
Try these checks:
uv --version
node --version
pnpm --version
docker --version
docker compose version
if you want to use vLLM local models
cd blacksmithAI/blacksmithAI
uv add vllm
uv add huggingface_hub
uv run hf auth login #if not logged in
e.g.
vllm serve mistralai/Devstral-2-123B-Instruct-2512 \
--host 0.0.0.0 \
--port 8000 \
--max-model-len 8192 \
--gpu-memory-utilization 0.75
git clone https://github.com/yohannesgk/blacksmith.git
# Install dependencies using uv
cd blacksmithAI/blacksmithAI
uv sync
The mini-kali container provides all penetration testing tools in a secure, isolated environment.
# start it with
cd blacksmithAI/blacksmithAI
docker compose up -d
Skip this if using the terminal-only interface.
cd blacksmithAI/frontend
pnpm install
cd ../..
For a simpler setup experience, use the provided Makefile commands. Run make help to see all available commands.
make setup
This command performs:
make install)make docker-build)make frontend-install)After setup or installation, configure your environment:
# 1. Copy example environment file
cp blacksmithAI/.env.example blacksmithAI/.env
# 2. Edit .env with your API keys
nano blacksmithAI/.env
# 3. Edit config.json for your LLM provider
nano blacksmithAI/config.json
make start-cli
Starts the mini-kali Docker container and Launches the CLI interface
OR
uv run main.py
Just launches the CLI interface
Run these commands in separate terminals:
# Terminal 1: Start Docker container
make docker-up
# Terminal 2: Start frontend
cd frontend && pnpm build && pnpm start
# Terminal 3: Start LangGraph server
cd blacksmithAI && uv run langgraph up # production server
>or
cd blacksmithAI && uv run langgraph dev # dev server
Then access: http://localhost:3000
# Install VLLM
make vllm-install
# Start VLLM server
make vllm-serve
# Or for smaller systems:
make vllm-serve-small
| Command | Description |
|---|---|
make help | Show all available commands |
make install | Install Python dependencies |
make setup | Complete initial setup |
make frontend-install | Install frontend dependencies |
make docker-build | Build mini-kali Docker image |
make docker-up | Start Docker container |
make docker-down | Stop Docker container |
make docker-logs | View Docker logs |
make vllm-install | Install VLLM for local LLM |
make vllm-serve | Start VLLM server (123B model) |
make vllm-serve-small | Start VLLM server (7B model) |
make start-cli | Start CLI mode |
make start-ui | Show Web UI setup instructions |
make start-all | Quick start CLI mode |
make stop | Stop all services |
make clean | Clean up Docker containers |
make status | Show Docker container status |
make check-deps | Check if dependencies are installed |
make check-config | Check configuration files |
make quickstart | Display quick start guide |
# First time setup
make setup
cp blacksmithAI/.env.example blacksmithAI/.env
# Edit .env with your API keys
# Start CLI
make start-cli
# Start Web UI (3 terminals)
make docker-up
cd frontend && pnpm build && pnpm start
cd blacksmithAI && uv run langgraph dev
# Stop everything
make stop
Create a .env file from the example:
cp blacksmithAI/.env.example blacksmithAI/.env
Edit .env and add your API key:
OPENROUTER_API_KEY=your-openrouter-api-key-here
No environment variables needed. Ensure your VLLM server is running:
# Example VLLM server startup
vllm serve <model-name> --port 8000
Edit blacksmithAI/config.json to configure LLM providers and models.
{
"defaults": {
"provider": "openrouter", // or "vllm", or custom(openai)
},
"providers": {
"openrouter": {
"base_url": "https://openrouter.ai/api/v1/chat/completions", # inference url
"default_model": "mistralai/devstral-2512:free", # model name
"default_embedding_model": "openai/text-embedding-3-small",
"def