# How to teach JetBrains AI Assistant your knowledge

Teach JetBrains [AI Assistant](https://www.knowman.io/guides/give-your-ai-context) project knowledge by creating rules under [Settings | Tools | AI Assistant | Rules](https://www.jetbrains.com/help/ai-assistant/configure-project-rules.html). For [saved articles](https://www.knowman.io/guides/how-to-save-articles) and personal reference material, a local KnowMan [MCP server](https://www.knowman.io/guides/mcp-server-knowledge-base) can provide search, retrieval, answers, and saving tools. The documented KnowMan MCP tools are `kb_search`, `kb_get_item`, `kb_ask`, and `kb_save`.

## Add project instructions with rules

JetBrains [project rules](https://www.knowman.io/guides/knowledge-base-for-ai-agents) can describe your code, preferred tools, and coding conventions. They are configured under [Settings | Tools | AI Assistant | Rules](https://www.jetbrains.com/help/ai-assistant/configure-project-rules.html).

## Create a rules file

Creating a project rules file creates an `.aiassistant/rules` folder with a Markdown file. You can also create `.aiassistant/rules` in the project root and add a Markdown file manually. See [JetBrains AI Assistant project rules](https://www.jetbrains.com/help/ai-assistant/configure-project-rules.html).

## Choose when rules apply

Each rules file has a selectable rule type. Always rules apply to all chat sessions. Manually applied rules can be invoked with `@rule:` or `#rule:`, or attached with Add attachment. See [JetBrains AI Assistant project rules](https://www.jetbrains.com/help/ai-assistant/configure-project-rules.html).

## Use model and file-based rules

By model decision rules apply when the model considers them relevant, so include an Instruction explaining when to apply them. By file patterns rules apply when a chat-referenced file matches a pattern such as `*.kt` or `src/**`. See [JetBrains AI Assistant project rules](https://www.jetbrains.com/help/ai-assistant/configure-project-rules.html).

## Write useful guidelines

Put your guidelines in the rules Markdown file. JetBrains examples cover naming, style, structure, best practices, documentation, and tools. You can expand the attachments list at the start of a response to check whether rules were applied. See [JetBrains AI Assistant project rules](https://www.jetbrains.com/help/ai-assistant/configure-project-rules.html).

## Connect KnowMan for saved knowledge

KnowMan MCP is a local [stdio server](https://www.knowman.io/guides/what-is-an-mcp-server) started with `npx -y @knowman/mcp` and requires Node 22 or newer. It uses a `KNOWMAN_API_KEY` Bearer key, or a saved CLI login. See the [MCP server guide](https://www.knowman.io/guides/mcp-server-knowledge-base).

## Where KnowMan fits

KnowMan can search saved items, read one item, [answer questions with citations](https://www.knowman.io/guides/ai-knowledge-base), and save URLs. The tools are `kb_search`, `kb_get_item`, `kb_ask`, and `kb_save`. KnowMan runs locally with `npx -y @knowman/mcp` and as a hosted server at https://api.knowman.io/mcp with OAuth sign-in or an API key.

## Use the hosted KnowMan server

In clients that support remote MCP servers, add https://api.knowman.io/mcp, then [sign in](https://www.knowman.io/guides/personal-knowledge-base) with OAuth on the KnowMan consent page or send an API key as an `Authorization: Bearer <key>` header. For example, Cursor `mcp.json` can use `{"mcpServers":{"knowman":{"url":"https://api.knowman.io/mcp","headers":{"Authorization":"Bearer <key>"}}}}`.

Then ask the assistant to search your KnowMan for saved knowledge or save a URL. The hosted server exposes the same `kb_search`, `kb_get_item`, `kb_ask`, and `kb_save` tools. The open-source local client is available at https://github.com/Essatt/knowman-mcp.

## Questions

### How do I give JetBrains AI Assistant project rules?

Open [Settings | Tools | AI Assistant | Rules](https://www.jetbrains.com/help/ai-assistant/configure-project-rules.html), then create or edit a Markdown file in `.aiassistant/rules`. Choose a rule type and add your guidelines. See [JetBrains AI Assistant project rules](https://www.jetbrains.com/help/ai-assistant/configure-project-rules.html).

### Can JetBrains AI Assistant use saved articles as knowledge?

JetBrains project rules are documented for project-specific guidance, but a general feature for adding [saved articles](https://www.knowman.io/guides/ai-article-saver) or reference documents is not documented here. A KnowMan MCP connection may provide access to saved items if the client supports a local stdio MCP server.

### Can KnowMan teach JetBrains AI Assistant my knowledge?

KnowMan MCP exposes tools to search saved items, read one item, ask questions with citations, and save URLs. It runs locally with `npx -y @knowman/mcp` and as a hosted server at https://api.knowman.io/mcp with OAuth sign-in or an API key.

### What are the KnowMan MCP tools?

`kb_search` searches saved items, `kb_get_item` reads one item, `kb_ask` answers with citations, and `kb_save` saves a URL. KnowMan runs locally with `npx -y @knowman/mcp` and as a hosted server at https://api.knowman.io/mcp with OAuth sign-in or an API key.

## Related guides

- [How Do You Connect AI to Your Notes?](https://www.knowman.io/guides/connect-any-ai-to-your-notes)

- [How to Give Your AI Context from What You Read](https://www.knowman.io/guides/give-your-ai-context)

- [What Is a Knowledge Base for AI Agents?](https://www.knowman.io/guides/knowledge-base-for-ai-agents)

- [Connect your knowledge base through KnowMan's MCP server](https://www.knowman.io/guides/mcp-server-knowledge-base)

- [What is a personal knowledge base, and how do you build one?](https://www.knowman.io/guides/personal-knowledge-base)

## More in this topic

- [How to teach OpenClaw your knowledge](https://www.knowman.io/guides/teach-openclaw-your-knowledge)
- [How to teach Kilo Code your knowledge](https://www.knowman.io/guides/teach-kilo-code-your-knowledge)
- [How to teach Kiro your knowledge](https://www.knowman.io/guides/teach-kiro-your-knowledge)

## More for JetBrains AI Assistant

- [Connect KnowMan to JetBrains AI Assistant](https://www.knowman.io/integrations/jetbrains)
- [How to set up JetBrains AI Assistant rules](https://www.knowman.io/guides/jetbrains-memory)

## Keep your knowledge close

Try KnowMan Pro for 14 days with no credit card. [Create your account](https://app.knowman.io/signup)

[Start free](https://app.knowman.io/signup)

Every new account starts with 14 days of Pro. No credit card.

Source: https://www.knowman.io/guides/teach-jetbrains-your-knowledge
