Knowledge Base Important Issue
# support
t
Hi Team, my AI agency uses ChatDash, a tool where end-users can directly upload their own Knowledge Base documents. These files are automatically synced to the Files section under their Vapi AI Agent. It works. But the issue is that the AI Agent doesn’t seem to read or use those files directly from the Files section. Right now, the only way to make it work is for me to manually create a Query Tool and connect it to those files. But my main requirement is full automation: when a client uploads documents via ChatDash, they should instantly become part of the Agent’s knowledge base, without me needing to go agent by agent and manually configure a Query Tool. Please also check the two attachments. So my question is: is there a way to make Agents automatically use the files uploaded into the Files section as their KB? Or is the only current solution to always create and bind a Query Tool (which breaks the automation we need)? Thanks a lot for the clarification — this is a crucial point for scaling, since we want clients to be completely self-serve. #1211483291191083018 https://cdn.discordapp.com/attachments/1418761488801337354/1418761489053126686/IMG_5994.png?ex=68cf4c1a&is=68cdfa9a&hm=4e0f61af0fb4c3a88c681b87e6cd7296696501f94ce90a7a699a31798cecebd7& https://cdn.discordapp.com/attachments/1418761488801337354/1418761489371889674/IMG_5995.png?ex=68cf4c1a&is=68cdfa9a&hm=16af13dcb8db23abab26d6fc5fca49aa7d15f404a8b9d9a073e6ef17d8a90a1f&
v
Currently, Vapi does not automatically use files from the Files section as an agent's knowledge base—you must create and bind a Query Tool to those files. To automate this, use the API to create a Query Tool and attach it to the assistant whenever new files are uploaded. For example:
Copy code
bash
curl --location 'https://api.vapi.ai/tool/' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "query",
    "function": { "name": "auto-kb-query" },
    "knowledgeBases": [{
      "provider": "google",
      "name": "auto-kb",
      "description": "Auto-attached KB",
      "fileIds": ["<NEW_FILE_ID_1>", "<NEW_FILE_ID_2>"]
    }]
  }'
Integrate this into your ChatDash workflow to achieve full automation. [See API docs for details](https://docs.vapi.ai/api-reference/tools/create#request.body.query.knowledgeBases). Sources: - [Using the Query Tool for Knowledge Bases](https://docs.vapi.ai/knowledge-base/using-query-tool) - [API Reference: Create Tool](https://docs.vapi.ai/api-reference/tools/create#request.body.query.knowledgeBases)
v
Message marked as helpful by @TechLuke! 🎉
c
checking if this is resolved/solved for you?
3 Views