Turning AI Agent Safety into an Engineering Discipline
Microsoft has open-sourced two complementary AI security tools, RAMPART and Clarity, to pull AI agent safety out of abstract debate and into everyday engineering practice. The frameworks target teams building agentic systems that use tools, connect to business applications, and act on live enterprise data. By making the code public, Microsoft invites developers, product owners, and security professionals to inspect implementations directly, rather than relying on policy documents or marketing claims. Ram Shankar Siva Kumar, founder of Microsoft’s AI red team, positions this shift as a move from philosophical arguments about AI safety to concrete engineering controls applied throughout the software lifecycle. Taken together, RAMPART and Clarity are meant to embed AI agent safety into standard workflows: Clarity guides structured, pre-code planning and risk analysis, while RAMPART automates repeatable attack simulations and regression tests inside CI/CD pipelines, treating safety checks like any other test suite.

RAMPART: Automating Red-Team Testing in CI/CD Pipelines
RAMPART, short for Risk Assessment and Measurement Platform for Agentic Red Teaming, is a pytest-based framework built on Microsoft’s earlier PyRIT toolkit. It lets teams encode red-team scenarios—such as prompt injection or cross-prompt injection attacks—into automated tests that run in continuous integration and delivery pipelines. Instead of a single successful run being treated as proof of safety, RAMPART supports statistical trials, allowing policies like “this action must remain safe in at least 80 percent of runs” to account for probabilistic model behavior. Microsoft reports using RAMPART internally to expand one discovered attack vector into nearly 100 variants and replay it close to 300 times in multi-turn conversations, both to validate the issue and to confirm that mitigations actually hold. This CI-native approach turns AI agent safety into repeatable regression testing, helping incident responders and engineers reproduce and harden against real-world adversarial behavior.
Clarity: Pre-Code Design Reviews for Safer Agent Architectures
While RAMPART focuses on runtime behavior, Clarity is designed for the earliest stage of agent development: planning and architecture. Framed as a “structured sounding board,” Clarity prompts teams to clarify what they are building, why, and what could go wrong before any production code is written. When a developer proposes a new capability—such as real-time collaboration in a document editor—Clarity responds with probing questions similar to those an experienced architect, product manager, or safety engineer might ask. It pushes for clear requirements, surfacing edge cases and failure modes, including how conflicting edits are handled or what “real time” truly needs to mean. This pre-code review workflow gives product and security stakeholders a shared space to align business objectives with downstream safety constraints, helping teams avoid shipping agents whose design assumptions already expose them to tool misuse, data leakage, or unsafe automation paths.
Embedding Safety Across the AI Agent Lifecycle
Together, Clarity and RAMPART illustrate a lifecycle approach to AI agent safety. Clarity supports early-stage risk analysis, forcing teams to confront assumptions and potential failure modes before implementation. Once agents are built, RAMPART takes over as a continuous validation layer, transforming exploratory attack simulations into standardized tests that gate releases just like unit or integration tests. This end-to-end integration is particularly relevant as enterprises accelerate agent development that touches email, internal records, and other sensitive systems where a single unsafe action can have real-world consequences. By identifying issues during design and repeatedly stress-testing behavior during development, organizations can move from reactive patching after deployment to proactive risk management. Microsoft’s open-sourcing of these AI security tools also allows external researchers and practitioners to examine, challenge, and extend the frameworks, a necessary step if such safety practices are to become industry-wide engineering standards.
