Aerostack
extension

Recommendation Engine Edge Function — Ecommerce

Ecommerce

Personalized recommendations with user history tracking. Ingest your catalog, log interactions, get AI-ranked recommendations with explanations.

aerostack @aerostack verified
Updated Mar 13, 2025
GitHub

Edge function Recommendation Engine Personalized recommendations with user history tracking. Ingest your catalog, log interactions, get AI-ranked recommendations with explanations.. Deployed on Cloudflare Workers — zero cold starts, globally distributed. Mount it via your Aerostack workspace to call it from any AI agent.

terminal — aerostack cli
$ npx aerostack add aerostack/recommendation-engine
smart_toy

Use with AI Assistants

MCP

Connect Claude, Cursor, or any MCP-compatible client — then call this function by slug

① Add MCP Server

Add this once — access all Aerostack functions from your AI tool.

claude_desktop_config.json
{
  "mcpServers": {
    "aerostack": {
      "url": "https://mcp.aerostack.dev",
      "type": "http"
    }
  }
}

② Call this function

Ask your AI to use the call_function tool with this slug:

call_function
call_function({
  slug: "recommendation-engine",
  args: {}
})

Recommendation Engine

Ingest your product/content catalog, log user interactions, and get AI-powered personalized recommendations.

Endpoints

Method Path Description
POST /ingest-items Vectorize catalog items via RAG
POST /recommend Personalized recs based on user history
POST /similar Find items similar to a given item
POST /interact Log user interaction (view/purchase/rate)
GET /trending Top items by interaction score
GET /health Status check

Recommend

curl -X POST {endpoint}/recommend \
  -H "Authorization: Bearer {key}" \
  -d '{"userId":"user-123","count":5}'

Metadata

upgrade Version 1.0.0
gavel License MIT
language Language javascript
cloud Provider cloudflare-worker

Tags

rag recommendations personalization kv ai
deployed_code

Build and publish your own functions

Write a TypeScript function, deploy it to the edge, and share it with thousands of developers — in minutes.

Frequently asked questions

What does the Recommendation Engine function do? +

Recommendation Engine is a serverless edge function for ecommerce automation written in cloudflare-worker. Deploy it to Cloudflare Workers via your Aerostack workspace.

How do I deploy the Recommendation Engine function? +

Install the Aerostack CLI and run: ```bash aerostack deploy function @aerostack/recommendation-engine ``` It will be live on Cloudflare Workers in seconds.

What runtime does Recommendation Engine use? +

Recommendation Engine runs on cloudflare-worker on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.

Can I customise the Recommendation Engine function? +

Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.