Skip to main content
Loading navigation
Back to prompt library

Mastra AI Workflow setup with Lakera Guard

Linked challenge: Mastra AI Risk Guard: Prompt-Hardened Reinsurance Portfolio Audit

Prompt source

implementation4 lines2 sectionsNo variables0 checklist items
import { Workflow, Step } from '@mastra/core';
import { LakeraClient } from '@lakera/ai';

// Create Mastra AI workflow that routes text through Lakera Guard before executing LLM treaty analysis
export const treatyAuditWorkflow = new Workflow({ name: 'treaty-audit' });