Skip to main content

1. Create an account

Register for AdMesh.

2. Complete onboarding

Add your platform details and select the ad formats you want to use.

3. Create an API key

Create an API key in the AdMesh dashboard and use it as apiKey in the integration below.

4. Install the frontend SDK

For Flutter, follow the Flutter integration steps.

5. Wrap your chat with AdMeshProvider

Use your AdMesh API key and keep the same sessionId throughout the conversation. Pass previous messages through the optional messages prop to help AdMesh recommend products that match the user’s earlier preferences, budget, and needs.
You can omit messages if conversation history is unavailable. Recommendations still work using the current query. Each message contains role and content strings. Keep this array updated from your application’s chat state as the conversation progresses; the provider does not collect previous messages automatically. For example, when the user next asks “Which one would you recommend?”, the previous messages give AdMesh the laptop requirements and budget behind that question. Continue passing the current user query separately as query to the recommendation component in the next step. AdMeshRecommendations and WeaveAdFormatContainer include this history in their frontend recommendation requests. For Weave recommendations fetched by your backend, pass conversation history to that backend integration as well.

6. Integrate your selected format

Add AdMeshRecommendations below each assistant response. Pass the original user query and its user message ID.
Use the formats selected in your dashboard; no format prop is needed. For Bridge’s Talk to Agent action, connect the delegation callbacks.

7. Test your integration

Open your app and send a query. Verify that an eligible recommendation renders and that its links work.