Implementation:0xSteph Pentest ai Install Planner
| Knowledge Sources | |
|---|---|
| Domains | Tool_Management, Planning, Prediction |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
Concrete tool for predicting which security tools an engagement is likely to need based on scope and intensity, provided by the pentest-ai engine.
Description
The predict_tools_for_engagement function returns a list of tool names the LLM is likely to call given (scope, intensity, target). It stacks two strategies: a static scope-keyed map as the floor (always returns something), and an optional LLM call to pick additional target-specific tools. If the LLM call fails, the static set stands. The planner never raises into the caller.
Usage
Import this function at engagement start to batch a single smart-install prompt. Used by the orchestrator before the agent loop begins.
Code Reference
Source Location
- Repository: 0xSteph_Pentest_ai
- File: engine/install_planner.py
- Lines: 1-175
Signature
_STATIC_SCOPE_MAP: dict[str, list[str]] = ...
def predict_tools_for_engagement(
scope: str,
intensity: str = "normal",
target: str = "",
*,
llm_client: Any | None = None,
) -> list[str]: ...
Import
from engine.install_planner import predict_tools_for_engagement
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| scope | str | Yes | Engagement scope ("web", "ad", "cloud", etc.) |
| intensity | str | No | Scan intensity (default: "normal") |
| target | str | No | Target URL for LLM-specific picks |
| llm_client | None | No | Optional LLM client for enhanced prediction |
Outputs
| Name | Type | Description |
|---|---|---|
| tool_names | list[str] | Predicted tool names to install |
Usage Examples
Predict and Install
from engine.install_planner import predict_tools_for_engagement
from engine.tool_installer import audit_named
tools = predict_tools_for_engagement(scope="web", target="https://example.com")
print(f"Predicted tools: {tools}")
audit = audit_named(tools)
print(f"Missing: {audit['missing']}")
# Smart-install prompt for missing tools