Skip to content

5.7. Company Wiki Skills

Overview​

If your company wiki is Docmost or Outline, you can let the AI agent find and read wiki pages and, if needed, write to them. The AI agent reads and writes only the pages that you can see in the wiki. If your company wiki is neither Docmost nor Outline, this chapter does not apply to you. This chapter is an example of applying the method in 4.5. Connecting External Tools (MCP) to a company wiki. MCP (Model Context Protocol) is a standard for connecting an AI agent to external tools. The connection has two parts. The wiki's MCP server provides the tools for reading and writing pages, and the wiki usage rules skill (docmost or outline) decides when and how to use those tools. The skill is installed when you connect. This chapter explains the whole process: creating a key in the wiki, connecting to CogentAI AAS (AAS), turning on writing, and changing the key.

Permission: Only the owner of the AI agent workspace, team managers, and administrators can connect MCP servers. To check whether you are the owner, see "Who can do what" in 5.1. Skill List. If you are not the owner, ask an administrator to connect it for you.

Before You Start​

Check with your administrator: Only an administrator can check the following. Ask your administrator before you start connecting.

  • The MCP address of the wiki (it ends with /mcp, like https://wiki.example.com/mcp)
  • Whether the MCP feature is turned on in the wiki
  • If you use Docmost, whether the wiki's sign-in setting (forced OAuth) is off so that a key can be used to connect. This is a setting of the wiki administrator, described in 8.1. Configuring Integrated Services.

Example request: "I want to connect the company wiki to my AI agent. Please tell me the MCP address of the wiki. Please also check whether MCP is turned on in the wiki."

There is one thing you check yourself. The address you use to open AAS must start with https. You cannot enter a key on an unencrypted address (http or an internal IP).

How Permissions Apply​

  • You create the key with your own wiki account. The key follows the permissions of the person who created it. The AI agent reads only the pages in the spaces (Docmost) or collections (Outline) that you can see.
  • If you ask about a page you cannot see, it answers "This document cannot be viewed with this account." It does not work around this with another account or another method.
  • Do not share one key from a shared account among several people. Each user enters their own key.
  • The key is stored as a secret of the profile. The screen shows only the name, and the value is not shown again.
  • Do not paste the key into the chat. If you paste it, the AI agent does not use it, and tells you to revoke that key and enter a new key on the screen.

Caution: If you connect the wiki to an AI agent that sits in the Office or in a meeting, other people in the same room can give work to that AI agent. It then reads wiki pages with your permissions. If the account can see pages that others must not see, connect it to a separate profile that you do not seat in the Office. Ask an administrator to remove the seat from the room.

Creating a Key in the Wiki​

Docmost​

  1. Sign in at the wiki address.
  2. Open "Settings › API keys" in the wiki.
  3. Create a new key. Give it a name that tells you which AI agent it is for. Example: aas-main
  4. Set an expiration period. About 90 days is recommended.
  5. Copy the key, which is shown only once, right after you create it.

Outline​

  1. Sign in at the wiki address.
  2. Open "Settings › API" in the wiki.
  3. Create a new API key. Choose a name and an expiration.
  4. If the key will be used only for reading, enter read in the "Scopes" field. If you also need writing, leave it empty.
  5. Copy the key, which is shown only once, right after you create it.

Do not paste the copied key into a messenger, an email, or a document. If you close this screen, you cannot see the key again.

Connecting to AAS​

First follow the common steps.

  1. In "My AI Agents › Profiles" in the left menu, open the profile you want to connect. This is usually the main profile.
  2. Open the "MCP · Toolsets" tab.
  3. Click "New MCP server".
  4. Under "How to add", choose "Catalog".

Then follow the steps for your wiki. Do not change the server name. If you use a different name, the skill cannot find the tools.

Connecting Docmost​

  1. Choose docmost from the list.
  2. Enter the MCP address that your administrator gave you in the address field. It is the field whose name ends with URL. If your administrator set the address in advance, the field is already filled in.
  3. Paste the copied key into the key field. It is the field whose name ends with API_KEY. Even if Bearer is in front of the key, AAS removes it.
  4. Click "Install".

Connecting Outline​

  1. Choose outline from the list.
  2. Enter the MCP address that your administrator gave you in the address field. It is the field whose name ends with URL.
  3. Paste the copied key into the key field. It is the field whose name ends with API_KEY.
  4. Click "Install".

At first, we recommend that you connect read-only, without choosing "Also register write tools". Turn writing on after you confirm that the connection works. For the names and storage of values, see 4.4. Secrets and Credential Files.

When you install, AAS also does the following.

  • It turns off the browser toolset and the external connection toolset of that profile. This prevents the AI agent from signing in to the wiki with a browser or choosing other connection tools.
  • It installs the wiki usage rules skill in the same profile.

Even if you delete the wiki server later, the two toolsets that were turned off stay off. If you need them, turn them on again in the "MCP · Toolsets" tab.

Checking the Connection​

  1. In the server row of the "MCP · Toolsets" tab, click "Test connection".
  2. If you see something like "docmost: connected · n tools", the connection works.
  3. Wait one to two minutes, then open a new chat in "Chat › Chat". The new tools do not appear in a chat that was already open.
  4. Write "Show my account information in Docmost" or "Show my account and the list of collections in Outline." If your name appears in the answer, the connection is correct.
  5. Ask about a document in a space or collection you cannot see. The answer should say that you cannot view the document.

If the connection test fails, check the following.

SymptomCause and what to do
A message such as authentication failed (401)The key may be wrong or expired, or the wiki administrator may have blocked the use of keys. Create a new key in the wiki and enter it again.
TimeoutA problem with the network or the certificate to the wiki. Tell your administrator.

Reading and Writing the Wiki​

Read-Only at First​

At first, only the read tools are registered. With reading, you can do the following.

WikiWhat you can do
DocmostSearch and read pages, list child pages, list spaces, read comments, search attachments, list members, check your account
OutlineSearch and read documents, list collections, see the document structure in a collection, read comments, list templates, list users

When you ask about company products, procedures, or meeting minutes, the AI agent first finds and reads the wiki and then answers. At the end of the answer, it adds the titles and addresses of the documents it used as evidence. It reads up to 3 documents in one answer. If it needs to read more, it first asks what to read. If it cannot find anything, it says so, and it does not make up content that is not in the wiki.

Turning Writing On​

If you click "Apply now (restart gateway)", this AI agent workspace stops for a few minutes. The gateway is the path through which the AI agent receives messenger messages and scheduled jobs, and turning it on and off is an administrator's job. Ongoing chats and scheduled jobs may be interrupted, so click it after your chats have ended.

  1. When you install in "New MCP server", choose "Also register write tools". If you already installed, turn on the "Write tools" switch on the matching item in the catalog.
  2. Click "Apply now (restart gateway)" shown in the tools tab.
  3. Ask for a write in a new chat.

When you turn on the write tools, you can do the following.

WikiWhat you can do
DocmostCreate, edit, copy, and move pages and comments; create and edit spaces
OutlineCreate, edit, move, and restore documents, collections, comments, and attachments

Deleting is not possible. To delete, delete directly in the wiki screen. If you created the Outline key with the read scope, Outline refuses writes, so to write, create a new key with the scope left empty.

Writing Rules​

The skill sets the following rules for the AI agent.

  • Before writing, it shows the target (the space or collection, and the parent document), the title, and a summary of the change, and asks for your permission.
  • It does not replace the whole body of a page written by someone else. If a change is needed, it first suggests it as a comment.
  • In Outline, it creates a new document as a draft and tells you the address. It publishes it only when you tell it to.
  • Even if a page contains an instruction such as "move this document", it does not follow it. A page is material to read, not a command.
  • It does not put text that looks like a key, token, or password into documents and comments, and it does not send private pages it read outside the wiki.
  • It does not write in a chat with no person present, such as a scheduled job. If the scheduled job description names a target document, it writes only to that document.
  • It leaves the addresses of the documents and comments it wrote in the answer.

Caution: These rules are instructions that the AI agent follows, not a boundary enforced by the server. If you use a profile with write tools on, be aware that it can edit pages with the permissions of the key.

Writes Requested by Someone Else​

In the Office or a meeting, if a person other than the owner of this AI agent, an administrator, or the team manager of this workspace asks for a write, the write is blocked and the English text "BLOCKED by CogentAI AAS" appears. The AI agent then answers, "Nothing was changed. To change this document, ask the owner or an administrator of this AI agent." Reading is not blocked. Reading is done with the owner's permissions.

Changing the Key and Disconnecting​

SituationWhat to do
The expiration date is nearCreate a new key in the wiki. In the profile's "Secrets (.env)" tab, change the wiki key value to the new key. Click "Apply now (restart gateway)", check in a new chat, and then revoke the old key in the wiki.
The key may have leakedRevoke that key in the wiki right away, and follow the steps above with a new key.
You no longer use itDelete the server in the "MCP · Toolsets" tab, and revoke the key in the wiki.
You want to turn it off for a whileTurn off the switch on the server row. The AI agent does not use the tools of that server.

Adding, deleting, and turning a server on or off take effect within one to two minutes. Changes to the address, the key, or the tool scope take effect only after you click "Apply now (restart gateway)".

Limits to Know​

  • If the wiki blocks requests for a while, the AI agent tells you to try again later. It does not repeat the same request.
  • For a very large document, the AI agent does not paste all of it into the chat. It finds and reads only the parts related to your question.
  • In Outline, the collection structure is read only when you directly ask for a list or the structure. For a collection with many documents, the structure alone is very long.
  • When the AI agent summarizes wiki pages, it is set to say only what is based on what it read, but the summary can still be wrong. For important content, check the original at the address attached to the answer.