Skip to content

feat(dify): add Dify integration with Hindsight memory tools#1434

Merged
nicoloboschi merged 4 commits intomainfrom
feat/dify-integration
May 5, 2026
Merged

feat(dify): add Dify integration with Hindsight memory tools#1434
nicoloboschi merged 4 commits intomainfrom
feat/dify-integration

Conversation

@benfrank241
Copy link
Copy Markdown
Contributor

Summary

  • Dify Tool Plugin under hindsight-integrations/dify/ exposing three tools — Retain, Recall, Reflect — that drop into any Dify workflow, chatflow, or agent app alongside other LLM and tool nodes.
  • Provider with API URL + optional API key credentials, validated via Hindsight /health.
  • Standard wiring: 15 pytest unit tests, test-dify-integration CI job, dify added to release-integration.sh, docs page at /sdks/integrations/dify, listing in integrations.json, placeholder icon.

Test plan

  • pytest tests -v — 15/15 pass locally
  • Built .difypkg via build_package.sh and uploaded to self-hosted Dify (docker compose)
  • Configured credentials with API URL http://host.docker.internal:8888, blank key
  • Built workflow: Start → Hindsight Retain → Hindsight Recall → Hindsight Reflect → End against bank dify-test-1
  • Retain wrote: observation "Ben tested the Dify integration." + consolidated world fact with entities Dify + Ben extracted
  • Reflect synthesized: "Ben is notable for having tested the Dify integration on May 4, 2026..."
  • Submit to Dify Marketplace (follow-up after merge)

Distribution

  • GitHub install supported immediately via the path vectorize-io/hindsighthindsight-integrations/dify
  • Local install via the .difypkg archive built by build_package.sh
  • Marketplace submission to follow

🤖 Generated with Claude Code

@benfrank241 benfrank241 marked this pull request as ready for review May 4, 2026 19:11
@nicoloboschi nicoloboschi force-pushed the feat/dify-integration branch from 13c064b to 53148ec Compare May 5, 2026 08:39
benfrank241 and others added 4 commits May 5, 2026 10:40
Adds a Dify Tool Plugin under hindsight-integrations/dify/ exposing three
tools — Retain, Recall, Reflect — that can drop into any Dify workflow,
chatflow, or agent app alongside other LLM and tool nodes.

- Provider with API URL + optional API key credentials, validated via
  Hindsight /health
- 15 unit tests (pytest + pytest-mock)
- test-dify-integration CI job, dify added to release-integration.sh
- Docs page at /sdks/integrations/dify, integrations.json listing,
  placeholder icon
- Live-tested end-to-end against local Hindsight: Retain → fact extraction
  → Recall → Reflect synthesis all pass via Dify workflow

Distributed via GitHub for now; Dify Marketplace submission to follow.
Replaces the placeholder blue-D SVG with the actual Dify icon on the
integrations listing page.
Required by the Dify Marketplace submission checklist.
…cleanup

- Add 14 tests for RetainTool, RecallTool, ReflectTool _invoke() methods
- Add try/except around client calls with user-friendly error messages
- Simplify urljoin to f-string in provider health check
- Remove deprecated Pydantic v1 dict() fallback in _memory_to_dict
- Remove emoji from build_package.sh output
- Add comment explaining reflect's lower default budget
@nicoloboschi nicoloboschi force-pushed the feat/dify-integration branch from 53148ec to b23a528 Compare May 5, 2026 08:41
@nicoloboschi nicoloboschi merged commit bc23750 into main May 5, 2026
59 of 63 checks passed
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.

2 participants