DaaS / Products / AI Content Platform with Site and Search

AI Content Platform with Site and Search

A Bailian AI agent autonomously manages all organizational content in Notion, simultaneously publishing marketing pages to a Vercel-hosted public website and ingesting knowledge articles into an IDaaS-secured Elasticsearch cluster with PAI-trained ranking models — forming a unified AI-driven content and search platform.

Products involved

Scenario

Use this architecture when building an enterprise-grade content platform that requires zero-touch content generation, instant public site deployment, and secure, AI-optimized internal search. It’s ideal for teams needing a Bailian-driven autonomous agent to curate Notion databases, publish marketing pages via Vercel, and index knowledge articles into an IDaaS-protected Elasticsearch cluster with PAI-trained semantic ranking.

Integration steps

  1. Initialize Notion CMS & MCP Server: Create a Notion database and generate an Internal Integration token with content:read and content:write scopes. Deploy the notion-build-ai MCP server and configure mcp.json:
  2. ``json { "notion_token": "ntn_...", "database_id": "your_db_id", "server_url": "https://mcp.yourdomain.com" } ``

  3. Configure Bailian AI Agent: In Alibaba Cloud Bailian, create an agent workflow. Attach the MCP server endpoint and set system prompts to output structured JSON matching your Notion schema. Enable M2M auth via IDaaS:
  4. ``bash aliyun bailian CreateAgent --Name content-manager --McpEndpoint https://mcp.yourdomain.com --AuthProvider idaas ``

  5. Provision Infrastructure with Terraform: Deploy ECS, OSS, and an Elasticsearch cluster secured by IDaaS. Use the provided Terraform module:
  6. ``bash terraform apply -var="es_cluster_name=ai-search-prod" -var="idaas_client_id=$IDAAS_CLIENT" ``

  7. Set Up Vercel Deployment Pipeline: Connect your Git repo to Vercel. Configure vercel.json for ISR and Cloudflare edge routing:
  8. ``json { "rewrites": [{ "source": "/api/content", "destination": "https://mcp.yourdomain.com/sync" }] } ``

  9. Ingest & Rank with PAI + Elasticsearch: Train a semantic ranking model in PAI Studio. Export the model to OSS, then configure the ES ingest pipeline:
  10. ``json PUT _ingest/pipeline/ai-rank { "processors": [{ "pai_ranking": { "model_id": "oss://pai-models/v1", "field": "content_vector" } }] } ``

  11. Wire Dual-Publish Webhook: In Notion, set up a webhook to trigger on page.created. The Bailian agent intercepts, pushes markdown to Vercel via POST /api/deploy, and streams JSON to ES via POST /_bulk?pipeline=ai-rank.

Architecture

Data originates from the Bailian AI agent, which writes structured content to Notion as the single source of truth. A webhook/MCP bridge triggers a parallel pipeline: (1) Vercel fetches updated Notion pages, runs SSG/ISR, and serves the public site behind Cloudflare’s WAF and edge cache; (2) Simultaneously, raw text and metadata are pushed to an IDaaS-secured Elasticsearch cluster. An ingest pipeline enriches documents with embeddings, which are then ranked by a PAI-trained model. All search queries are gated by IDaaS JWT validation.

Prerequisites

Common pitfalls

Typical questions

FAQ

Q: How does the Bailian AI agent manage Notion content to power both the public website and enterprise search? A: A Bailian AI agent autonomously manages all organizational content in Notion to simultaneously publish marketing pages to a Vercel-hosted public website and ingest knowledge articles into an IDaaS-secured Elasticsearch cluster. This unified AI-driven platform leverages PAI-trained ranking models to optimize search accuracy while maintaining secure access through IDaaS integration.