Start free
Guide Teach your agent your knowledge

How to teach Kilo Code your knowledge

Updated 3 min read

The short answer

Teach Kilo Code through custom instructions, project files such as AGENTS.md, and additional sources configured in kilo.jsonc or Settings → Agent Behaviour → Rules. KnowMan can serve as a separate personal knowledge library, but connecting its local MCP server to Kilo Code depends on client support for local stdio MCP servers.

On this page9 sections
  1. Start with Kilo Code custom instructions
  2. Set instructions for each Kilo Code agent
  3. Teach Kilo Code with project files
  4. Add instructions across projects
  5. Point Kilo Code to extra reference material
  6. Keep KnowMan as your personal knowledge library
  7. Choose the right layer for each kind of knowledge
  8. Use the hosted KnowMan server
  9. Questions people ask

Start with Kilo Code custom instructions

Kilo Code custom instructions guide its responses, coding style, and decisions. They can set coding style, documentation standards, testing requirements, and workflow guidelines. Both Kilo Code's VSCode and CLI versions support custom instructions, but their configuration mechanisms differ. See Kilo Code custom instructions.

Set instructions for each Kilo Code agent

In VSCode, open Settings → Agent Behaviour → Agents to configure a separate custom prompt for each agent. These prompts are injected into the agent's system prompt and apply across its sessions. See Kilo Code custom instructions.

Teach Kilo Code with project files

Kilo Code discovers AGENTS.md, CLAUDE.md, and CONTEXT.md in the project root and parent directories. A root AGENTS.md can provide project-wide instructions, while an AGENTS.md in a subdirectory supplements root instructions when Kilo's Read tool accesses that directory. Project-level instructions load before global instructions and apply to every session. See Kilo Code custom instructions.

Add instructions across projects

For instructions that apply across projects, place an AGENTS.md file at ~/.config/kilo/AGENTS.md. Kilo Code can also use ~/.claude/CLAUDE.md as a global fallback until Claude Code Migration has been attempted. That global fallback ends after migration, while project-level CLAUDE.md files keep working. See Kilo Code custom instructions.

Point Kilo Code to extra reference material

The instructions key in kilo.jsonc accepts an array of paths, globs, or URLs for additional instruction files. You can manage these sources under Settings → Agent Behaviour → Rules. URL-based sources are fetched when a session starts, with a five-second timeout. If a URL is unreachable, Kilo Code silently skips it. See Kilo Code custom instructions.

Keep KnowMan as your personal knowledge library

KnowMan saves articles and links, reads and tags them, answers questions with citations, and keeps claims, decisions, and playbooks. Its MCP server runs locally with npx -y @knowman/mcp and is also available as a hosted server at https://api.knowman.io/mcp. See the KnowMan MCP guide for the documented server setup and client options.

Choose the right layer for each kind of knowledge

Use Kilo Code instructions for stable guidance about coding and workflow. Use KnowMan for saved articles, readable references, cited answers, and personal knowledge that belongs to one person's library. KnowMan is built for one person's library today, and team plans are not available yet.

Use the hosted KnowMan server

In clients that support remote MCP servers, add https://api.knowman.io/mcp, then sign in on the KnowMan consent page and approve access. Alternatively, create an API key in KnowMan settings and send it as an Authorization: Bearer <key> header.

For the open-source local client, run npx -y @knowman/mcp and configure it with your KnowMan API key. The KnowMan MCP client is MIT licensed and requires Node 22+.

Questions people ask

What files can teach Kilo Code project instructions?

Kilo Code discovers AGENTS.md, CLAUDE.md, and CONTEXT.md in project roots and parent directories. Subdirectory AGENTS.md files can supplement root instructions. See Kilo Code custom instructions.

Can I give Kilo Code the same instructions in every project?

Yes. Put an AGENTS.md file at ~/.config/kilo/AGENTS.md. Kilo Code can also use ~/.claude/CLAUDE.md as a global fallback until Claude Code Migration has been attempted. See Kilo Code custom instructions.

Can Kilo Code use reference material stored in KnowMan?

This depends on how your Kilo Code setup supports remote MCP servers and how that client is configured. KnowMan runs locally with npx -y @knowman/mcp and as a hosted server at https://api.knowman.io/mcp, where you can sign in with OAuth or send an API key. See the KnowMan MCP guide.

Build a personal library for your AI workflow

Try KnowMan Pro for 14 days with no credit card. Create your account

Start free

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