Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xSteph Pentest ai Install Planner

From Leeroopedia
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

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

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment