Code PluginExecutes codesource-linked

LinkMind Context Engine

LinkMind Context Engine Plugin for OpenClaw

Community code plugin. Review compatibility and verification before install.
linkmind-context · runtime id linkmind-context
Install
openclaw plugins install clawhub:linkmind-context
Latest Release
Version 1.0.0
Compatibility
{
  "builtWithOpenClawVersion": "2026.3.8",
  "minGatewayVersion": "2026.3.8",
  "pluginApiRange": ">=1.0.0",
  "pluginSdkVersion": "2026.3.8"
}
Capabilities
{
  "bundledSkills": [],
  "capabilityTags": [
    "executes-code"
  ],
  "channels": [],
  "commandNames": [],
  "configSchema": true,
  "configUiHints": false,
  "executesCode": true,
  "hooks": [],
  "httpRouteCount": 0,
  "materializesDependencies": false,
  "providers": [],
  "runtimeId": "linkmind-context",
  "serviceNames": [],
  "setupEntry": false,
  "toolNames": []
}
Verification
{
  "hasProvenance": false,
  "scanStatus": "not-run",
  "scope": "artifact-only",
  "sourceCommit": "0a5640f9dc0e77e45d9d2d3b54fcc76b6e13f995",
  "sourceRepo": "landingbj/linkmind-context",
  "sourceTag": "main",
  "summary": "Validated package structure and linked the release to source metadata.",
  "tier": "source-linked"
}
Tags
{
  "latest": "1.0.0"
}

LinkMind Context Engine Plugin for OpenClaw

linkmind-context is a native OpenClaw plugin that registers a custom context engine via api.registerContextEngine(id, factory). It compacts long conversation history by sending the current session messages to the LinkMind API and can be selected through plugins.slots.contextEngine.

Repository: landingbj/linkmind-context

Features

  • Registers a native OpenClaw context engine named linkmind-context
  • Triggers compaction when the accumulated context exceeds a configurable threshold
  • Calls POST /openclaw/compress on the LinkMind service
  • Supports optional bearer-token authentication
  • Keeps the plugin configuration validated through openclaw.plugin.json

Project Layout

linkmind-context/
|- src/
|  |- index.ts
|  `- types.ts
|- openclaw.plugin.json
|- package.json
|- tsconfig.json
`- README.md

Requirements

  • Node.js 22 or newer
  • OpenClaw with plugin support enabled
  • A reachable LinkMind service endpoint

Install for Local Development

npm install
npm run build
openclaw plugins install .

After installing, restart the OpenClaw gateway so the plugin can be discovered and loaded.

Install from a Published Package

Once the package is published, users can install it with:

openclaw plugins install linkmind-context

OpenClaw checks ClawHub first and falls back to npm automatically.

OpenClaw Configuration

Configure the plugin in your OpenClaw config file and select it as the active context engine:

{
  "plugins": {
    "slots": {
      "contextEngine": "linkmind-context"
    },
    "entries": {
      "linkmind-context": {
        "enabled": true,
        "config": {
          "apiUrl": "http://localhost:8080/v1",
          "apiKey": "",
          "compressionThreshold": 1000,
          "debug": false
        }
      }
    }
  }
}

Configuration Reference

FieldTypeDefaultDescription
apiUrlstringhttps://api.linkmind.dev/v1Base URL of the LinkMind service
apiKeystring""Optional bearer token
compressionThresholdnumber1000Compaction trigger threshold in characters
debugbooleanfalseEnables verbose gateway logs

LinkMind API Contract

The plugin calls this endpoint:

POST /v1/openclaw/compress
Content-Type: application/json
Authorization: Bearer <token>

Example request body:

{
  "sessionId": "session-123",
  "messages": [],
  "tokenBudget": 128000,
  "currentTokenCount": 2048
}

Expected response shape:

{
  "status": "success",
  "messages": [],
  "tokensBefore": 2048,
  "tokensAfter": 768
}

If status is not success, the plugin treats the response as a compaction failure and keeps the original context.

Publish Checklist

  • package.json includes openclaw.extensions
  • openclaw.plugin.json exists at the package root
  • The published tarball includes dist/, README.md, and openclaw.plugin.json
  • Source code is hosted publicly on GitHub
  • This README documents installation and configuration

Development Notes

  • Build output is emitted to dist/
  • npm pack and npm publish will run npm run build first through prepack
  • For a production release, publish the package, then submit it to the OpenClaw community plugin list with the package name, repository URL, description, and install command

License

ISC