AI and media
AI agents that use Dify Knowledge
UtilitySpaces gives an AI agent scoped access to Dify Knowledge through its own encrypted connection, not your password. The agent can call 4 named Dify Knowledge tools, and the one that writes waits for a person's approval unless an admin has set the connection to run without asking. Every call is written to a hash-chained audit log with its arguments and its result.
What an agent can do in Dify Knowledge
Query and extend Dify knowledge bases. Collections are dataset ids, and the API key is a dataset key (dataset-...), not an app key. An agent calls these by name, and matching is exact.
| Tool | What it does | Waits for approval by default |
|---|---|---|
| List collections | List the knowledge bases available on this connection. Returns { collections: [{ id, name }] }. | No — read only |
| Query knowledge base | Retrieve the passages most relevant to a question. Returns { chunks: [{ text, score, source }], answer? }. Reads only — it never changes the knowledge base. | No — read only |
| Ingest text | Add a plain-text document to a knowledge base so later queries can retrieve it. | Yes — it writes |
| List documents | List the documents already ingested into a knowledge base. | No — read only |
3 read tools, 1 write tool. Generated from the connector catalogue the product runs on, so it cannot list a tool that does not exist.
What teams hand an agent in Dify Knowledge
Teams running Dify hand an agent the datasets: List collections shows the knowledge bases, Query knowledge base retrieves the most relevant passages for a question, and List documents shows what each dataset holds. Ingest text is the single write, waiting for a person unless the connection runs without asking, and the connection uses a dataset key, not an app key.
- Answer questions in the channel from the Dify dataset with the retrieved passages shown as sources.
- Check which documents a dataset holds before the team relies on its answers for a customer question.
- Ingest a text -- a product note, a policy change -- into the right dataset (after a person approves it)
What waits for a person
Reads run on their own. These do not — each one waits in Approvals for an owner or admin unless an admin has set this connection to run writes without asking, and every call toDify Knowledge, approved, rejected or unattended, is logged.
- Ingest text POST
What connecting Dify Knowledge takes
Dify Knowledge uses an API key you create in Dify Knowledge and paste in once. A workspace admin sets the connection up; the fields are:
- API URL
- Dataset API Key
Credentials are encrypted and bound to your workspace, never read back, and every outbound call passes one guarded fetch — the connector security posture sets out exactly how, and the security page covers the platform around it.
Where Dify Knowledge fits
Give an agent Dify Knowledge work by writing a message in the inbox, or put its tools in a scheduled flow. What the run cost is on the cost breakdown.
Other ai and media integrations: AnythingLLM, AssemblyAI, D-ID. Or see every application agents can connect to.
See it doing your actual work
Open a demo workspace, connect one app, and give an agent a real job. No card, no sales call.
We reply to every message within one business day.