Microsoft Open-Sources RAMPART and Clarity to Secure AI Agent Workflows

Microsoft has unveiled two open-source security tools for AI agents: RAMPART, a Pytest-native framework for build-time testing, and Clarity, a pre-code archite…

Microsoft Open-Sources RAMPART and Clarity to Secure AI Agent Workflows

On May 20, 2026, Microsoft announced the open-source release of RAMPART and Clarity, two tools designed to embed security testing and design reflection into the earliest phases of AI agent development. The move signals a deliberate pivot from traditional software "shift-left" strategies to an "agentic AI shift-left," where security is no longer a post-build verification but a core artifact that accompanies an engineer from design to deployment. However, the announcement comes with a significant caveat: the repositories are not yet independently verifiable, and the toolchain has yet to face rigorous community validation.

Key Takeaways
  • RAMPART is a Pytest-native framework for writing and executing security and safety tests on AI agents, covering both adversarial and benign scenarios.
  • Clarity operates upstream as a structured "sounding board" for pre-code threat modeling, guiding teams through problem clarification, solution exploration, failure analysis, and decision tracking.
  • RAMPART builds on PyRIT—released by Microsoft over two years ago—but shifts the timeline: it focuses on testing during construction rather than black-box discovery after the fact.
  • The exact open-source license and immediate GitHub repository availability have not been confirmed in currently available sources.

From PyRIT to RAMPART: Red Teaming Enters the Build Phase

The technical core of Microsoft’s strategy is RAMPART (Risk Assessment and Measurement Platform for Agentic Red Teaming). Described as a "Pytest-native" framework, it integrates directly into existing development workflows for engineers already utilizing Python for unit testing. The innovation here is not the language—Pytest is already dominant—but the specialization: RAMPART is built to attack, probe, and evaluate autonomous AI agents, rather than standard REST APIs or batch models.

Test categories include cross-prompt injections—where untrusted data reaches the agent indirectly via emails, files, or web pages—unintentional behavioral regressions introduced by updates, and data exfiltration. Each test case requires an adapter to connect the specific agent to the test suite. While this suggests intentional modularity, it also implies an integration overhead that cannot yet be quantified from available data.

RAMPART shares a lineage with PyRIT (Python Risk Identification Tool), which Microsoft released over two years ago. However, the architectural difference is substantial. While PyRIT is optimized for black-box discovery by security researchers on completed systems, RAMPART is designed for engineers "while the system is being built." This distinction represents a paradigm shift: moving red teaming from a specialized external activity to a daily engineering practice, transforming red teaming insights into executable and reproducible assets.

"Where PyRIT is optimized for black-box discovery by security researchers after the system is built, RAMPART is built for engineers as the system is being built" — Ram Shankar Siva Kumar, founder of Microsoft’s AI Red Team

Clarity: Threat Modeling Before the First Commit

While RAMPART handles the code phase, Clarity focuses further upstream, where architectural decisions are still fluid and the cost of change is low. Microsoft describes it as a "structured sounding board" and an "AI thinking partner that pushes back." Rather than acting as a passive requirements generator, it serves as a design interlocutor that challenges a team's assumptions.

The workflow covers four phases—problem clarification, solution exploration, failure analysis, and decision tracking—with the explicit goal of making design choices traceable before they are crystallized in code. The output is intended to be a living artifact rather than a static document. This approach addresses a concrete problem in AI agent development, where the emergent properties of Large Language Models (LLMs) make it difficult to anticipate undesirable behaviors through traditional threat modeling methods.

A significant limitation remains: it is currently unclear whether Clarity is a standalone application, a plugin for existing IDEs, or a cloud service. The exact technical nature of the tool—and its ability to integrate into existing CI/CD cycles—is not specified in the available documentation.

Cross-Prompt Injection and Regressions: RAMPART’s Primary Targets

The most prominent threat mentioned in Microsoft's documentation is cross-prompt injection, a particularly insidious vector for AI agents operating on external data. Unlike direct prompt injections, where an attacker interacts with the model directly, the cross-prompt variant uses an intermediary. A malicious email, a shared document, or a compromised web page becomes the vehicle for delivering adversarial instructions to the agent. RAMPART proposes systematic testing of this attack surface, alongside behavioral regressions that can introduce vulnerabilities into previously secure features during frequent updates.

The evaluation mechanism requires engineers to define expected outcomes, with RAMPART reporting results in an interpretable format. This structure mirrors Pytest logic but applies it to a domain where "pass" and "fail" criteria are often less binary than in deterministic software. For example, a data exfiltration test might reveal a potential vulnerability that depends on the deployment context; the framework flags the result, but final residual risk assessment remains the responsibility of the development team.

Adoption Strategy and Key Considerations

For developers and security teams working with AI agents, this announcement suggests four priority actions:

Monitor repository availability. Before planning any integration, confirm that the RAMPART and Clarity GitHub repositories are public, accessible, and check the specific open-source license. The current lack of this information makes any immediate adoption roadmap premature.

Estimate adapter overhead. RAMPART requires an adapter to bridge the agent and the test suite. Teams should estimate the cost of developing and maintaining this connector for their specific architecture, as this cost was not quantified in the announcement.

Map coverage against existing threat models. Explicit threat categories—cross-prompt injection, regressions, and data exfiltration—must be weighed against a system’s actual attack surface. An agent without access to external emails or files, for instance, may see limited benefit from the first category.

Embed within the development cycle. The value proposition of RAMPART and Clarity lies in their integration into existing workflows, not as a standalone step. Teams should plan where RAMPART tests will live in the CI/CD pipeline and verify compatibility with current Pytest environments before fully committing to the tools.

The Real Test: From Promise to Production

Microsoft’s announcement addresses a critical, under-served issue: AI agent security has largely been managed with legacy tools optimized for models that do not act autonomously on external systems. RAMPART and Clarity offer a coherent, technically grounded response. However, a consistent vision does not guarantee an effective implementation.

Community validation will be the decisive factor. If adapters remain too specific to be reusable, if tests generate unmanageable false positives, or if Clarity proves to be a chatbot lacking real "decision tracking" structures, adoption will likely be limited to organizations with the resources for high-level experimentation. Microsoft is betting that the expertise of its AI Red Team—one of the most active in the industry—can be distilled into generic engineering artifacts. Verifying this hypothesis will require weeks of real-world use, beyond the initial announcement.

Frequently Asked Questions

Does RAMPART replace PyRIT? No. The two tools serve different purposes: PyRIT is for security researchers testing completed systems, while RAMPART is for engineers during the development phase. Microsoft views them as complementary.

Does Clarity generate code? Not according to available sources. It is described as a support tool for pre-code decision-making, not an implementation generator.

Is Azure required to use RAMPART? No specific cloud requirements are mentioned in the sources. The Pytest-native architecture suggests local execution, though confirmation depends on repository verification.

Information has been verified against cited sources and is current as of the time of publication.

Sources