Guide
OpenClaw + RAGFlow: Answers With Citations, Not Recollections
RAGFlow combines document understanding, retrieval, and citation into one self-hosted service. Connected to OpenClaw or Hermes it becomes the tool the agent reaches for when the answer has to be traceable to a document.
Retrieval is not memory
These get conflated constantly, and the confusion produces bad systems. Memory is what the agent remembers about a person and a conversation — preferences, prior decisions, running context. Retrieval is a lookup against a corpus that exists independently of any conversation. RAGFlow is firmly the second thing.
The tell is the question being asked. "What did I tell you last week?" is memory. "What does the refund policy say about digital goods?" is retrieval — and it demands a citation, because an unattributed policy answer is worse than no answer.
1. Run RAGFlow and index a dataset
Deploy RAGFlow following its HTTP API reference, create an API key, and index at least one dataset before connecting anything. Serve it over TLS. Confirm the API answers and that your dataset is listed:
curl -fsS https://ragflow.example.com/api/v1/datasets \
-H 'Authorization: Bearer YOUR_KEY'Do the indexing quality work here, not in the prompt. Chunk size, parser choice, and which documents are in scope determine answer quality far more than any instruction you give the agent afterwards.
2. Connect it from Dashboard Tools
Open Dashboard Tools, select a running OpenClaw or Hermes instance, and connect the RAGFlow card. The placeholder endpoint is https://ragflow.example.com and the API key is stored for the connector, not placed in a prompt. A managed skill is installed alongside the client so the agent knows the endpoint and the safe call patterns. The client lives at a managed path — tools/dashboard-api-connectors/ragflow/tool — and the examples below use tool as shorthand for it.
# What datasets can this key see?
tool get /api/v1/datasets
# Discover the rest of the API surface
tool discover3. Make citations non-negotiable
RAGFlow returns source references; the failure mode is an agent that reads them and then answers in its own voice without them. Put the requirement in the instance instructions: every answer drawn from the knowledge base names its source, and when retrieval returns nothing relevant the agent says so instead of falling back on general knowledge.
That second half is the one people forget. An agent that quietly substitutes its own training data for your policy documents is more dangerous than one that says "I could not find that in the knowledge base".
4. Limit what the agent can read — with an identity, not a prompt
- RAGFlow keys are user-level. There is no per-key dataset scope, so "give it a narrower key" is not a thing you can do.
- To restrict an agent, create a dedicated RAGFlow account whose dataset access covers only what that instance should see, and use its key. Never hand an agent an admin account's key.
- Watch the
meversusteampermission on each dataset — flipping a dataset to team access silently widens every team key, including the agent's. - If different user groups must see different corpora, that boundary belongs in RAGFlow accounts, not in a prompt telling the agent to be careful.
- Printed responses cap at 5 MB and the client sets a 120-second socket timeout, which bounds a stalled connection rather than total runtime — return passages, not whole documents.
- Re-index deliberately. A stale dataset produces confidently cited wrong answers, which is the worst possible outcome.
Production hardening
- Authenticate the endpoint and keep it private; a retrieval API is a read interface to your whole corpus.
- Size the host for parsing and embedding peaks; those are the operations that spike, not queries.
- Log queries and returned document identifiers for auditing, without logging retrieved content wholesale.
- Have a documented process for removing a document from the index, not just from storage.
RAGFlow versus the alternatives
RAGFlow is the strongest option when document understanding and citations are the point. If you have already built retrieval inside a Dify application, call that instead of standing up a second stack. For conversational recall rather than corpus lookup, see OpenClaw memory.
Frequently asked questions
Why use RAGFlow instead of the agent’s own memory?
Different jobs. Agent memory carries conversational context; RAGFlow indexes a document corpus and returns passages with citations. When a user asks "what does our policy say", you want a retrieved, attributable passage — not a recollection.
Where does document parsing and indexing happen?
On the RAGFlow server. Parsing, chunking, embedding, and index storage all stay there, which is why this works on a small instance: the agent installs a scoped HTTP client and nothing else.
Do I need an API key?
Yes, and it is worth knowing what that key is. RAGFlow issues keys at the user level, not per dataset — a key sees whatever its owning account can see, governed by each dataset's own me or team permission. To limit an agent to a subset of your corpus you create a dedicated RAGFlow account with access to only those datasets and use its key. The connector stores that key for the instance rather than exposing it to prompts.