feat(memory): add Lark/Feishu auto-fetch source for Memory Tree
Problem
OpenHuman already has Lark / Feishu support at the channel layer:
src/openhuman/channels/providers/lark.rs- Lark / Feishu can receive and send messages through WebSocket or webhook modes
- #2048 / #2083 are exposing that channel runtime in Settings UI
However, Lark / Feishu is not currently available as an auto-fetch Memory Tree source. For users whose work context primarily lives in Feishu, the current integration only captures conversations that the bot directly participates in. It does not periodically ingest the broader workspace context that OpenHuman's Memory Tree is designed for.
This leaves a gap for China / APAC enterprise users whose daily context is in:
- Feishu IM group chats and DMs
- Feishu Docs / Wiki
- Feishu Base / Sheets
- Feishu Calendar
- Feishu Minutes / meeting notes
- Feishu Tasks / approvals / other workspace objects
Suggested solution
Add a native lark / feishu Memory Tree source provider that participates in the existing auto-fetch scheduler:
OpenHuman periodic sync
-> LarkProvider.sync()
-> fetch selected Feishu sources
-> canonicalize into Markdown chunks
-> ingest into Memory Tree + Obsidian vault
A practical implementation path would be to shell out to, or wrap, an existing lark-cli installation instead of reimplementing the Feishu OpenAPI surface from scratch. The Lark / Feishu CLI ecosystem already supports reading chats, documents, calendars, and meeting artifacts, so OpenHuman can focus on scheduling, cursors, canonicalization, dedupe, and ingestion.
MVP scope
To keep the first version narrow and safe:
- Add a
LarkProviderunder the Composio/native provider pattern. - Support explicit allowlists only:
- selected chat IDs
- selected doc/wiki tokens or folders
- user's own calendar window
- recent meeting minutes
- Store per-source sync state:
- chat last message timestamp
- document last modified timestamp
- calendar / meeting time window cursor
- Canonicalize into stable Markdown chunks with source IDs such as:
lark:im:<chat_id>:<message_id>lark:doc:<doc_token>:<block_id>lark:calendar:<event_id>lark:minutes:<minute_token>
- Ingest through the same Memory Tree path used by Gmail / Slack / Notion native providers.
Safety and privacy requirements
This source should be opt-in and allowlist-first. Feishu workspaces often contain sensitive enterprise data, so the provider should avoid any broad "sync everything" default.
Recommended guardrails:
- no default chat/doc sync until the user selects sources
- source-level exclude rules
- optional max lookback window for initial backfill
- dedupe by stable Feishu IDs
- clear provenance metadata in every chunk
- logs that show counts and source names without dumping content
Why this matters
OpenHuman's current auto-fetch story works best for Gmail / Slack / Notion-style workflows. For many China-based or APAC enterprise users, Feishu is the equivalent center of gravity. Without Feishu as a Memory Tree source, OpenHuman can be configured as a Feishu bot, but it still cannot build the user's work context automatically.
Adding a Lark / Feishu source would make the Memory Tree promise work for a large class of enterprise users whose inbox, docs, meetings, and team conversations are not in Slack or Google Workspace.
Related
- Existing Lark / Feishu channel runtime:
src/openhuman/channels/providers/lark.rs - Lark / DingTalk Settings UI request: #2048
- Lark / DingTalk Settings UI PR: #2083
- Existing native memory providers to model after:
- Gmail
- Slack
- Notion
Hey @kyalpha313, great request! 🤙
Lark/Feishu integration is already being tracked as part of #2148 which covers the same ground (and a bit more). Closing this one to keep the discussion in one place — hop over to #2148 to follow along and add your thoughts there!