@cellar-door/langchain
⚠️ Pre-release software — no formal security audit has been conducted. This project is published for transparency, review, and community feedback. It should not be used in production systems where security guarantees are required. If you find a vulnerability, please report it to hawthornhollows@gmail.com.
LangChain integration for cellar-door-exit and cellar-door-entry — cryptographically signed, verifiable agent departure and arrival markers.
Part of the EXIT Protocol.
Installation
npm install @cellar-door/langchain @langchain/core cellar-door-exit cellar-door-entry
EXIT Tools
Exit Tool
import { createExitTool } from "@cellar-door/langchain";
const tool = createExitTool();
Exit Callback Handler
import { ExitCallbackHandler } from "@cellar-door/langchain";
const handler = new ExitCallbackHandler({
origin: "my-app",
onMarker: (marker) => console.log("Departed:", marker.id),
});
const result = await chain.invoke(input, { callbacks: [handler] });
ENTRY Tools
Entry Tool — Verify and Create Arrival
import { createEntryTool } from "@cellar-door/langchain";
const entryTool = createEntryTool();
Admission Policy Tool
import { createAdmissionPolicyTool } from "@cellar-door/langchain";
const admissionTool = createAdmissionPolicyTool();
Transfer Verification Tool
import { createTransferVerificationTool } from "@cellar-door/langchain";
const transferTool = createTransferVerificationTool();
Callback Handler with Arrival
import { ExitCallbackHandler } from "@cellar-door/langchain";
const handler = new ExitCallbackHandler({
origin: "platform-a",
arrivalDestination: "platform-b",
onMarker: (marker) => console.log("EXIT:", marker.id),
onArrival: (arrival) => console.log("ARRIVAL:", arrival.id),
});
API
EXIT
createExitTool(opts?) — DynamicStructuredTool for creating EXIT markers
ExitCallbackHandler — Callback handler for automatic EXIT (and optionally ENTRY) markers
ENTRY
createEntryTool() — Tool to verify EXIT + create arrival
createAdmissionPolicyTool() — Tool to evaluate admission policies
createTransferVerificationTool() — Tool to verify EXIT→ENTRY transfers
⚠️ Disclaimer
WARNING: Automated admission decisions should be reviewed by platform operators. This integration does not constitute legal advice. Platforms are responsible for their own admission policies and the consequences of admitting agents.
License
Apache-2.0