Integrate datalib as the default personal-data store for agents#246
Draft
qi-imbue wants to merge 4 commits into
Draft
Integrate datalib as the default personal-data store for agents#246qi-imbue wants to merge 4 commits into
qi-imbue wants to merge 4 commits into
Conversation
Add a `datalib` skill plus provisioning so Minds agents mirror and search the user's own data (Slack, email, GitHub, Notion, chat history) via the frankweiler tools, authenticating through the existing latchkey gateway. - .agents/skills/datalib/SKILL.md: search the local mirror over its HTTP API / qmd index; import & refresh sources with frankweiler-sync. - scripts/setup_system.sh: install frankweiler-sync / frankweiler-http (pinned via FRANKWEILER_VERSION). - .mngr/settings.toml: FRANKWEILER_ROOT=/mngr/datalib (persistent, non-git-backed data root). - CLAUDE.md: steer agents to the skill for questions about their history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The previous one-liner backgrounded the whole health-check-or-start list, so a query could race the server coming up. Start in the background only on a failed health check, then poll until it accepts connections. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
v0.16.0 publishes fully-static *-unknown-linux-musl tarballs; select them via FRANKWEILER_LIBC=musl so the frankweiler binaries run as-is regardless of the base image's libc. Pin the version (and fetch install.sh at that tag) for a reproducible image build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verified against the real v0.16.0 musl binaries in the FCT base image: frankweiler-sync reads $FRANKWEILER_CONFIG (or --config), not the old FRANKWEILER_ROOT env from the v0.9-era Docker image. The data root is that file's parent dir. Point settings.toml at /mngr/datalib/config.yaml and have the skill derive DATA_ROOT via `dirname "$FRANKWEILER_CONFIG"`. Config schema, the system/qmd/index.sqlite path, <name>/rendered_md/ tree, and the /api/health + /api/search HTTP surface all confirmed unchanged on v0.16.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes datalib (the
frankweilertools) the default way Minds agents retrieve, search, and import the user's own personal data -- past chat conversations, Slack, email, GitHub, Notion, contacts -- into a local searchable mirror. Mirrors the mechanism that makes latchkey the default for outbound authenticated requests: a Claude Code skill + environment wiring + a binary installed into the image.Changes
.agents/skills/datalib/SKILL.md(new) -- the core deliverable. Itsdescriptionmakes the agent reach for it whenever the user asks about their own history. Teaches the agent to search the local store over its HTTP API (127.0.0.1:8731/api/search) or the qmd index, and to import/refresh sources withfrankweiler-sync. Credentials flow through the existinglatchkeygateway; the skill defers to thelatchkeyskill for the permission handshake.scripts/setup_system.sh-- installs the fully-static muslfrankweiler-sync/frankweiler-httpbinaries (v0.16.0) via datalib'sinstall.shwithFRANKWEILER_LIBC=musl, so they run as-is regardless of the base image's libc. Version pinned;install.shfetched at the pinned tag for a reproducible build..mngr/settings.toml-- setsFRANKWEILER_ROOT=/mngr/datalib: on the persistent/mngrvolume so it survives restarts, but deliberately outside/mngr/code(git workspace) andruntime/so the large doltlite + qmd store does not ride the runtime-backup git branch.CLAUDE.md-- steers agents to the skill for questions about the user's history.Auth: no new plumbing
frankweiler-syncshells out to its ownlatchkey, which reads theLATCHKEY_GATEWAY*env vars Minds already injects -- so web-API syncs route through the same gateway and permission dialog the user already approves for Slack/GitHub/etc. NoLATCHKEY_CURLwiring needed (the binary auto-locates its shim as a sibling).MVP scope / known limitation
Reliable through the Minds gateway: Slack, GitHub, Notion, email (Google Takeout
.mbox). Not reliable: Cloudflare-walled sources (claude_api,chatgpt_api) -- inside Minds, latchkey routes through its gateway and bypasses datalib's Chrome-impersonating curl shim, so Cloudflare challenges them. The skill tells the agent this and to prefer an on-disk export for that data.Open questions for review
/mngr/datalibpersists per-workspace and is not part of the runtime git backup (too large). A future iteration could add targeted backup of just the preciousraw/stores, or move to the "local datalib over a gateway" model.frankweiler-httpon demand. Aservices.toml-supervised background service would be cleaner but needs to tolerate an empty data root -- deferred.Testing
Not yet exercised end-to-end. Plan:
just minds-start-> create a Docker agent (rebuilds the image, exercising the musl binary install) -> ask it to mirror + search a Slack channel and confirm the skill auto-invokes, the sync runs through the latchkey permission dialog, and a query returns.🤖 Generated with Claude Code