
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@memberjunction/ai-recommendations-rex
Advanced tools
MemberJunction Recommendations Provider for rasa.io Rex engine
MemberJunction recommendation provider for the rasa.io Rex recommendation engine. Retrieves content recommendations from Rex and saves them into MJ Recommendation/Recommendation Item entities.
This package implements RecommendationProviderBase for the rasa.io Rex engine. It authenticates with the Rex API, looks up vector IDs from MJ Entity Record Documents, requests content-based recommendations via Rex's /suggest endpoint, and persists the results as RecommendationItem entities in the MemberJunction database.
graph TD
PROVIDER["RexRecommendationsProvider"] --> TOKEN["Get Rex Access Token\n(/tokens)"]
PROVIDER --> DOCS["Load Entity Record Documents\n(Vector IDs)"]
PROVIDER --> SUGGEST["Get Recommendations\n(/suggest)"]
PROVIDER --> SAVE["Save Recommendation Items\n(MJ Entities)"]
TOKEN --> REXAPI["Rex API"]
SUGGEST --> REXAPI
DOCS --> RUNVIEW["RunView\n(Entity Record Documents)"]
SAVE --> MJDB["MJ Database"]
style PROVIDER fill:#7c5295,stroke:#563a6b,color:#fff
style TOKEN fill:#2d6a9f,stroke:#1a4971,color:#fff
style DOCS fill:#2d6a9f,stroke:#1a4971,color:#fff
style SUGGEST fill:#2d6a9f,stroke:#1a4971,color:#fff
style SAVE fill:#2d6a9f,stroke:#1a4971,color:#fff
style REXAPI fill:#b8762f,stroke:#8a5722,color:#fff
style RUNVIEW fill:#2d8659,stroke:#1a5c3a,color:#fff
style MJDB fill:#2d8659,stroke:#1a5c3a,color:#fff
"rasa.io Rex"npm install @memberjunction/ai-recommendations-rex
Set the following environment variables:
| Variable | Required | Description |
|---|---|---|
REX_API_HOST | Yes | Rex API base URL for authentication |
REX_RECOMMEND_HOST | Yes | Rex recommendation service URL |
REX_USERNAME | Yes | Rex API username |
REX_PASSWORD | Yes | Rex API password |
REX_API_KEY | Yes | Rex API key |
REX_BATCH_SIZE | No | Batch size for processing (default: 200) |
import { RexRecommendationsProvider } from '@memberjunction/ai-recommendations-rex';
import { RecommendationRequest } from '@memberjunction/ai-recommendations';
// The provider is auto-registered as "rasa.io Rex" via @RegisterClass.
// It can also be instantiated directly:
const provider = new RexRecommendationsProvider();
const request: RecommendationRequest = {
Recommendations: recommendationEntities, // Array of RecommendationEntity
RunID: 'run-id',
CurrentUser: contextUser,
Options: {
EntityDocumentID: 'entity-doc-id', // Required
type: 'course', // Rex content type
filters: [{ type: 'course', max_results: 10 }],
TypeMap: { // Optional: custom type-to-entity mapping
'course': 'Contents',
'person': 'Contributors'
}
}
};
const result = await provider.Recommend(request);
if (result.Success) {
console.log('Recommendations generated successfully');
} else {
console.error('Errors:', result.Errors);
}
| Dependency | Purpose |
|---|---|
@memberjunction/ai-recommendations | RecommendationProviderBase abstract class |
@memberjunction/core | Metadata, RunView, LogError, LogStatus |
@memberjunction/core-entities | Entity types (RecommendationEntity, RecommendationItemEntity, etc.) |
@memberjunction/global | @RegisterClass decorator |
axios | HTTP client for Rex API calls |
@memberjunction/ai-recommendations - Base recommendation provider abstraction@memberjunction/ai-vectors-pinecone - Pinecone vector database provider (source of vector IDs)ISC
FAQs
MemberJunction Recommendations Provider for rasa.io Rex engine
The npm package @memberjunction/ai-recommendations-rex receives a total of 1,942 weekly downloads. As such, @memberjunction/ai-recommendations-rex popularity was classified as popular.
We found that @memberjunction/ai-recommendations-rex demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.