---
schema_version: "1"
id: b2a5efc8dd14ee584b6c08f6dbf0a83b788296f2c19a478866be3da036b2c842
title: Policy Development Kit Architecture Overview
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/pdk/1.8/policies-pdk-architecture.md
canonical_url: https://docs.mulesoft.com/pdk/1.8/policies-pdk-architecture
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 41ae38c8f42e8139992f55739f77a579676aafd32af94aef9b548b21200833af
description: MuleSoft Documentation Site
release: "1.8"
latest: false
---
---
product: Omni Gateway Policy Development Kit (PDK)
version: 1.8
---

# Policy Development Kit Architecture Overview

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Omni Gateway Policy Development Kit (PDK) consists of:

- [Anypoint CLI PDK Plugin](#anypoint-cli-pdk-plugin): Generates and distributes the policy to
  Exchange

- [Policy Template](#policy-template): Scaffolds new custom policies

- [SDK Building Tools](#sdk-building-tools): Simplifies the development process

## Anypoint CLI PDK Plugin

The Anypoint CLI PDK plugin creates the PDK project and uploads policy assets to Exchange (for
Connected Mode only). After creating the project, PDK provides a simplified set of commands in a
`Makefile` to complete all following development steps.

## Policy Template

PDK generates some simple scaffolding when creating the policy.

All generated files contain the required information to properly compile the policy.

For more information about the included files, see
[Project Structure](https://docs.mulesoft.com/pdk/1.8/policies-pdk-create-project#project-structure).

## SDK Building Tools

Omni Gateway is built on Envoy which requires developed policies to be compatible with the
event-driven [proxy-wasm](https://github.com/proxy-wasm/spec) architecture.

\`proxy-wasm’s event-driven architecture requires users to manage the different events that handle a
single request. This causes the following drawbacks that make developing and maintaining
event-driven code costly:

- High complexity of the code due to the coupling of business logic with the entry points

- Inability to modularize common logic which creates monolithic code

- Verbose non-linear control flow that creates difficult function callbacks and error propagation

PDK provides building tools that abstract the developer from the event-oriented coding approach by
using reactor and executor patterns. PDK provides the developer a way to code each incoming request
in a linear method that results in:

- Fewer compile and runtime errors from using methods in the incorrect context

- Reduced learning curve

- Improved debugging by minimizing call stacks

- Reduced code duplication

- Improved parameter injection

- Reduced use of dynamic memory that decreases indeterminism and the need for custom memory
  management

## MCP Policy Management

The Mulesoft MCP Server provides `manage_flex_gateway_policy_project` and
`get_flex_gateway_policy_example` tools to manage the custom policy lifecycle.

To learn more, see
[MuleSoft MCP Server Policy Management Tools](https://docs.mulesoft.com/mulesoft-mcp-server/reference-mcp-tools#policy-management).

## See Also

- [Prerequisites for Omni Gateway Policy Development Kit (PDK)](https://docs.mulesoft.com/pdk/1.8/policies-pdk-prerequisites)
