Home / Documentation / Use Cases / Company Knowledge Base
Resources · Documentation · Examples

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.

AI Agent Knowledge Management Last Updated: May 2026 WebPal 4.2+

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

  1. In the shared drive, create a root folder named Company Knowledge Base.
  2. Inside it, create three sub-folders:
    • People & HR
    • Finance & Operations
    • IT & Technology
  3. 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

  1. Navigate to Flow → Agents and click New Agent (or use the AgentCreator).
  2. Name it CompanyKB.
  3. Set its Knowledge Base to the entire Company Knowledge Base folder (all sub-folders).
  4. Write the agent's system prompt:
    Agent System Prompt
    You 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.
  5. Enable the document_search and document_read tools.
  6. Make the agent available to all users (set visibility to Company).
  7. 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.

Permission enforcement The agent does not bypass folder permissions. If Alice asks it to update the IT & Technology folder, the write will be denied because she lacks write access to that folder.

Daily Use

Any employee asking a question

  1. Open Flow and start a chat with CompanyKB.
  2. Ask a question in plain language.
Prompt
What is the policy for requesting more than 5 days of annual leave at once?

The agent searches the People & HR folder and responds with the relevant policy excerpt and document reference.

An owner updating their section

  1. Alice (HR) opens a chat with CompanyKB.
  2. She asks it to update a policy document in the People & HR folder.
Prompt — Alice (HR)
Update the "Annual Leave Policy" document to add a new section stating that staff must give 4 weeks' notice for leave requests of 10 or more consecutive days.

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.

Prompt — Adam (Finance, attempting unauthorized write)
Update the Annual Leave Policy to add an exception for finance staff during the end-of-quarter period.

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.