feat: add optional Honcho memory backend by ajspig · Pull Request #2673 · screenpipe/screenpipe · GitHub
Skip to content

feat: add optional Honcho memory backend#2673

Open
ajspig wants to merge 6 commits intoscreenpipe:mainfrom
plastic-labs:feat/honcho-backend-service
Open

feat: add optional Honcho memory backend#2673
ajspig wants to merge 6 commits intoscreenpipe:mainfrom
plastic-labs:feat/honcho-backend-service

Conversation

@ajspig
Copy link
Copy Markdown

@ajspig ajspig commented Mar 30, 2026

Summary

Adds Honcho as an optional memory backend. A background service polls the local screenpipe DB, synthesizes structured activity observations (apps, windows, URLs, audio excerpts), applies privacy filters, and posts them to Honcho. External agents can then query Honcho for structured user context.

Opt-in: gated behind Cargo feature honcho, disabled by default. No data leaves the machine unless explicitly enabled.

Changes

  • New crate crates/screenpipe-honcho/ -- client, service, synthesizer (4 files, ~725 lines)
  • Feature flag in screenpipe-engine/Cargo.toml
  • CLI flags in screenpipe-engine/src/cli/mod.rs and src/bin/screenpipe-engine.rs

How to test

  1. Get a free API key from app.honcho.dev
  2. Build with the feature:
    cargo build --release --features honcho
    
  3. Run:
    screenpipe record --enable-honcho \
      --honcho-api-url "https://api.honcho.dev" \
      --honcho-api-key "your-key" \
      --honcho-sync-interval-mins 5
    
  4. Use screenpipe normally for a few minutes
  5. Check logs for [honcho] sync confirmations

Without --enable-honcho, nothing changes.

ajspig and others added 6 commits March 30, 2026 14:52
Adds screenpipe-honcho crate that periodically synthesizes screen/audio/input
observations into first-person narratives and pushes them to a Honcho workspace
via REST API. External agents can then query Honcho for rich user understanding.

- New crate: screenpipe-honcho (client, service, session_manager, synthesizer)
- Config: 6 new fields on RecordingSettings (enableHoncho, honchoApiUrl, etc.)
- CLI: --enable-honcho, --honcho-api-url, --honcho-api-key, etc.
- Engine: feature-gated startup (#[cfg(feature = "honcho")])
- Frontend: Settings UI section with toggle, connection status, config inputs
- Default: OFF, must be explicitly enabled
- Privacy: strips credentials, financial, medical, incognito content

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The original implementation had incorrect request/response shapes that
didn't match the Honcho v3 REST API (field naming, body structure),
an invalid default peer name, a bogus health check endpoint, and an
unnecessary observer peer.

- Use `id` instead of `name` in create requests, `configuration` instead of `config`
- Fix add-peers-to-session to send bare dict body per API spec
- Change default peer name from `user:default` to `user-default` (colon invalid)
- Remove health check (no /health endpoint; init() validates connectivity)
- Simplify to single peer (observer peer was unused)
- Attach peers inline at session creation time
- Use `{:#}` for full error chain in logs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove settings UI and config persistence to keep the first PR
focused on the core crate + CLI flags. The UI can be added in a
follow-up once the backend is validated.

Removed:
- honcho-section.tsx (new file, deleted)
- connections-section.tsx (reverted to upstream)
- use-settings.tsx (reverted to upstream)
- recording.rs (reverted to upstream)

This eliminates conflicts with open PRs screenpipe#2605 and screenpipe#2574 which
also modify recording.rs.
- Prevent zero-interval DoS when sync_interval_mins=0 (clamp to 1)
- Pass browser_url and focused fields through to synthesizer
- Rewrite synthesizer with improved formatting and privacy filtering
- Drop tests from client.rs and synthesizer.rs (follow-up)
- Inline session_manager.rs into service.rs (one fewer file)
- Simplify synthesizer to single flat format: timestamped lines
  showing app | window | url, instead of adaptive micro/summary modes
- Remove unused peer_chat and add_peers_to_session from client
- Remove focused field from RawEvent (unused)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant