nodecode-honcho
Native Common Lisp Honcho v3 memory
cell for Nodecode. Speaks Honcho's REST API directly over nlk:http with zero
Python or Node runtime bridge and zero extra Quicklisp dependencies.
Honcho models people, agents, and projects over time as Peers inside
Sessions, deriving Peer Cards, Conclusions, associative
Representations, and natural-language Dialectic insights in the
background. Paired with Nodecode's operational layer and experience cell,
nodecode-honcho adds persistent theory-of-mind memory and cross-harness
continuity across sessions and rooms.
Get it
Tell the agent "add the honcho cell", or run nodecode add nc://honcho.
Hosting: Honcho Cloud vs Self-Hosted (Local / EU)
You can point the cell at either managed Honcho Cloud or your own instance:
- Honcho Cloud (
https://api.honcho.dev): Fastest setup. SetHONCHO_API_KEY(or configureapi_key/api_key_envin/settings) and enable thehonchosection. Note that Cloud sends captured turns to Plastic Labs' hosted service. - Self-hosted (
http://localhost:8000or your own EU server): Honcho is open source (AGPL-3.0, FastAPI + PostgreSQL withpgvector). Spin up a personal stack withuv tool install honcho-cli && honcho start --setupor Docker Compose. When the server runs withUSE_AUTH=False, no API key is required andAuthorizationis omitted automatically. - Private EU reasoning with Nodecode Cyber v1: Self-hosted Honcho accepts
any OpenAI-compatible LLM endpoint for its background Deriver and Dialectic
workers. Pointing self-hosted Honcho at
https://api.nodecode.ai/v1withnodecode-cyber-v1(or a local model) keeps both storage and background memory synthesis inside your EU or local privacy boundary.
See config.example.jsonc for both Cloud and self-hosted configurations.
Configuration (honcho section / /settings)
| Setting | Default | What it does |
|---|---|---|
enabled |
true |
Turn the cell on or off without removing its config |
base_url |
https://api.honcho.dev |
Honcho server URL (trailing / and /v3 are normalized automatically) |
api_key |
unset | Inline Honcho API key (optional for unauthenticated self-hosted servers) |
api_key_env |
unset | Environment variable holding the API key (HONCHO_API_KEY is checked automatically) |
workspace |
nodecode |
Workspace ID shared across sessions |
peer_name |
$USER / user |
Default human peer ID for 1:1 sessions |
ai_peer |
nodecode |
Assistant peer ID |
observation_mode |
unified |
unified (1:1 self-observation) or directional (AI peer observes each human peer) |
session_strategy |
per-directory |
per-directory, per-repo, git-remote, git-branch, per-session, or global |
session_prefix |
"" |
Optional prefix prepended to derived session names |
session_peer_prefix |
true |
Prefix derived session names with <peer>- |
injection_mode |
session-start |
tools-only, session-start, or per-turn |
context_tokens |
1500 |
Token budget for recalled <honcho-memory> context |
search_top_k |
10 |
Maximum semantic matches requested per recall |
search_max_distance |
"0.6" |
Cosine distance cutoff (0.0 to 1.0) for associative recall |
max_conclusions |
15 |
Maximum derived conclusions fetched from Honcho |
max_rendered_conclusions |
4 |
Maximum conclusion blocks rendered into the injected reminder |
dialectic_cadence |
5 |
Trigger a non-blocking background dialectic refresh every N turns (0 disables) |
dialectic_reasoning |
low |
Reasoning depth for dialectic chat: minimal, low, medium, high, or max |
dialectic_max_chars |
600 |
Character cap for injected background dialectic summary |
capture_enabled |
true |
Capture finished turns asynchronously to Honcho |
use_shared_config |
true |
Read ~/.honcho/config.json (respects HONCHO_CONFIG_DIR) |
read_timeout |
5 |
Timeout in seconds for recall and read calls |
write_timeout |
15 |
Timeout in seconds for capture, setup, and dialectic calls |
Shared ~/.honcho/config.json (Cross-Harness Memory)
With use_shared_config enabled, nodecode-honcho reads
${HONCHO_CONFIG_DIR:-~/.honcho}/config.json using the same layout as
honcho-cli and dsh-honcho (Claude Code, Cursor, Hermes, OpenCode):
- Resolution order:
HONCHO_*environment variables (HONCHO_API_KEY,HONCHO_BASE_URL/HONCHO_URL,HONCHO_WORKSPACE_ID,HONCHO_PEER_NAME) take precedence over the cell section inconfig.jsonc, which takes precedence over~/.honcho/config.json(hosts.<host>then root keys). ${ENV_VAR}references inside shared config values are expanded safely.- Explicit per-directory
sessionsoverrides in~/.honcho/config.jsonare honored so Nodecode joins the exact same Honcho session as your other coding agents working in that repo.
Multi-Peer Discord and Channel Rooms
In 1:1 CLI or Desktop sessions, observation_mode: "unified" lets the human
peer observe themselves directly. In multi-speaker rooms (Discord, Telegram, or
shared boards), observation_mode: "directional" maps each real speaker to
their own Honcho peer observed by ai_peer (peer_target = <speaker>,
peer_perspective = <ai_peer>). Preferences, decisions, and style stay
attributed to each person instead of collapsing into one generic user.
Model Tools
The cell registers four tools for the model:
honcho_search- Semantic search across workspace messages and derived conclusions (runs both endpoints and degrades gracefully if one fails). Conclusions are those about the active speaker, or the optionalpeer, as seen by the observerhoncho_rememberwrites for: the speaker itself in unified mode, the AI peer in directional mode.honcho_chat- Natural-language dialectic question answered by Honcho from accumulated peer and session history.honcho_remember- Store an explicit durable preference, fact, or decision directly as a peer conclusion.honcho_context- Fetch the current Peer Card, filtered Representation, and Session Summary on demand.
/honcho Command
/honchoor/honcho status- Show server health, base URL, workspace, peers, active session, observation/injection mode, capture state, and Honcho deriver queue status./honcho search <query>- Search workspace messages and conclusions from the shell./honcho ask <query>- Run a dialectic query against Honcho./honcho card- Display the active peer's current Peer Card and summary./honcho pause//honcho resume- Pause or resume background turn capture at runtime.
Cache-Safe Recall and Secret Redaction
- Prompt-cache friendly recall (
:roundhook): Memory is injected vianlk:record-turn-context-promptat the turn tail (the same seamboarduses) rather than rewriting the top<harness>system prefix, so KV prompt cache hits stay intact across rounds. Reads use short timeouts and strictly fail open if Honcho is unreachable. Background dialectic calls run off the hot path and land on the next turn. - Noise filtering and fence safety: Low- and medium-confidence pattern
blocks and provenance bullets (
Type:,Sources:,Premises:) are stripped before injection, sections are packed undercontext_tokens, and stored<honcho-memory>tags are escaped so remembered text cannot break out of framing. - Background capture and secret redaction (
:framehook): Completed turns are queued in memory on the publishing thread with zero I/O and uploaded by a background worker in batches of up to 50 messages, truncated under Honcho's 25,000-character message limit. Internal cron, wake, and reflection sessions plus injected harness reminders are skipped to prevent feedback loops, and so is any turn one of those sources starts in another session (a cron's answer delivered to the lane that scheduled it, a goal's next try), so the agent's own text is never filed as a person's words. Every captured message is scrubbed for secrets before upload: environment variable assignments, CLI auth flags,AuthorizationandCookieheaders, URL credentials, known API token prefixes (hch_,sk-,ghp_,AKIA, Slack, Stripe, GitLab, npm, Google, Telegram), PEM private key blocks, JWTs, JSON/YAML secret fields, and optional custom noise regexes.
Honcho v3 Wire Endpoints
GET /health(unauthenticated health probe)GET /v3/workspaces/{ws}/queue/statusPOST /v3/workspacesPOST /v3/workspaces/{ws}/peersPOST /v3/workspaces/{ws}/sessionsPOST /v3/workspaces/{ws}/sessions/{sid}/peersPOST /v3/workspaces/{ws}/sessions/{sid}/messagesGET /v3/workspaces/{ws}/sessions/{sid}/context?summary=true&...GET /v3/workspaces/{ws}/peers/{peer}/cardPOST /v3/workspaces/{ws}/peers/{peer}/representationPOST /v3/workspaces/{ws}/searchPOST /v3/workspaces/{ws}/conclusions/queryPOST /v3/workspaces/{ws}/conclusionsPOST /v3/workspaces/{ws}/peers/{peer}/chat