MRP-VM organizes all behavior through five typed plugin families. The VM core provides only the LLM bridge, execution frames, and plugin orchestration. All domain logic belongs to plugins.
| Type | Role in VM Loop | Phase |
|---|---|---|
| sd-plugin | Extracts intents (fine-grained) and knowledge (semantically coherent KUs) from user input or source text. | Seed Generation |
| mrp-plan-plugin | Builds execution plans ordering plugins per stage. Uses descriptions and plannerHints for relevance filtering. May request task decomposition. | Plan Generation |
| kb-plugin | Retrieves relevant Knowledge Units from the hierarchical KB at the appropriate abstraction level. Builds plugin-private indices during ingest. | Task Resolution |
| gs-plugin | Produces grounded answers from resolved intents and retrieved evidence. May signal needs-decomposition. | Task Resolution |
| val-plugin | Validates goal solver output. Rejection triggers planner backtracking. | Result Composition |
| ID | Description | Uses LLM | Cost |
|---|---|---|---|
sd-symbolic | Rule-based intent and knowledge extraction. Fast, deterministic, no LLM cost. Best for simple factual queries and structured input. | No | cheap |
sd-llm-fast | Lightweight LLM-backed normalization. Good balance of quality and speed for most conversational input. | Yes | moderate |
sd-llm-deep | Thorough LLM normalization with richer intent decomposition. Best for ambiguous, multi-part, or complex requests. | Yes | expensive |
| ID | Description | Backend | Cost |
|---|---|---|---|
kb-fast | Lexical-first retrieval with small result budget. Cheapest path, suitable for simple focused questions. | BM25 (DS009) | cheap |
kb-balanced | Lexical + associative retrieval with diversity-aware reranking. Recommended default for moderate-complexity questions. | BM25 + HDC/VSA (DS009, DS024) | moderate |
kb-thinkingdb | Lexical + bounded symbolic closure. Best for multi-hop, relation-sensitive, or proof-bearing retrieval tasks. | BM25 + ThinkingDB (DS009, DS025) | expensive |
| ID | Description | Uses LLM | Cost |
|---|---|---|---|
gs-symbolic | Deterministic answer assembly from retrieved evidence. No LLM cost. Produces structured bullet-point answers. | No | cheap |
gs-llm-fast | Lightweight LLM synthesis from evidence. Good fluency with low latency. | Yes | moderate |
gs-llm-deep | Thorough LLM synthesis with richer reasoning. Best for complex or nuanced answers. | Yes | expensive |
| ID | Description | Style |
|---|---|---|
planner-default | Adaptive cheap-first planner with EWMA learning. Inspects task signals (depth, speed, symbolic cues) to adjust ordering. | cheap-first |
planner-depth | Heavy-first fallback planner for multi-hop or recovery paths. Used when cheap planners exhaust their options. | deep-first |
| ID | Description | Uses LLM |
|---|---|---|
val-llm | LLM-backed response validator. Checks that the answer is grounded in evidence and addresses the question. Rejection triggers replanning. | Yes |
Decide which phase of the execution loop your plugin serves. Each type has a specific contract defined in DS027.
Every plugin must implement:
getDescriptor() — returns the plugin descriptor (see below)sd-plugin: detectSeeds(input, ctx), normalizePersistentContext(input, ctx)kb-plugin: retrieve(input, ctx), onSourceText(input, ctx)gs-plugin: solve(input, ctx)val-plugin: validate(input, ctx)mrp-plan-plugin: buildPlan(input, ctx), recordOutcome(outcome, ctx){
id: "my-kb-plugin",
type: "kb-plugin",
name: "My Custom KB Retriever",
version: "1.0.0",
description: "Semantic search using embeddings.
Best for long-form technical documents.",
costClass: "moderate",
usesLLM: false,
modelRoles: [],
maxLLMCalls: 0,
tags: ["custom", "embeddings"],
timeoutMs: 15000,
plannerHints: {
expectedLatencyMs: 200,
expectedLLMCalls: 0,
relativeCost: 0.3,
supportedActs: ["explain", "compare", "define"],
topicTags: ["technical"],
preferredDepth: "medium",
confidenceWhenMatched: 0.7
},
provides: ["retrieve-context"],
accepts: ["chat-turn", "source-text"]
}
id and type are mandatorydescription must be concise (1–3 sentences) and operationally useful for planner filteringplannerHints are required for sd-plugin, kb-plugin, gs-pluginmaxLLMCalls must be a conservative upper bound — the core uses it for budget pre-checksRegister programmatically in src/server/index.mjs during boot:
typedPluginRegistry.register(new MyKBPlugin(...));
Create a directory under wrappers/:
wrappers/my-plugin/
├── manifest.json # descriptor + command + args
├── wrapper.js # (or .py, .rs, etc.)
└── README.md
The manifest.json follows the same descriptor shape plus:
{
"command": "node",
"args": ["wrapper.js"],
"protocolVersion": 1,
"maxInputSizeBytes": 65536
}
Add the plugin ID to pluginAllowlist in config/engine.json.
config/plugins.json — default plan ordering, fallback chainsconfig/llm-role-settings.json — model assignments per roleconfig/engine.json — budget limits, allowlisttest/deterministic/test/live-llm/test/evaluation/suiteXX/Plugins communicate through natural language using CNL formats:
sd-plugin output, consumed by decomposer and plannersd-plugin and consumed by kb-plugin and gs-pluginThe VM is agnostic to the content inside these formats. It enforces only the structural delimiters (headings, field names) defined by each CNL schema.