Skip to content

Add RAGFlow knowledge QA template - #129

Open
webup wants to merge 3 commits into
mainfrom
codex/ragflow-knowledge-qa
Open

Add RAGFlow knowledge QA template#129
webup wants to merge 3 commits into
mainfrom
codex/ragflow-knowledge-qa

Conversation

@webup

@webup webup commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new deepagents/ragflow-knowledge-qa template for building dataset-scoped knowledge-base Q&A agents against an existing RAGFlow deployment.

The design keeps RAGFlow credentials server-side, requires explicit dataset scopes for retrieval, and gates document uploads and parsing behind user approval. ContextSeek and per-user authorization remain intentionally deferred.

Closes #81.

What Changed

  • added a Python 3.13 DeepAgents template pinned to ragflow-sdk==0.26.4
  • added four RAGFlow tools:
    • paginated dataset discovery
    • explicit-scope retrieval
    • approval-gated staged document upload
    • approval-gated asynchronous document parsing
  • kept mutation tools on the root agent while the knowledge subagent remains read-only
  • added a React frontend with thread URLs, streamed plans/tool activity, and single- or multi-interrupt approval handling
  • added lifecycle sync and frontend tasks, loopback/remote-host guidance, registry entries, and English/Chinese documentation
  • added focused adapter, approval, rendering, registry, and template-contract tests

Developer Impact

Developers can scaffold the template with:

agentseek create --type deepagents --template ragflow-knowledge-qa

The generated project requires Python 3.13 and an external RAGFlow endpoint. It supports OpenAI-compatible agent models through the canonical AGENTSEEK_* variables and keeps RAGFlow configuration under RAGFLOW_*.

This PR does not deploy RAGFlow, connect directly to seekdb, or bundle ContextSeek/per-user authorization. RAGFlow backed by OceanBase seekdb remains a recommended deployment option.

Validation

  • make check
  • make test - 125 passed
  • make docs-test
  • rendered frontend tests - 13 passed
  • rendered frontend TypeScript/Vite production build
  • fresh Python 3.13 dependency sync with ragflow-sdk==0.26.4
  • fresh rendered graph import as CompiledStateGraph
  • independent code review and follow-up review with no remaining Critical or Important findings

A live RAGFlow request was not run because no endpoint or API key was available.

Current PR Checks

  • Local checks: passing
  • Hosted CI: passing

@webup
webup marked this pull request as ready for review July 10, 2026 15:04
@webup

webup commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

@Everfighting Could you review this PR and confirm whether it meets the core request in #81?

This first version includes:

  • a DeepAgents RAGFlow knowledge-QA template
  • dataset discovery and retrieval from explicit dataset IDs
  • approval-gated staged document uploads and asynchronous parsing
  • a browser UI with streamed tool activity, approval/resume handling, and persistent thread URLs
  • OpenAI-compatible model configuration and a bring-your-own RAGFlow deployment

By design, this v1 defers:

  • ContextSeek / persistent context
  • per-user and resource-level authorization for confidential knowledge bases
  • manual editing of generated answers or execution strategies before resume

The implemented safety boundary keeps retrieval scope explicit and requires user approval before RAGFlow mutations.

Do these boundaries meet your expectation for the first version? If not, please call out anything you consider blocking before merge.

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.

[Template]: ragflow-knowledge-qa-agent

1 participant