Skip to content

[codex] add Dify memory adapter#1

Closed
bugkeep wants to merge 3 commits into
mainfrom
codex/dify-platform-adapter
Closed

[codex] add Dify memory adapter#1
bugkeep wants to merge 3 commits into
mainfrom
codex/dify-platform-adapter

Conversation

@bugkeep

@bugkeep bugkeep commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Description | 描述

Add a Dify platform adapter for TencentDB Agent Memory. The adapter provides basic memory write/read through tdai_capture and tdai_recall, plus health, memory search, conversation search, and session flush tools backed by the Gateway API.

This also adds a mock Dify quickstart e2e harness for Gateway -> mock Dify plugin server -> capture -> recall, an adapter architecture note, a Mermaid workflow diagram, and a cross-platform comparison for OpenClaw / Hermes / Dify.

Related Issue | 关联 Issue

Related to TencentCloud#235

Change Type | 修改类型

  • Bug fix | Bug 修复
  • New feature | 新功能
  • Documentation update | 文档更新
  • Code optimization | 代码优化

Self-test Checklist | 自测清单

  • Verified locally | 本地验证通过
  • No existing features affected | 无影响现有功能

Validation performed:

  • git pull --ff-only origin main
  • inspected local Dify plugin-tool layer under E:\dify-main
  • python -m unittest discover -s dify-plugin-tdai-memory\tests -> 51 tests OK
  • git diff --check -- dify-plugin-tdai-memory docs
  • bash -n dify-plugin-tdai-memory/scripts/quickstart-gateway-mock-e2e.sh
  • bash dify-plugin-tdai-memory/scripts/quickstart-gateway-mock-e2e.sh currently stops with the expected prerequisite message because this checkout has no node_modules; the script tells users to run npm install or reuse a running Gateway via TDAI_DIFY_GATEWAY_URL.
  • ocr review --audience agent --commit HEAD was run during development; high-confidence code style/security findings were fixed.

Additional Notes | 其他说明

The adapter keeps max_chars=0 as an explicit "unlimited" setting because the tool YAML and tests document that behavior. It does not block private/internal Gateway URLs because local/private Gateway deployments are an expected TencentDB Agent Memory use case; Bearer tokens over non-local plain HTTP are still rejected.

Add a Dify plugin adapter that connects Dify workflows to the TencentDB Agent Memory Gateway for recall, capture, health, search, and session flush operations.

Include a mock Dify quickstart e2e script, adapter architecture notes, Mermaid workflow diagram, and cross-platform comparison documentation.

Closes TencentCloud#235

Signed-off-by: bugkeep <1921817430@qq.com>
@bugkeep

bugkeep commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Runtime validation update:

  • Started local Dify from E:\dify-main\docker with Docker Compose.
  • Docker images pulled successfully after retrying Docker Hub EOFs.
  • Containers are running; api, db_postgres, redis, and sandbox are healthy, and nginx exposes http://localhost.
  • Verified http://localhost/install returns HTTP 200 and renders the Dify setup page.
  • Verified backend APIs: /console/api/setup returns {"step":"not_started","setup_at":null}; /console/api/system-features returns HTTP 200.
  • Verified with Playwright MCP: page title is Dify and the install page shows the admin account setup form in Chinese.
  • plugin_daemon initialized and listens on tcp://0.0.0.0:5003 per container logs; port 5003 is a plugin/debug protocol port, not normal HTTP.

bugkeep added 2 commits July 5, 2026 00:37
Use the Dify CLI icon reference convention so the Dify plugin package passes asset validation, and add manifest coverage for provider icon references.\n\nCloses TencentCloud#235

Signed-off-by: bugkeep <1921817430@qq.com>
Document Dify package/install, provider configuration, workflow wiring, and local validation evidence for the TencentDB Agent Memory Dify adapter.\n\nCloses TencentCloud#235

Signed-off-by: bugkeep <1921817430@qq.com>
@bugkeep

bugkeep commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #2 using the requested branch name eat/dify-memory-adapter.

@bugkeep bugkeep closed this Jul 4, 2026
@bugkeep bugkeep deleted the codex/dify-platform-adapter branch July 4, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant