// INTEGRATION RECIPES

Inherit human reasoning state in a few lines.

LangSmith captures what your agent did. UNIHODL captures what the human was thinking before the agent started — open tabs, partial conclusions, the intended next step. Pass it in and stop cold-starting every conversation.

Get an API key — free for 10,000 hydrations/mo →

Claude Desktop / Cursor / Cline (MCP)

Add the MCP server and any MCP-aware agent gains resume + list_sessions tools. Zero code.

// ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "unihodl": {
      "command": "npx",
      "args": ["-y", "@unihodl/mcp-server"],
      "env": { "UNIHODL_API_KEY": "uh_live_…" }
    }
  }
}
// Restart, then ask: "resume ses_8f3aZ91b"
// (sandbox key: uh_test_sandbox_demo_key_v0)

TypeScript — @unihodl/agent-sdk

Hydrate a session into a prompt-ready block and inject it as your system prompt.

import { Client } from "@unihodl/agent-sdk";

const uh = new Client({
  apiKey: process.env.UNIHODL_KEY!,
  baseUrl: "https://www.unihodl.app/api",
});

// The human's open tabs, scroll/video anchors, partial conclusions,
// and intended next step — rendered ready to inject:
const ctx = await uh.sessions.hydrate("ses_8f3aZ91b", { format: "prompt-ready" });

const systemPrompt = ctx.asSystemPrompt();
// → your agent starts where the human left off, not cold.

LangChain / LangGraph

Prepend the human's reasoning state as the first system message.

import { Client } from "@unihodl/agent-sdk";
import { SystemMessage } from "@langchain/core/messages";

const uh = new Client({ apiKey: process.env.UNIHODL_KEY!, baseUrl: "https://www.unihodl.app/api" });
const ctx = await uh.sessions.hydrate(sessionId, { format: "prompt-ready" });

const messages = [new SystemMessage(ctx.asSystemPrompt()), ...userMessages];
await graph.invoke({ messages });

Discover what the human was working on

No session id? List the workspace, newest first, with cursor pagination.

const { sessions, next_cursor } = await uh.sessions.list({ limit: 10 });
// sessions: [{ session_id, title, summary, captured_at, ai_tags }]
// then: await uh.sessions.hydrate(sessions[0].session_id, { format: "prompt-ready" })

Ship Resume Tokens? Add the badge.

If your framework or agent speaks the Resume Token protocol, drop this in your README:

Resume Token compatible
[![Resume Token compatible](https://www.unihodl.app/badge/resume-token)](https://www.unihodl.app/sdk)