← 返回
沟通协作 Key 中文

Feishu Group Memory

Extract and store structured information from Feishu group messages, then query it and get AI-generated insights. Use when the user wants to: record what's b...
从飞书群消息中提取并存储结构化信息,支持查询及AI智能洞察。适用于:记录群内讨论内容、整理关键信息、获取AI分析建议等场景。
vinzeny
沟通协作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 516
下载
💾 9
安装
1
版本
#latest

概述

Feishu Group Memory

Architecture

Scripts handle data only — no LLM calls inside scripts:

  • onboarding.py — read/write industry knowledge pack config
  • listener.py — fetch raw messages from Feishu; save analyzed records
  • query.py — keyword search over stored records
  • billing.py — SkillPay charge/balance/payment-link

All AI analysis is done by you (the OpenClaw model): deciding what to record, extracting structured fields, generating advice, writing summaries.


Quick Reference

OperationScriptBilled
---------------------------
Check industry configonboarding.py checkFree
Load built-in industry packonboarding.py setup --industryFree
Save custom industry packonboarding.py save --contentFree
Find group by namelistener.py find_chat --nameFree
Fetch raw messageslistener.py fetch_rawFree
Save analyzed recordslistener.py save_recordsFree
Search recordsquery.py searchFree
List records by periodquery.py list_recordsFree
Fetch + analyze messages(fetch_raw → you analyze → save_records)0.005 USDT
Get AI advice(query → you advise)0.003 USDT
Generate summary report(list_records → you summarize)0.005 USDT

First Use: Onboarding

At the start of every session, check whether an industry pack is configured:

python3 {baseDir}/scripts/onboarding.py check --workspace ~/.openclaw/workspace
  • {"configured": true, "context": "..."} → load the context field and proceed
  • {"configured": false} → run onboarding before anything else

Onboarding conversation

Ask the user:

> "Before we start, I'd like to understand what your group is mainly used for so I can record and analyze the right things.

>

> Choose one, or describe it in your own words:

> 1. 📈 Sales tracking (leads, quotes, deals)

> 2. 🎧 Customer support (tickets, issues, complaints)

> 3. ⚖️ Legal matters (contracts, risks, cases)

> 4. 📋 Project management (tasks, milestones, blockers)

> 5. ✍️ Describe my own use case"

Saving the config

Built-in industry (options 1–4):

python3 {baseDir}/scripts/onboarding.py setup \
  --industry sales \
  --workspace ~/.openclaw/workspace

Valid slugs: sales / customer-service / legal / project

Custom description (option 5):

Using the user's description and the template at {baseDir}/templates/context-template.md, generate the knowledge pack yourself, then save it:

python3 {baseDir}/scripts/onboarding.py save \
  --content "YOUR GENERATED CONTENT" \
  --workspace ~/.openclaw/workspace

Confirm with the user: "Got it! I'll use this context going forward. Which group would you like me to start recording?"


Feature: Record Group Messages

Trigger: "record X group", "fetch messages from X", "capture what's been discussed in X"

Step 1 — Find the group

python3 {baseDir}/scripts/listener.py find_chat --name "KEYWORD"

If multiple results, show them and ask the user to pick one.

Step 2 — Fetch raw messages

python3 {baseDir}/scripts/listener.py fetch_raw \
  --chat_id CHAT_ID \
  --limit 100 \
  --workspace ~/.openclaw/workspace

Returns an array of {msg_id, time, sender, text} objects.

Step 3 — You analyze

Using the loaded industry knowledge pack (from onboarding check), go through each message and decide:

  • Is it worth recording?
  • What category does it belong to?
  • Who or what is the key entity (person, company, project)?
  • What structured fields can be extracted?
  • What is the urgency (high / medium / low)?

Step 4 — Save the records

python3 {baseDir}/scripts/listener.py save_records \
  --chat_id CHAT_ID \
  --workspace ~/.openclaw/workspace \
  --records '[{"msg_id":"...","time":"...","sender":"...","raw_text":"...","category":"...","key_entity":"...","summary":"...","fields":{...},"urgency":"high"}]'

Step 5 — Report to user

Summarize what was found, e.g.:

> "Analyzed 100 messages. Saved 12 items:

> - 3 customer intent signals (Li, Wang, Chen)

> - 5 follow-up actions

> - 4 pricing discussions

>

> 2 high-urgency items — want me to walk through them?"

Billing

python3 {baseDir}/scripts/billing.py charge \
  --user_id USER_ID --amount 0.005 --label "message analysis"

If payment_required is returned, show the top-up link and stop.


Feature: Query Records

Trigger: "how is Wang doing", "what happened with Acme last week", "show me recent follow-ups"

python3 {baseDir}/scripts/query.py search \
  --query "KEYWORD" \
  --workspace ~/.openclaw/workspace

Returns matching records as raw JSON. You turn them into a natural-language answer, e.g.:

> "Here's what I have on Wang (Wang Zong):

> - Jan 15: Said he can sign next week (high priority)

> - Jan 12: Asked about discount options, still considering

>

> Last contact was 3 days ago — worth reaching out today."

No charge for queries.


Feature: AI Advice

Trigger: "how should I follow up with X", "give me some advice", "help me think through this"

First, search for relevant records:

python3 {baseDir}/scripts/query.py search \
  --query "KEYWORD" \
  --workspace ~/.openclaw/workspace

Then reload the industry pack if needed:

python3 {baseDir}/scripts/onboarding.py check --workspace ~/.openclaw/workspace

Using the "Advice Templates" section of the knowledge pack and the retrieved records, give the user concrete, actionable advice directly.

python3 {baseDir}/scripts/billing.py charge \
  --user_id USER_ID --amount 0.003 --label "AI advice"

Feature: Summary Report

Trigger: "summarize today", "weekly report", "what happened this week"

python3 {baseDir}/scripts/query.py list_records \
  --period today|week|all \
  --workspace ~/.openclaw/workspace

You write the summary. Example structure:

> Weekly Summary (Jan 13–19)

>

> 28 items recorded across 7 customers.

>

> Action required (3)

> - Li Zong: ready to sign — prepare draft contract

> - Wang Zong: price sticking point — request special approval

>

> By category

> - Customer intent: 12 | Follow-ups: 8 | Pricing: 5 | Other: 3

>

> Suggestion: 2 customers haven't been contacted in 5+ days.

python3 {baseDir}/scripts/billing.py charge \
  --user_id USER_ID --amount 0.005 --label "summary report"

Error Handling

SituationResponse
---------------------
No industry pack configuredRun onboarding first
Group not found"I couldn't find a group called 'X'. Could you give me the full name?"
No records yet"Nothing recorded yet. Want me to fetch messages from that group now?"
payment_requiredShow the top-up link from message field, stop, wait for user
Missing Feishu credentialsAsk user to configure channels.feishu.accounts in openclaw.json

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 05:35 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,433
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,592
communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,734