Skip to main content

memory_honcho

memory_honcho adds Honcho-backed persistent memory to an Agent Core. It injects relevant memory context before model calls, mirrors completed turns to Honcho after the assistant responds, and optionally exposes model-callable honcho_* tools.

Use it when you want cross-session user or project recall backed by Honcho instead of only the file-backed memory_basic package.

What It Installs

The package installs package-owned authored components into the selected runtime core:

agent/lib/memory_honcho/
agent/bootstrap/memory_honcho/
agent/input/memory_honcho_recall/
agent/output/memory_honcho_sync/
agent/skills/memory_honcho/

When enable_tools=true, which is the default, it also installs:

agent/tools/honcho_profile/
agent/tools/honcho_search/
agent/tools/honcho_context/
agent/tools/honcho_reasoning/
agent/tools/honcho_conclude/

It also updates agent/pipelines.yaml:

bootstrap:
serial:
- session_context
- memory_honcho
input:
serial:
- base_input
- memory_honcho_recall
parallel: []
output:
serial:
- base_output
parallel:
- memory_honcho_sync

Runtime memory data is not package-owned. It is stored under:

memory/honcho/
cache.json
outbox.jsonl
synced_turns.json

Uninstall removes the installed slots, tools, skill, and lib files, but leaves memory/honcho/ in place.

Requirements

memory_honcho declares a manual dependency:

honcho-ai

Demiurge packages do not install Python dependencies and do not modify uv.lock. Install honcho-ai according to the host environment policy before using the package.

The package can connect to Honcho Cloud or to a self-hosted Honcho endpoint:

SetupRequired configuration
Honcho CloudHONCHO_API_KEY or api_key package option
Self-hosted or local HonchoHONCHO_BASE_URL or base_url package option
Self-hosted with authbase_url plus api_key

When base_url is set without api_key, the package passes api_key="local" to the Honcho SDK.

Install

Preview first:

uv run demiurge package install memory_honcho --core assistant --preview

Install with environment variables:

export HONCHO_API_KEY=...
uv run demiurge package install memory_honcho --core assistant

For a local or self-hosted Honcho service:

export HONCHO_BASE_URL=http://localhost:8000
uv run demiurge package install memory_honcho --core assistant

You can also pass options at install time:

uv run demiurge package install memory_honcho \
--core assistant \
--option api_key=... \
--option workspace=demiurge \
--option peer_name=allen \
--option session_strategy=per-directory

Secret options are redacted in packages.yaml.

Recall Modes

recall_mode controls whether memory is injected automatically, exposed through tools, or both.

ModeBehavior
hybridDefault. Injects Honcho context automatically and installs honcho_* tools when enable_tools=true.
contextInjects Honcho context automatically. Tools are still installed unless enable_tools=false; use that option if you want context-only behavior.
toolsDoes not auto-inject Honcho context. Installs tools when enable_tools=true.

To install tools-only mode:

uv run demiurge package install memory_honcho \
--core assistant \
--option recall_mode=tools

To disable tool installation:

uv run demiurge package install memory_honcho \
--core assistant \
--option enable_tools=false

Options

OptionDefaultDescription
recall_modehybridhybrid, context, or tools.
enable_toolstrueInstalls honcho_* authored tools when true.
api_keyunsetDirect Honcho API key. Falls back to HONCHO_API_KEY.
base_urlunsetHoncho API base URL. Falls back to HONCHO_BASE_URL. Use this for self-hosted or local Honcho.
workspacedemiurgeHoncho workspace id.
peer_nameunsetStable user peer id. If unset, Demiurge derives one from turn metadata or session id.
ai_peerdemiurge-assistantHoncho peer id for the assistant.
session_strategyper-directoryMaps Demiurge turns to Honcho sessions. Choices: per-directory, per-repo, per-session, global.
context_tokens1200Parsed as the intended context budget. Current formatting is section-based and does not yet enforce a hard token truncation.
timeout_seconds3Passed to the Honcho SDK when supported.
context_cadence1Accepted for package configuration. The current implementation does not yet enforce a turn-gap throttle.

Session Mapping

The package maps each turn to a Honcho session with session_strategy:

StrategyHoncho session id
per-directoryCurrent workspace directory basename.
per-repoCurrent workspace directory basename. This currently behaves like per-directory.
per-sessionDemiurge session id.
globalThe configured workspace value.

Use peer_name when one human should keep the same Honcho peer across sessions and workspaces. Use ai_peer when multiple Agent Cores should have distinct assistant identities in the same Honcho workspace.

Runtime Behavior

memory_honcho uses three slots around the model call:

SlotTimingBehavior
bootstrap/memory_honchoSession bootstrapAdds static # Honcho Memory guidance and any non-stale cached Honcho context. It does not fetch remote context.
input/memory_honcho_recallBefore base_inputIn hybrid and context modes, fetches current Honcho context and injects it as transient system input.
output/memory_honcho_syncParallel outputAppends the completed turn to outbox.jsonl, drains pending outbox records to Honcho, and refreshes cache.json for the next turn.

Injected memory is wrapped in <memory-context> and marked as background data, not new user input. Completed turns are sanitized before syncing so leaked <memory-context> blocks are not written back to Honcho.

All slots use failure_policy: soft. If Honcho is missing, misconfigured, slow, or unavailable, Demiurge continues the main turn. The output slot keeps pending records in outbox.jsonl so later successful runs can drain them.

Tools

When enable_tools=true, the package installs five authored tools:

ToolApprovalUse
honcho_profileautoRead or replace a peer card. Omit card to read; pass card as a list of strings to replace it.
honcho_searchautoSearch Honcho memory for raw context about a peer. Requires query.
honcho_contextautoFetch the current session summary, representation, and peer card.
honcho_reasoningautoAsk Honcho for a synthesized answer. Requires query; accepts optional reasoning_level.
honcho_concludepromptWrite or delete a persistent conclusion. Pass exactly one of conclusion or delete_id.

All tools require network.fetch, have risk: medium, and return model-visible JSON content. Each tool accepts optional peer, where user maps to the user peer and ai or assistant maps to the assistant peer.

Verify

List installed packages:

uv run demiurge package list --core assistant

Run a fake-provider turn to verify the core still loads:

uv run demiurge --provider fake

Inside the TUI, inspect tools with:

/tools

After a real turn with Honcho configured, inspect:

~/.demiurge/agents/assistant/memory/honcho/cache.json
~/.demiurge/agents/assistant/memory/honcho/synced_turns.json

If Honcho is unavailable, outbox.jsonl may exist until a later run drains it.

Uninstall

Preview removal:

uv run demiurge package uninstall memory_honcho --core assistant --preview

Uninstall:

uv run demiurge package uninstall memory_honcho --core assistant

Uninstall restores the bootstrap, input, and output pipelines and removes the package-owned component directories. It does not remove memory/honcho/.

Difference From Hermes Honcho

This package follows the same broad shape as Hermes Honcho memory: static memory guidance, automatic recall, completed-turn sync, and explicit Honcho tools.

The implementation boundary is different:

  • Demiurge uses package-owned slots and lib code. It does not add host harness lifecycle extension points.
  • There is no hermes memory setup equivalent. Configure the package through package options, environment variables, and the installed config.yaml.
  • The package does not install honcho-ai.
  • Bootstrap uses cached context only. Remote recall happens in the input slot.
  • Turn sync uses a local durable outbox because package slots do not own a long-lived provider thread.