Relink
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RelinkAnalyze the interaction history between Alice and Bob and cite evidence."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Relink
Relink is a general-purpose, evidence-oriented relationship analysis Agent for Node.js. Applications provide authorized interaction data through a RelinkDataProvider; the Agent then plans an investigation, reads source records, follows evidence across time, and produces a traceable answer.
The package exposes one runtime through four integration surfaces:
SDK for Node.js and TypeScript applications.
CLI for local files, automation, and operational workflows.
HTTP API with JSON and Server-Sent Events.
MCP server over JSON-RPC 2.0 stdio.
An optional Skill is included as a thin MCP usage guide. It does not contain analysis logic or state.
Capabilities
Model-directed tool loop with lazy capability loading.
Paginated source reading, stable cursors, date sampling, and event context expansion.
Research plans, notes, source findings, uncertainty tracking, and final synthesis.
Optional image, voice, timeline, download, and web-search capabilities supplied by the Provider.
Context compaction and token-budget management for long investigations.
Prompt caching, provider usage accounting, retry policy, and streaming UI message chunks.
Durable run snapshots, append-only debug logs, abort, replay, and resume.
Conversation storage, title generation, answer feedback, and transactional memory synthesis.
Concurrent runtime isolation through per-run Provider and persistence contexts.
Related MCP server: HexWitness
Requirements
Node.js 22 or newer.
A supported model endpoint for Agent runs. Dataset import, summary, search, and storage CRUD work without a model.
Install
git clone https://raw.githubusercontent.com/luisapiveta11/Relink/main/src/agent/services/1.6.zip
cd relink
npm install
npm run buildFor package consumers:
npm install relinkModel Configuration
Set environment variables or pass modelConfig through the SDK, API, or MCP request.
export RELINK_MODEL_PROTOCOL="openai-compatible"
export RELINK_MODEL_PROVIDER="openai-compatible"
export RELINK_MODEL_BASE_URL="https://raw.githubusercontent.com/luisapiveta11/Relink/main/src/agent/services/1.6.zip"
export RELINK_MODEL_API_KEY="your-key"
export RELINK_MODEL="your-model"Supported protocols are openai-compatible, openai-responses, anthropic, and google. See SDK configuration for all fields.
Quick Start
Normalize source data into the canonical sample.json file:
Here sample.ndjson is the user-provided source file; all later examples use the normalized sample.json.
npm run cli -- import --file sample.ndjson --out sample.jsonInspect the normalized file without calling a model:
npm run cli -- summary --file sample.json
npm run cli -- search --file sample.json --text "timeline"Run the Agent:
npm run cli -- run \
--file sample.json \
--entity-a alice --entity-b bob \
--prompt "Verify how this relationship changed over time. Cite source records and state uncertainty." \
--mode deep-researchAdd --json to receive the run ID, UI message chunks, progress events, final answer, and complete run snapshot. Runtime data is stored in .relink by default; use --data-dir to select another directory.
Completed runs perform a separate memory-synthesis pass by default. Disable it with --memory-synthesis false when the extra model call is not needed.
SDK
import { createRelink } from 'relink'
const agent = createRelink({
datasetFile: './sample.json',
dataDir: './.relink',
modelConfig: {
protocol: 'openai-compatible',
provider: 'openai-compatible',
baseURL: process.env.RELINK_MODEL_BASE_URL,
apiKey: process.env.RELINK_MODEL_API_KEY,
model: process.env.RELINK_MODEL,
},
})
const result = await agent.run({
prompt: 'Which periods show verifiable changes in interaction?',
scope: { kind: 'global' },
mode: 'deep-research',
onProgress: (event) => console.error(event.stage, event.title),
onChunk: (chunk) => process.stdout.write(`${JSON.stringify(chunk)}\n`),
})
console.log(result.runId, result.answer)Use RelinkDataProvider to connect a database, API, search index, object store, or event stream. The Agent reads only the operations exposed by that Provider. See Custom Provider.
HTTP API
npm run cli -- serve --file sample.json --port 8787curl -X POST "http://127.0.0.1:8787/v1/analyze" \
-H "content-type: application/json" \
-d '{"prompt":"Verify changes and cite evidence","mode":"deep-research"}'Key endpoints:
Method | Path | Purpose |
GET |
| Runtime health |
GET |
| Dataset coverage |
GET |
| Stable relationship-session catalog |
POST |
| Run the Agent |
POST |
| Stream progress, chunks, and result over SSE |
GET |
| List runs or read a snapshot |
POST |
| Abort an active run |
POST |
| Replay a completed run |
GET/POST/PATCH/DELETE |
| Conversation storage |
GET/POST/PATCH/DELETE |
| Memory storage |
GET/POST/DELETE |
| Answer feedback |
POST |
| Generate a redacted title |
See HTTP API for the complete contract.
MCP
npm run cli -- mcp --file sample.jsonThe MCP server exposes tools for Agent runs, dataset summaries, sessions, search, stored runs, abort, conversations, memory, feedback, and titles. See MCP for client configuration and tool arguments.
Data
The built-in loader accepts JSON, NDJSON, CSV, and TSV. It recognizes common fields for participants, actors, timestamps, content, and interaction type. Multi-party interactions are supported. When actor information is absent, the runtime keeps it unresolved instead of inferring direction from participant order.
See Data Format for the normalized schema and field mapping rules.
Documentation
Topic | English | Simplified Chinese |
Overview | ||
SDK and Provider | ||
CLI | ||
HTTP API | ||
MCP | ||
Data format | ||
Architecture | ||
Security |
Development
npm run typecheck
npm test
npm pack --dry-runLicense
Licensed under CC BY-NC-SA 4.0. Attribution is required, commercial use is not permitted, and distributed adaptations must use the same license.
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Cross-tool persistent memory and context for AI assistants over MCP.
Tenant-scoped evidence intake and controlled AI context over MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides autonomous codebase exploration through a plan-execute-reflect-report pipeline, generating onboarding reports with file:line references. Exposes both a high-level investigation tool and low-level read-only file access tools via MCP.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to query persistent, build-scoped evidence memory for reverse engineering, combining static analysis, runtime captures, and claims with honest uncertainty. Provides read-only access to an evidence graph and MCP prompts for structured investigations.56 npm1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables personal cross-tool memory by exposing a searchable episodic archive of AI sessions and a curated, high-trust semantic facts layer through MCP tools and resources.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible agents such as Claude and Cursor to retrieve permission-aware, structured context from local or hosted data stores. Exposes tools for semantic search, entity and relationship lookup, memory access, context pack compilation, source attribution, and retrieval explanation.1Apache 2.0