Use Case: Company Knowledge Base with Role-Based Agent
Build a hierarchical, company-wide knowledge base that a dedicated AI agent can query and update — with role-based write access so each team only controls their own content.
Scenario
A growing company wants a single, authoritative source of truth for company policies, procedures, and operating guidelines. Different departments own different sections of the knowledge base — HR owns the People policies, Finance owns the financial procedures, and IT owns the technical standards. An AI agent, trained on this content, should be available to any employee who needs to ask a question, while writes to each section remain restricted to the appropriate owner.
Personas
| User | Role | Owns |
|---|---|---|
| Alice | HR Manager | People policies, onboarding guides, leave procedures |
| Adam | Finance Lead | Expense policies, budget procedures, financial controls |
| Jasmin | IT Manager | Technical standards, security policies, software guidelines |
| All staff | Read-only | Can query the knowledge base via the CompanyKB agent |
Setup (Administrator)
1. Create the knowledge base folder structure
- In the shared drive, create a root folder named Company Knowledge Base.
- Inside it, create three sub-folders:
- People & HR
- Finance & Operations
- IT & Technology
- Create an additional General sub-folder for company-wide documents (vision, org chart, values).
2. Set folder permissions
Apply permissions to each sub-folder so that only the relevant owner has write access, while everyone else has read access:
| Folder | Owner (Read + Write) | Everyone else |
|---|---|---|
| People & HR | Alice (HR group) | View Online |
| Finance & Operations | Adam (Finance group) | View Online |
| IT & Technology | Jasmin (IT group) | View Online |
| General | Admins | View Online |
3. Create the CompanyKB agent
- Navigate to Flow → Agents and click New Agent (or use the AgentCreator).
- Name it CompanyKB.
- Set its Knowledge Base to the entire Company Knowledge Base folder (all sub-folders).
- Write the agent's system prompt:
Agent System PromptYou are the CompanyKB agent. You have access to the Company Knowledge Base, which contains policies, procedures, and guidelines across HR, Finance, and IT. Answer questions clearly and accurately, citing the relevant document and section. If a question falls outside your knowledge base, say so rather than guessing. Do not reveal confidential content outside a user's access level.
- Enable the document_search and document_read tools.
- Make the agent available to all users (set visibility to Company).
- Save.
4. (Optional) Allow the agent to update content
If you want owners to be able to update the knowledge base through the agent (rather than editing documents directly), enable the document_write tool on the CompanyKB agent. The agent will respect the folder permissions — it will only write to folders where the current user has write access.
Daily Use
Any employee asking a question
- Open Flow and start a chat with CompanyKB.
- Ask a question in plain language.
The agent searches the People & HR folder and responds with the relevant policy excerpt and document reference.
An owner updating their section
- Alice (HR) opens a chat with CompanyKB.
- She asks it to update a policy document in the People & HR folder.
The CompanyKB agent edits the document directly. Because Alice has write access to People & HR, the update is saved and a new version is created automatically.
The agent declines the write because Adam does not have write access to the People & HR folder. It suggests he contact the HR team instead.
Result
Every employee has instant, natural-language access to company knowledge without needing to know where documents are stored. Each department maintains editorial control over their own content. The version history on every document provides a full audit trail of all knowledge base changes.