Edit in GitHubLog an issue

API Mesh prompting guide

One of the fastest ways to build an API Mesh configuration file is by using AI to assist with writing the boilerplate code. When building, iterating on, or debugging meshes using AI tools and Large Language Models (LLMs), a well-structured and extensive prompt helps provide the model with clearer guidelines and examples that can dramatically improve output.

The API Mesh starter kit repository also contains resources and examples for generating Adobe API Mesh configurations using AI prompting techniques.

These resources can help developers quickly build, test, and deploy meshes by leveraging Cursor's AI capabilities and structured prompting rules.

Relevant files:

The following files are used when prompting your agent to create a mesh. You can review the contents of these files for a better understanding the context provided to the agent. You can also customize these files to address your specific mesh generation needs.

Prerequisites

The following prerequisites are required to use mesh prompting:

  • A coding agent - Cursor is recommended.

  • Node.js 18+

  • The Adobe I/O CLI:

    Copied to your clipboard
    npm install -g @adobe/aio-cli
  • The API Mesh plugin:

    Copied to your clipboard
    aio plugins:install @adobe/aio-cli-plugin-api-mesh

Clone the repo and open the project in Cursor.

Create a mesh with a prompt

Select the desired model, and instruct your agent to create a mesh that fits your needs. For example:

Copied to your clipboard
Create a mesh configuration that connects my Adobe Commerce GraphQL and a custom REST API. The mesh should include an authentication hook.

Review the responses of the AI, which should instruct you on manual steps, like adding your API URLs to the environment variables file.

Troubleshooting

If you encounter an error, ask the agent for assistance. For example:

Copied to your clipboard
My mesh is returning a 401 error. How do I debug this locally?

Contributing

Adobe welcomes contributions of new patterns, prompts, and examples. As you discover them, please submit a pull request to the API Mesh starter kit repository with your changes.

Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.