Practical overview
When it fits
Use it during design or security review when you can represent an agent's prompts, tools and architecture in agent_spec.yaml and want static findings, mitigation suggestions or LLM-backed attack simulation.
Who it is for
- Developers building chatbots, RAG systems, tool-calling agents or MCP-connected agents.
- Security engineers reviewing prompt-injection exposure and defenses in LLM-based systems.
Documented uses
- Describe an LLM system in a structured specification and validate that specification.
- Review prompt, tool and architecture layers for prompt-injection risks.
- Generate mitigation recommendations and compare a system specification before and after changes.
- Run LLM-backed adversarial scenarios and export findings for review.
Requirements & limits
The tool is available as a CLI with installation instructions for pipx, uv and pip, plus a local Gradio app. The repository lists an Apache-2.0 license.
- Supported specification types include chatbot, RAG, tool-calling agent and MCP agent; analyzed layers vary by type.
- Initialization, validation, static analysis, report rendering and diff do not require an LLM API key.
- Prompt-layer remediation may require an LLM; tool- and architecture-layer remediation can be deterministic.
- Simulation requires an LLM API key and supports OpenAI, Anthropic Claude and AWS Bedrock with Claude v3 or newer.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run static analysis on an example agent specification
Validate and analyze the included chatbot example, then create an HTML report.
Before you start
- Install Prompt Hardener with uv, pipx, pip or a development install.
- No LLM API credentials are needed for validation, static analysis or report rendering.
Steps
Copy examples/chatbot-minimal/agent_spec.yaml to ./agent_spec.yaml.
Run prompt-hardener validate agent_spec.yaml.
Run prompt-hardener analyze agent_spec.yaml -o analyze.json.
Render the result with prompt-hardener report analyze.json -f html -o report.html.
Expected outcome
A validated example specification, analysis output in JSON and a rendered HTML report.
Guide limitations
- This procedure uses the included chatbot example; the guide does not cover configuring a real system.
- Static analysis is not the LLM-backed adversarial simulation stage.
Create and assess a specification for your agent
Generate a starter specification, validate it and review static prompt-injection findings.
Before you start
- Prompt Hardener installed as a CLI.
- A supported agent type: chatbot, rag, agent or mcp-agent.
- No LLM API key is required for initialization, validation or static analysis.
Steps
Create a starter file with prompt-hardener init --type -o agent_spec.yaml, using chatbot, rag, agent or mcp-agent as the type.
Edit agent_spec.yaml to describe the system; the specification can include its system prompt and provider/model, with tools, policies, data sources or MCP servers as relevant to the agent type.
Run prompt-hardener validate agent_spec.yaml.
Run prompt-hardener analyze agent_spec.yaml --format markdown.
Expected outcome
A validated system specification and Markdown static-analysis findings.
Guide limitations
- The findings depend on the accuracy and contents of the specification.
- This guide covers static analysis only; simulation requires an LLM API key, and prompt-layer remediation may also require one.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- cybozu/prompt-hardener · Official homepage title · retained in its source language

