Turning AI Agent Safety Into an Engineering Discipline
Microsoft’s AI Red Team has released two open source AI tools, RAMPART and Clarity, to help teams embed AI agent safety into normal software engineering workflows. Rather than treating AI safety as a high-level policy debate, the tools aim to make it a practical, testable discipline that fits alongside unit and integration testing. Clarity works at the design stage, guiding structured conversations about assumptions, risks, and failure modes before any production code is written. RAMPART then takes over during development, transforming adversarial scenarios into automated tests that run on every code change. Both tools were first battle‑tested inside Microsoft, where they’ve been used by incident responders and security engineers to investigate real AI vulnerabilities and validate fixes. By open‑sourcing the code, Microsoft invites enterprises and independent developers to adopt, inspect, and adapt these controls for their own AI agents and business systems.

Clarity: Catching Design Flaws Before Code Is Written
Clarity is positioned as a “sounding board” for AI agent design, targeting the earliest and often most consequential phase of the development lifecycle. It guides engineers through a structured review that covers problem clarification, solution options, failure analysis, and decision tracking. In practice, this means surfacing questions that experienced architects, product managers, and safety engineers would ask if they were in the room: What tools will the agent be allowed to call? What business systems or live data will it touch? How could prompt injection or poisoned content turn benign capabilities into unsafe actions? By forcing these considerations before implementation, Clarity helps teams expose risky assumptions, identify missing guardrails, and document trade‑offs while changes are still cheap. For enterprises under pressure to ship autonomous agents quickly, this kind of early design review provides a systematic way to align AI agent safety with product goals instead of bolting on controls after incidents occur.

RAMPART: Continuous Red Team Testing in the CI/CD Pipeline
Where Clarity focuses on planning, the RAMPART framework operationalizes AI safety testing during development and deployment. Built on top of Microsoft’s open source PyRIT red‑teaming library, RAMPART lets developers encode attack simulations as pytest test cases. Each test connects to an AI agent through a thin adapter, orchestrates an interaction—such as a prompt injection attempt—and evaluates observable outcomes. Results are returned as clear pass‑or‑fail signals that can gate releases in CI/CD pipelines, giving AI safety testing the same weight as other integration tests. Because AI models are probabilistic, teams can run the same test multiple times and require, for example, that an action remains safe in at least 80 percent of runs. This statistical approach turns red team testing from sporadic exercises into repeatable release criteria, ensuring that regressions, new tools, or fresh data sources do not silently re‑introduce dangerous behaviors into production agents.

From Incident Response to Systematic AI Agent Safety
The tools also reflect lessons from real incident response work. Microsoft’s AI incident response team has already used RAMPART to investigate reported vulnerabilities in agentic systems. In one case, they took a single discovered vector and automatically generated around 100 variants to probe how widely the flaw applied. They then used the same framework to test potential mitigations, checking whether defenses held not just once or twice, but hundreds of times and across multi‑turn conversations. According to Microsoft, work that previously took experts weeks can now be compressed into hours using this automated approach. As enterprises roll out agents that can call tools, access business systems, and act on live data, this kind of scalable AI safety testing becomes essential. RAMPART’s ability to reproduce findings, explore variants, and validate fixes helps red teams and developers move from one‑off investigations to systematic AI safety testing programs.
Open Source AI Tools Developers Can Shape to Their Workflows
By releasing RAMPART and Clarity as open source AI tools, Microsoft is encouraging teams to treat AI agent safety as something they can customize, extend, and audit. RAMPART is deliberately built as a test harness: developers plug in their own adapters, connectors, and datasets to mirror the tools and environments their agents use. Clarity’s structured prompts can likewise be tailored to specific domains or regulatory requirements. This flexibility matters as organizations confront diverse risks, from prompt injection patterns that seek credentials or unauthorized tool access to subtle failure modes around data handling and decision‑making. External researchers can now inspect the implementations, file issues, and contribute improvements rather than relying solely on Microsoft’s performance claims. While independent validation is still needed, the open model lowers the barrier for enterprises to integrate AI safety testing—from initial architecture reviews to continuous red team testing—into their existing engineering and security pipelines.
