Contact Us 1-800-596-4880

Custom Policy Examples

Flex Gateway Policy Development Kit (PDK) provides example policy projects to help you start configuring your Rust source code.

You can find all example policies and their documentation in the PDK Custom Policy GitHub RepositoryLeaving the Site.

API Policy Examples

PDK includes the following API example policies:

A2A and MCP Server Policy Examples

PDK includes the following A2A and MCP example policies:

Set Up an Example Policy Project

To use an example policy project:

  1. Make sure you have installed all PDK prerequisites.

  2. Clone the PDK Custom Policy GitHub RepositoryLeaving the Site using the following command or your preferred GitHub interface:

    git clone https://github.com/mulesoft/pdk-custom-policy-examples.git
    ssh
  3. Navigate to the newly cloned directory, then copy and paste the directory of your desired policy into a new location.

  4. In the cargo.toml file of the copied policy example, replace the group-id with your group ID, for example:

    group_id = "<your-group-id>"
    toml
  5. Run the make setup command:

    make setup
    ssh
  6. Navigate to the README.md file in the example policy to read more about the policy and how to test it.