Principle:0xSteph Pentest ai agents Agent Distribution
| Knowledge Sources | |
|---|---|
| Domains | DevOps, Configuration, Distribution |
| Last Updated | 2026-10-22 12:00 GMT |
Overview
Methodology for distributing AI agent definitions, slash commands, findings database, and CLI tools across global and project installations with model-tier optimization.
Description
Agent Distribution is the principle of packaging and deploying AI agent system prompts (Markdown with YAML frontmatter), slash commands, database scripts, and underlying CLI tools to end-user environments. It addresses the problem of reproducibility: a pentest-ai-agents installation must work identically whether deployed globally (all Claude Code sessions) or per-project, with optional cost optimization via model tiering.
The principle supports lite mode: advisory agents (no Bash tool, no execution risk) can run on the Haiku model for lower token cost, while Tier 2 (execution-capable) agents remain on Sonnet. The installer applies this via `sed` replacement of `model: sonnet` to `model: haiku` in the agent YAML frontmatter.
Usage
Use this principle when:
- Distributing a collection of AI agent definitions to end users
- Providing multiple installation modes (global, project, lite)
- Installing and verifying underlying CLI tools required by agents
- Auditing tool availability against agent requirements
Theoretical Basis
Distribution applies a tiered installation model:
Where:
Failed to parse (unknown function "\begin{cases}"): {\displaystyle \text{ModelTier}(\text{lite}) = \begin{cases} \text{Haiku} & \text{if } \text{lite} \wedge \text{advisory\_only} \\ \text{Sonnet} & \text{otherwise} \end{cases} }
Pseudo-code Logic:
# Abstract distribution algorithm (NOT real implementation)
def install(mode, lite=False, no_db=False, tools=False):
dest = GLOBAL_DIR if mode == "global" else PROJECT_DIR
for agent in agents_dir.glob("*.md"):
if lite and is_haiku_safe(agent):
content = sed_replace(agent, "model: sonnet", "model: haiku")
else:
content = read(agent)
write(dest / agent.name, content)
install_commands(dest)
if not no_db:
install_db_scripts()
if tools:
install_cli_tools(detect_pkg_manager())
Practical Guide
- Detect execution context: When piped from curl, clone the repo to a temp dir and re-exec the installer.
- Check prerequisites: Verify git and Claude Code CLI presence before proceeding.
- Support multiple modes: Global (~/.claude/agents/), project (.claude/agents/), or interactive selection.
- Lite mode optimization: Replace `model: sonnet` with `model: haiku` for advisory-only agents via sed.
- Haiku safety: Only agents without Bash tool access are safe for Haiku — never downgrade Tier 2 agents.
- Install database scripts: Copy findings.sh, handoff.sh, schema.sql, common.sh to ~/.pentest-ai/bin/ and add to PATH.
- Install CLI tools: Detect package manager (apt/brew/pacman), filter already-installed, install via pipx/go/cargo for ecosystem tools.
- Verify installation: Use doctor.sh to audit which tools are present per agent.
- Support uninstall:*** Remove all pentest-ai agent files and slash commands.
Related Pages
Implemented By
- Implementation:0xSteph_Pentest_ai_agents_Install_Script
- Implementation:0xSteph_Pentest_ai_agents_Doctor_Audit