memorix icon indicating copy to clipboard operation
memorix copied to clipboard

Feature Request: Add support for Qwen (通义千问) auto-hooks

Open Marx2014 opened this issue 9 months ago • 2 comments

Problem

Currently, Memorix auto-hooks does not support Qwen (通义千问) and iFlow AI assistants. Users of these agents can only use the MCP server for manual memory operations, but cannot benefit from automatic memory capture.

Current Supported Agents

From src/hooks/installers/index.ts:

  • Claude Code
  • Cursor
  • Windsurf
  • VS Code Copilot
  • Kiro (Amazon)
  • Codex (OpenAI)
  • Antigravity (Google Gemini CLI)

Requested Agents

1. Qwen (通义千问)

  • Developer: Alibaba
  • Config location: Likely ~/.qwen/ or similar
  • Use case: Popular Chinese AI assistant for coding

2. iFlow

  • Developer: ?
  • Config location: Unknown (needs investigation)
  • Use case: ?

Proposed Solution

  1. Add agent detection in detectInstalledAgents():

    • Check for ~/.qwen directory
    • Check for ~/.iflow directory
  2. Add hook config generators similar to existing agents

  3. Add to AgentName type in src/hooks/types.ts:

    • qwen (NEW)
    • iflow (NEW)

Additional Context

  • MCP Server functionality already works with any agent that supports MCP
  • Auto-hooks require agent-specific hook configuration formats
  • Willing to help test if Qwen/iFlow config formats can be provided

Workaround (Current)

Until native support is added, users can:

  1. Use MCP Server only (manual memory via memorix_store/memorix_search)
  2. Manually configure hooks if Qwen/iFlow support a compatible format

Marx2014 avatar Feb 25 '26 02:02 Marx2014

感谢功能请求!

关于 Qwen(通义千问)支持

Memorix 的 MCP Server 已经可以与任何支持 MCP 协议的 Agent 配合使用,包括通义千问。只需在 Qwen 的 MCP 配置中添加:

json { mcpServers: { memorix: { command: memorix, args: [serve] } } }

关于 auto-hooks(自动记忆触发),这需要了解 Qwen 和 iFlow 的 hooks 配置格式和文件路径。如果您能提供以下信息,我们可以添加原生支持:

  1. Qwen 的配置目录路径(类似 ~/.qwen/ ?)
  2. Qwen 是否支持 lifecycle hooks(如 SessionStart、PostToolUse 等)?
  3. hooks 的配置文件格式(JSON / YAML / Markdown?)

同样的信息也适用于 iFlow。

目前的 workaround:在项目根目录创建一个规则文件(如 QWEN.md 或类似的),包含指令让 Qwen 主动调用 memorix_search 和 memorix_store,类似 Codex 的 AGENTS.md 方式。

欢迎提供更多 Agent 配置细节,我们会尽快添加支持!

AVIDS2 avatar Feb 25 '26 04:02 AVIDS2

Qwen Code hook support is implemented in PR #331.

The branch adds the Qwen installer/merge and uninstall paths, native event normalization, setup/integrate parity, generated guidance, and regression coverage. It uses the existing memorix hook --agent qwen entrypoint and preserves existing Qwen settings and hooks. The PR will close this issue after merge; it remains open until then.

AVIDS2 avatar Oct 12 '26 15:10 AVIDS2