Chat memory

From chefroger/smart-trade-ai · View interactive version

Chat memory is an AI agent skill from the GitHub repository chefroger/smart-trade-ai. 对话历史长期记忆查询 — 按时间段调取以往谈过的内容与结论

How to use this skill

Skill file

Chat Memory — 对话长期记忆

功能定位

查询本公司(company_id)下的历史对话记录。

工具

chat_memory_list

描述:查询历史对话记录。当用户提到"之前""上次""以前"等时间相关词汇,

或询问过去讨论过的内容时使用此工具。

参数:

返回值:

{
  "company_id": 1,
  "time_range": "last_week",
  "recent_days": null,
  "recent_months": null,
  "count": 5,
  "rows": [
    {"id": 123, "query": "...", "response": "...", "created_at": "2026-05-10T14:32:00"}
  ]
}

使用示例

用户:"你上次推荐的那个供应商叫什么名字?"

→ 调用 chat_memory_list(company_id=1, time_range="all", limit=20)

→ 从结果中找到与供应商相关的对话

→ 回答用户问题

用户:"我们这周谈过哪些客户?"

→ 调用 chat_memory_list(company_id=1, time_range="this_week", limit=20)

→ 汇总结果中涉及客户的对话

→ 回答用户问题

用户:"上礼拜三跟你说过那个德国客户叫什么来着?"

→ 枚举表达不了,用 recent_days=14(覆盖"上上周三"到今天):

→ chat_memory_list(company_id=1, recent_days=14, limit=20)

用户:"前几个月有没有谈到 XXX?"

→ 模糊时间词,用 recent_months=3:

→ chat_memory_list(company_id=1, recent_months=3, limit=20)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.