@agney/pi-honcho-memory

extensionmaintained

Honcho persistent memory extension for pi coding agent

by · v0.1.0 · published 4mo ago

$ pi install npm:@agney/pi-honcho-memory
downloads/mo
0
stars
22
last push
2mo ago
open issues
6

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

434 downloads · last 12 weeks (weekly)

README

pi-honcho-memory

Persistent memory extension for pi using Honcho.

NPM Version

Features

  • Automatic memory injection — cached user profile and project summary injected into the system prompt with zero network latency
  • Conversational persistence — user/assistant messages saved to Honcho after each agent response
  • Flexible session strategies — choose repo, git-branch, or directory scoped memory
  • LLM toolshoncho_search, honcho_chat, honcho_remember for active memory operations
  • Commands/honcho-status, /honcho-setup
  • Graceful degradation — pi works normally if Honcho is unavailable

Install

pi install npm:pi-honcho-memory

Or try without installing:

pi -e npm:pi-honcho-memory

Setup

  1. Get an API key from honcho.dev
  2. Run /honcho-setup inside pi to configure interactively

Or set environment variables:

export HONCHO_API_KEY=hch-...

Honcho agent skills

Honcho already ships its own installable agent skills. Install those separately from this pi extension with:

npx skills add plastic-labs/honcho

Docs: https://docs.honcho.dev/v3/documentation/introduction/vibecoding#agent-skills

Configuration

Config is read from (highest priority first):

  1. Environment variables: HONCHO_API_KEY, HONCHO_URL, HONCHO_WORKSPACE_ID, HONCHO_PEER_NAME, HONCHO_AI_PEER, HONCHO_SESSION_STRATEGY, HONCHO_ENABLED, HONCHO_CONTEXT_TOKENS, HONCHO_MAX_MESSAGE_LENGTH, HONCHO_SEARCH_LIMIT, HONCHO_TOOL_PREVIEW_LENGTH
  2. Config file: ~/.honcho/config.json

HONCHO_SESSION_STRATEGY / hosts.pi.sessionStrategy supports:

  • repo — share memory across git worktrees of the same repo
  • git-branch — keep separate memory per branch
  • directory — keep separate memory per working directory

Config file properties (~/.honcho/config.json):

PropEnvironment variableDescriptionDefault
apiKeyHONCHO_API_KEYHoncho API keynone
peerNameHONCHO_PEER_NAMEUser peer name$USER
hosts.pi.workspaceHONCHO_WORKSPACE_IDHoncho workspace IDpi
hosts.pi.aiPeerHONCHO_AI_PEERAI peer namepi
hosts.pi.endpointHONCHO_URLHoncho API base URLdefault Honcho API
hosts.pi.sessionStrategyHONCHO_SESSION_STRATEGYSession scope for memory sharingrepo
hosts.pi.contextTokensHONCHO_CONTEXT_TOKENSToken budget requested from Honcho for injected project memory1200
hosts.pi.maxMessageLengthHONCHO_MAX_MESSAGE_LENGTHMaximum length of a synced user/assistant message before it is skipped8000
hosts.pi.searchLimitHONCHO_SEARCH_LIMITMaximum number of search results returned by honcho_search8
hosts.pi.toolPreviewLengthHONCHO_TOOL_PREVIEW_LENGTHCharacter preview length per search result returned by honcho_search500

All numeric options must be positive integers. Invalid values fall back to defaults.

Tools

ToolDescription
honcho_searchSearch persistent memory for prior conversations and decisions
honcho_chatAsk Honcho to reason over memory for deeper questions
honcho_rememberSave a durable fact, preference, or decision

Commands

CommandDescription
/honcho-statusShow connection status and config
/honcho-setupInteractive configuration wizard

Contributing

See CONTRIBUTING.md.

License

MIT