Cyber Monday: 2XCYBER doubles your top-up, up to $2,000.Double my top-up

nc://honcho

v0.1.0Pinned
Backnodecode-ai
ThomSharkhoncho: skip capture of a turn a cron or a goal admitted, so its text is never a person's words (#172)63b64e5· 30 Nov3 commits
test1 filecell.lisp56.6 KBclient.lisp17.6 KBconfig.lisp32.7 KBredact.lisp15.7 KB

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. Set HONCHO_API_KEY (or configure api_key / api_key_env in /settings) and enable the honcho section. Note that Cloud sends captured turns to Plastic Labs' hosted service.
  • Self-hosted (http://localhost:8000 or your own EU server): Honcho is open source (AGPL-3.0, FastAPI + PostgreSQL with pgvector). Spin up a personal stack with uv tool install honcho-cli && honcho start --setup or Docker Compose. When the server runs with USE_AUTH=False, no API key is required and Authorization is 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/v1 with nodecode-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 in config.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 sessions overrides in ~/.honcho/config.json are 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 optional peer, as seen by the observer honcho_remember writes 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

  • /honcho or /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 (:round hook): Memory is injected via nlk:record-turn-context-prompt at the turn tail (the same seam board uses) 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 under context_tokens, and stored <honcho-memory> tags are escaped so remembered text cannot break out of framing.
  • Background capture and secret redaction (:frame hook): 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, Authorization and Cookie headers, 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/status
  • POST /v3/workspaces
  • POST /v3/workspaces/{ws}/peers
  • POST /v3/workspaces/{ws}/sessions
  • POST /v3/workspaces/{ws}/sessions/{sid}/peers
  • POST /v3/workspaces/{ws}/sessions/{sid}/messages
  • GET /v3/workspaces/{ws}/sessions/{sid}/context?summary=true&...
  • GET /v3/workspaces/{ws}/peers/{peer}/card
  • POST /v3/workspaces/{ws}/peers/{peer}/representation
  • POST /v3/workspaces/{ws}/search
  • POST /v3/workspaces/{ws}/conclusions/query
  • POST /v3/workspaces/{ws}/conclusions
  • POST /v3/workspaces/{ws}/peers/{peer}/chat

MIT License. See LICENSE and NOTICE.

Add nc://honcho

  1. 1

    Install Nodecode

    Once per machine.

    $ curl -fsSL https://nodecode.ai/install.sh | sh
  2. 2

    Add the cell

    Pinned at 63b64e5.

    $ nodecode add nc://honcho

    Or tell the agent add the honcho cell.