Skip to content
Apixo
Blog
news· 4 min read· via AWS Machine Learning

How MoEngage Turned OpenAPI Specifications into AI Agents with Amazon Bedrock AgentCore

MoEngage built Merlin AI by converting existing OpenAPI specifications into MCP tools, using Amazon Bedrock AgentCore for multi-tenant security and Claude models for decision-making.

How MoEngage Turned OpenAPI Specifications into AI Agents with Amazon Bedrock AgentCore

Customer engagement platforms are undergoing a structural shift. Traditionally, marketing and product teams had to jump between analytics dashboards, content management systems, and campaign execution builders to launch a single promotion across channels like email, push, SMS, and WhatsApp. MoEngage, a platform used by more than 1,350 consumer brands, addressed this fragmented workflow by developing Merlin AI—a suite of agents built on Amazon Bedrock and Amazon Bedrock AgentCore that allows users to analyze, create, and launch campaigns through natural language conversations.

Rather than building hundreds of new backend endpoints, MoEngage turned its existing API infrastructure into an agent-callable layer using the Model Context Protocol (MCP). The implementation demonstrates how software platforms can expose existing capabilities to autonomous agents while maintaining multi-tenant security, strict data isolation, and low operational overhead.

Exposing existing APIs as MCP tools

To make its infrastructure accessible to LLMs, MoEngage exposed its platform capabilities through an MCP server hosted on AgentCore runtime. Because MoEngage’s existing platform APIs for campaigns, analytics, segments, content, and flows were already compliant with OpenAPI 3.0 specifications, the engineering team used the FastMCP framework to generate standardized MCP tools directly from those specifications.

These tools fall into five functional categories: campaign tools, analytics tools, segmentation tools, content tools, and flow tools. When APIs are updated, the corresponding tool definitions automatically update alongside them.

Behind these tools, Merlin AI operates across four distinct agent modes:

  • Embedded agents in Merlin AI Studio: Specialized assistants like Copywriter, Designer, Segment Assist, Jinja Assist, In-app Template Builder, and Flow Assist perform focused tasks directly within existing product workflows.
  • Conversational agents: Embedded agents like the Campaign Insights Agent delegate analytics requests to specialized sub-agents that evaluate metrics, diagnose underperformance, and format findings.
  • Custom agents: Lifecycle teams can build continuously running agents governed by clear rules and activity logs, operating either autonomously or with human review before execution.
  • Decisioning agents: Autonomous services such as Offer Decisioning and Campaign Decisioning dynamically determine content, timing, frequency, and channel selection for individual end-users.

Reasoning, planning, and content generation across these agents are powered by foundation models on Amazon Bedrock, including Anthropic Claude Sonnet 4.6, Claude Sonnet 5, and Claude Sonnet 5.5.

Multi-tenant security and architectural isolation

Operating AI agents across multi-tenant enterprise software introduces strict security requirements. A primary architectural risk is preventing foundation models from inadvertently accessing or exposing cross-tenant data. MoEngage implemented three specific boundary controls to address this challenge:

First, authentication remains completely outside the model's scope. The MCP server reuses existing JSON Web Tokens (JWT), which are validated by the AgentCore runtime before any request reaches the server. Second, user and workspace context are passed exclusively through HTTP request headers forwarded by the runtime, ensuring the model never sees or modifies tenant identification parameters. Third, AgentCore runtime executes each user session within its own isolated runtime environment.

Additionally, Amazon Bedrock Guardrails enforce content safety and personally identifiable information (PII) filtering, while a backend-for-frontend layer validates generated structural schemas before rendering content inside the application interface.

What it means for developers

For engineering teams managing established SaaS applications, MoEngage's deployment provides a practical blueprint for introducing agentic capabilities without rewriting existing core services. By wrapping OpenAPI 3.0 specs with FastMCP and hosting them on a managed runtime like AgentCore, developers can quickly grant foundation models safe access to internal backend tools.

In production for over six months, this pattern has delivered measurable operational and performance gains:

  • Consumer platform Glance reduced campaign go-live turnaround times by 50%, increased push notification click-through rates (CTR) by 38%, and generated three times more content variants per campaign.
  • Across the platform, manual efforts for channel, timing, and frequency configuration dropped by 60–70%.
  • Goal-driven decisioning agents improved conversion rates by 20–30%.
  • Shifting to managed, pay-per-token inference on Amazon Bedrock cut AI infrastructure costs by over 50% compared to self-hosted model deployments.

For developers exploring multi-model evaluation and building context-aware agent systems, access to reliable inference infrastructure remains essential. Developers can try top AI models cheaply through one API at https://apixoai.online to compare model capabilities across various tool-calling tasks.

MoEngage's architecture proves that software providers do not need to rebuild their backend stacks to participate in the agentic shift. By keeping identity out of prompts, isolating session environments, and generating standardized tool interfaces directly from API specifications, software platforms can safely connect LLMs to live operational systems.


Source: How MoEngage built agentic customer engagement on Amazon Bedrock AgentCore | Amazon Web Services — AWS Machine Learning. Written by the Apixo team from that report.

#ai-news#aws#amazon-bedrock#mcp#ai-agents#moengage
Try it with your own tools

One key for Claude, GPT, GLM, DeepSeek and more. Pay per token with crypto.

Get your API key

Keep reading