You're signed in but haven't activated a plan yet.
Your payment was received — we're setting up your workspace.
Your tenant ID — include in X-HeurChain-Tenant header on every API call.
Bring existing content into your memory — paste text or drop a file.
Your memory is stored as Markdown files in a per-tenant vault. Download a snapshot at any time — yours to keep, re-import, or open in Obsidian.
Tip: click "Flush" first if you want the most recent activity included in the export.
Install the HeurChain skill into your agents so they recall before asking, tag and namespace memories correctly, and flush before context compaction. Works with Claude Code, Codex CLI, Hermes, OpenClaw, and any MCP or REST client.
Install to ~/.claude/skills/heurchain-memory/ (Claude Code),
~/.codex/skills/heurchain/ (Codex CLI),
$HERMES_HOME/skills/heurchain/ (Hermes), or your agent's skills directory.
Agents connecting via the API are also pointed to it automatically.
Connect any agent to HeurChain — via the REST API or any MCP-compatible client.
# Paste this whole block into your agent. It carries your credentials and the # full setup protocol — storing them, verifying, installing the skill, and the # habits that make memory work. Works with any agent that can run shell. You now have persistent memory via HeurChain. Follow every step below, then confirm what you did. CREDENTIALS (store these, never print them back or commit them): HEURCHAIN_TENANT="YOUR_TENANT_ID" HEURCHAIN_KEY="<your-api-key>" HEURCHAIN_URL="https://api.heurchain.com" STEP 1 — Persist the credentials where you will find them next session: Claude Code -> ~/.claude/CLAUDE.md Codex CLI -> ~/.codex/AGENTS.md Hermes -> ~/.hermes/config.yaml OpenClaw -> your OpenClaw config otherwise -> your own persistent config file Never write them into a chat transcript, a log, or a git-tracked file. STEP 2 — Verify: curl -s https://api.heurchain.com/health curl -s https://api.heurchain.com/memory/manifest \ -H "X-HeurChain-Tenant: $HEURCHAIN_TENANT" \ -H "X-HeurChain-API-Key: $HEURCHAIN_KEY" # Recall what YOU wrote last time. Use a stable agent_id every session. curl -s "https://api.heurchain.com/agent/your-agent-name?limit=10" \ -H "X-HeurChain-Tenant: $HEURCHAIN_TENANT" \ -H "X-HeurChain-API-Key: $HEURCHAIN_KEY" STEP 3 — Install the skill (pick your harness): Claude Code: mkdir -p ~/.claude/skills/heurchain-memory curl -s https://heurchain.com/skill.md -o ~/.claude/skills/heurchain-memory/SKILL.md Codex CLI: mkdir -p ~/.codex/skills/heurchain curl -s https://heurchain.com/skill.md -o ~/.codex/skills/heurchain/SKILL.md Hermes: mkdir -p $HERMES_HOME/skills/heurchain curl -s https://heurchain.com/skill.md -o $HERMES_HOME/skills/heurchain/SKILL.md MCP client: see the MCP tab — merge the mcpServers block into your client's config STEP 4 — Open a session and seed your config: curl -s -X POST https://api.heurchain.com/session/start \ -H "Content-Type: application/json" \ -H "X-HeurChain-Tenant: $HEURCHAIN_TENANT" \ -H "X-HeurChain-API-Key: $HEURCHAIN_KEY" \ -d '{"agent_id":"your-agent-name"}' curl -s -X POST https://api.heurchain.com/store \ -H "Content-Type: application/json" \ -H "X-HeurChain-Tenant: $HEURCHAIN_TENANT" \ -H "X-HeurChain-API-Key: $HEURCHAIN_KEY" \ -d '{"text":"Agent <name> runs on <harness>, workspace <path>.","agent_id":"your-agent-name","tags":["system-config"],"namespace":"self"}' Call POST /session/end when the conversation finishes. STEP 5 — Habits that decide whether this works: - RECALL BEFORE YOU ASK. Call /memory/manifest and /search before asking the user something they may have already told you. This is the entire point. - Always send agent_id on writes — it is the provenance trail. - Pick a namespace: self (durable, kept longest) | notes (default) | ops (short-lived). An unrecognised value is REJECTED with 400. - /store rejects unknown fields, so do NOT invent extras like "kind" or "triggers" — they fail the entire write with a 400. - Tag consistently: fact, decision, credential, project-context. - FLUSH BEFORE COMPACTION. When your context is about to be summarised, write what matters first. A summary is lossy; the raw detail is gone afterwards. Memory is shared across the agents in this workspace by default. Report back: where you stored the credentials, whether /health and the manifest responded, and which skill path you installed.
One block, any agent. Contains your live API key — paste only into your own agent.
curl -X POST https://api.heurchain.com/store \ -H "X-HeurChain-API-Key: <your-api-key>" \ -H "X-HeurChain-Tenant: YOUR_TENANT_ID" \ -H "Content-Type: application/json" \ -d '{ "text": "hello world", "agent_id": "chatgpt" }'
Advanced: pass your own embedding array if you have one — see /embed for the server-side embedder.
import anthropic, requests
client = anthropic.Anthropic()
msg = client.messages.create(
model="claude-opus-4-7",
max_tokens=1024,
messages=[{"role": "user", "content": "Your prompt"}],
)
text = msg.content[0].text
# HeurChain embeds server-side — no embedder needed here.
requests.post(
"https://api.heurchain.com/store",
headers={
"X-HeurChain-API-Key": "<your-api-key>",
"X-HeurChain-Tenant": "YOUR_TENANT_ID",
"Content-Type": "application/json",
},
json={"text": text, "agent_id": "claude"},
)
Pip-install: pip install anthropic requests
import openai, requests
client = openai.OpenAI()
resp = client.chat.completions.create(
model="gpt-5",
messages=[{"role": "user", "content": "Your prompt"}],
)
text = resp.choices[0].message.content
# HeurChain embeds server-side.
requests.post(
"https://api.heurchain.com/store",
headers={
"X-HeurChain-API-Key": "<your-api-key>",
"X-HeurChain-Tenant": "YOUR_TENANT_ID",
"Content-Type": "application/json",
},
json={"text": text, "agent_id": "chatgpt"},
)
Pip-install: pip install openai requests
import os, openai, requests
client = openai.OpenAI(
base_url="https://api.moonshot.ai/v1",
api_key=os.environ["MOONSHOT_API_KEY"],
)
resp = client.chat.completions.create(
model="kimi-k2-instruct",
messages=[{"role": "user", "content": "Your prompt"}],
)
text = resp.choices[0].message.content
requests.post(
"https://api.heurchain.com/store",
headers={
"X-HeurChain-API-Key": "<your-api-key>",
"X-HeurChain-Tenant": "YOUR_TENANT_ID",
"Content-Type": "application/json",
},
json={"text": text, "agent_id": "kimi"},
)
Pip-install: pip install openai requests
// inside an OpenClaw agent step
import { Agent } from 'openclaw';
const agent = new Agent({ /* your config */ });
const result = await agent.run({ task: 'Your task' });
await fetch('https://api.heurchain.com/store', {
method: 'POST',
headers: {
'X-HeurChain-API-Key': '<your-api-key>',
'X-HeurChain-Tenant': 'YOUR_TENANT_ID',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: result.output,
agent_id: 'openclaw',
}),
});
Install: npm install openclaw
# ~/.hermes/config.yaml — declare HeurChain as the memory provider # Restart Hermes after editing: # pkill -f "hermes gateway" && nohup hermes gateway run & memory: provider: http url: https://api.heurchain.com/store headers: X-HeurChain-API-Key: <your-api-key> X-HeurChain-Tenant: YOUR_TENANT_ID body_template: text: "{{ .text }}" agent_id: hermes
Drop in ~/.hermes/config.yaml — restart the gateway
# claude_desktop_config.json · mcp-settings.json · any MCP-compatible client # No install. No Node.js. Just a URL and your credentials. { "mcpServers": { "heurchain": { "url": "https://api.heurchain.com/mcp/sse", "headers": { "X-HeurChain-API-Key": "<your-api-key>", "X-HeurChain-Tenant": "YOUR_TENANT_ID" } } } }
Paste into your client's MCP config and restart. 14 tools registered automatically.
# One-time registration — restart Claude Code after running claude mcp add heurchain --transport sse https://api.heurchain.com/mcp/sse \ --header "X-HeurChain-API-Key: <your-api-key>" \ --header "X-HeurChain-Tenant: YOUR_TENANT_ID" # 14 tools registered automatically — no local binary required: # heurchain_store heurchain_search heurchain_query heurchain_retrieve # heurchain_promote heurchain_manifest heurchain_vault_stats # heurchain_session_start heurchain_session_end heurchain_session_context # heurchain_agent_recall heurchain_cache_set heurchain_cache_get heurchain_cache_delete
No install required. The MCP server runs on HeurChain infrastructure.
# ~/.codex/config.toml — Codex reads TOML, not JSON. # Append this table; do not replace the file if it already has other servers. [mcp_servers.heurchain] url = "https://api.heurchain.com/mcp/sse" [mcp_servers.heurchain.headers] "X-HeurChain-API-Key" = "<your-api-key>" "X-HeurChain-Tenant" = "YOUR_TENANT_ID"
Restart Codex after saving. Verify with codex mcp list.
Don't see your agent? These are examples, not a compatibility list. HeurChain
is a plain REST API plus a standard MCP endpoint, and most capable agents can
read one of the variants above and adapt it to their own harness — paste the
setup prompt and let the agent work out where its config lives. If it can run
curl or speak MCP, it can use HeurChain.
Manage your subscription, view invoices, or update your payment method in the Stripe portal.
Visualize your memory graph as an interactive 3D force-directed layout. Explore relationships between memories, agents, and tags.
Open 3D graph view →