DaaS / Products / AI Content Platform with Search and Frontend

AI Content Platform with Search and Frontend

Bailian AI agents autonomously curate knowledge content in Notion (secured via IDaaS M2M auth), a parallel pipeline ingests that content into Elasticsearch with PAI-trained ranking models, and a Vercel-hosted frontend application serves both the AI-generated pages and search results to end users — forming a complete AI-driven knowledge platform with enterprise auth, intelligent search, and public-facing web presence.

Products involved

Scenario

Use this architecture when building an enterprise-grade, self-maintaining knowledge platform where Alibaba Cloud Bailian AI agents autonomously generate and curate content in Notion, secured via IDaaS M2M authentication. It’s ideal for teams requiring a parallel Elasticsearch ingestion pipeline with PAI-trained ranking models, delivered globally via a Vercel-hosted frontend with Cloudflare edge caching.

Integration steps

  1. Provision Infrastructure & Auth: Deploy base resources via Terraform (terraform apply -var="env=prod"). Configure Alibaba Cloud IDaaS for M2M keyless auth, generating a client_id and client_secret for the Bailian agent.
  2. Initialize Notion CMS: Create a Notion database and generate an Internal Integration token with content:read and content:write scopes. Export the DATABASE_ID and NOTION_API_KEY.
  3. Deploy Notion MCP Server: Scaffold the MCP server using notion-build-ai. Configure mcp.json:
  4. ``json { "mcpServers": { "notion": { "command": "node", "args": ["dist/index.js"], "env": { "NOTION_API_KEY": "<key>", "DATABASE_ID": "<id>" } } } } ``

  5. Configure Bailian AI Agent: In Bailian console, bind IDaaS M2M credentials to the agent. Enable MCP tool calling pointing to https://<domain>/mcp. Set system prompt to autonomously draft and publish pages to DATABASE_ID.
  6. Build Search Ingestion Pipeline: Deploy an ECS worker polling Notion via POST https://api.notion.com/v1/databases/{DATABASE_ID}/query. Pipe blocks to Elasticsearch (PUT /knowledge-index/_doc/{id}) and trigger PAI ranking inference via POST https://pai-api.aliyuncs.com/v1/rank.
  7. Connect Vercel Frontend: Run vercel link and vercel env pull. Integrate Notion as headless CMS via vercel-integrate-services. Configure Next.js routes to fetch pages (GET /api/notion/pages) and query Elasticsearch (POST /api/search?q=...).
  8. Deploy & Route: Push to production (vercel --prod). Route traffic through Cloudflare Workers, mapping domains to Vercel and securing API endpoints with IDaaS JWT validation.

Architecture

Data originates from Bailian AI agents, which authenticate via IDaaS M2M and write structured content to Notion via MCP tool calls. Notion acts as the source-of-truth headless CMS. A parallel ECS-based worker syncs Notion updates to Elasticsearch, enriching documents with PAI-trained ranking scores. The Vercel frontend queries both Notion (for page rendering) and Elasticsearch (for ranked search results), with Cloudflare handling edge routing, caching, and WAF.

Prerequisites

Common pitfalls

Typical questions

FAQ

Q: What is the AI content platform with search and a public website? A: It is a complete AI-driven knowledge platform that integrates Bailian AI agents, Notion, Elasticsearch, and a Vercel-hosted frontend. Bailian agents autonomously curate content in Notion secured by IDaaS M2M auth, while a parallel pipeline indexes the data into Elasticsearch with PAI-trained ranking models. The Vercel application then serves both the AI-generated pages and search results to end users through a public-facing web interface.