README.md

May 7, 2026 ยท View on GitHub

๐Ÿง  Kahuna

Your AI copilot's memory. Persistent context across sessions, projects, and teams.

Give your coding agent the context it needs โ€” automatically.

GitHub stars npm version License: MIT PRs Welcome Last commit

Works with Claude Code ยท more copilots coming soon


The Problem

Every time you start a new conversation with your AI copilot, it forgets everything.

  • ๐Ÿ”„ You repeat the same context about your project, your team, your standards
  • ๐Ÿคท The copilot makes mistakes you've already corrected in past sessions
  • ๐Ÿ“„ Your policies, specs, and business rules sit in files the copilot never sees
  • ๐Ÿง  Decisions and rationale from past conversations are lost forever

Copilots are powerful โ€” but they have amnesia.

The Solution

Kahuna gives your copilot a persistent memory that grows smarter over time.

Without KahunaWith Kahuna
Copilot starts fresh every sessionCopilot remembers what it learned
You repeat context manuallyContext surfaces automatically
Knowledge lives in your headKnowledge lives in a structured KB
Decisions are forgottenDecisions persist across sessions

How it works: Kahuna runs as an MCP server alongside your copilot. You teach it your context once โ€” policies, specs, decisions, patterns โ€” and it proactively surfaces the right knowledge for each task.

๐Ÿ”’ All data stays local. Your code and context never leave your machine.


Quickstart (Claude Code)

Step 1: Add Kahuna to Claude Code

claude mcp add kahuna -s user -e ANTHROPIC_API_KEY="your-anthropic-api-key" -- npx @aurite-ai/kahuna

Scope options:

  • -s project โ€” Config stored for current project only
  • -s user โ€” Config stored globally (available across all projects)

Step 2: In any project, tell your copilot:

"Set up Kahuna"

This deploys copilot rules and runs onboarding. The copilot asks a few questions to understand your context โ€” this only happens once.

Step 3: Start teaching it your context:

"learn ~/Downloads/api-guidelines.pdf"

"learn the docs/ folder"

Step 4: Start working โ€” Kahuna surfaces the right context automatically.

"build a customer support agent"

Kahuna feeds your copilot your API conventions, auth patterns, and related context. No reminders needed.

๐Ÿ“ฆ More installation options (npm global, Docker, from source)

npm (Global Install)

npm install -g @aurite-ai/kahuna

Configure your MCP client to use kahuna-mcp as the command.

npx (No Install)

npx @aurite-ai/kahuna

Docker

docker pull kahuna/mcp
docker run -i kahuna/mcp

From Source

git clone https://github.com/Aurite-ai/kahuna.git
cd kahuna
pnpm install
pnpm --filter @aurite-ai/kahuna build
pnpm --filter @aurite-ai/kahuna bundle

What It Looks Like

You teach Kahuna your company's context:

"learn ~/docs/api-guidelines.pdf"

"learn the docs/ folder"

Later, you start a task:

"build a customer support agent"

Kahuna automatically surfaces the relevant context to your copilot:

  • โœ… Your API conventions and auth patterns
  • โœ… Customer data models and access policies
  • โœ… Error handling and response format standards
  • โœ… Related endpoints already in the codebase

Your copilot builds it right the first time โ€” no reminders needed.


How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  YOU                          COPILOT                  KAHUNA   โ”‚
โ”‚                                                                 โ”‚
โ”‚  "set up Kahuna"  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ  deploys rules  โ”€โ”€โ”€โ”€โ”€โ–บ  .claude/   โ”‚
โ”‚                               asks questions          stores    โ”‚
โ”‚                                                       context   โ”‚
โ”‚                                                                 โ”‚
โ”‚  "learn these docs" โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ  kahuna_learn   โ”€โ”€โ”€โ”€โ”€โ–บ  knowledge  โ”‚
โ”‚                                                       base      โ”‚
โ”‚                                                                 โ”‚
โ”‚  "build feature X" โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ  kahuna_prepare โ”€โ”€โ”€โ”€โ”€โ–บ  surfaces   โ”‚
โ”‚                               _context                relevant  โ”‚
โ”‚                                                       files     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ก If Kahuna saves you from repeating yourself, consider giving it a โญ. It helps others discover the project.


Contents


How It Compares

FeatureKahunaCopilot MemoryRAG ToolsManual Context
Persists across sessionsโœ…Partialโœ…โŒ
Learns from files & conversationsโœ…โŒFiles onlyN/A
Proactive context surfacingโœ…โŒQuery-basedโŒ
Auto-classifies knowledgeโœ…โŒโŒManual
Works across projectsโœ…โŒVariesโŒ
Zero-config for copilotโœ…โœ…โŒโŒ
Data stays localโœ…โŒVariesโœ…

Kahuna is not a replacement for built-in copilot memory โ€” it's what copilot memory should have been.


Features

  • ๐Ÿง  Knowledge Base โ€” Store, categorize, and retrieve context from markdown files
  • ๐ŸŽฏ Smart Context Surfacing โ€” Automatically surface relevant knowledge for your task
  • ๐Ÿ”— Integration Management โ€” Discover, verify, and use external service integrations
  • ๐Ÿ” Secure Credential Vault โ€” Store and manage secrets with multiple provider support
  • ๐Ÿ“Š Usage Tracking โ€” Monitor token consumption and costs per project
  • ๐Ÿš€ Onboarding System โ€” Guided setup for organization and project context

Available Tools

ToolDescription
kahuna_initializeDeploys copilot rules, runs onboarding
kahuna_learnAdds files to knowledge base with classification
kahuna_prepare_contextSurfaces relevant knowledge for a task
kahuna_askQuick Q&A against the knowledge base
kahuna_deleteRemove outdated files from the knowledge base
kahuna_provide_contextStore org or user context in the knowledge base
kahuna_usageView token usage and cost summary for the project
kahuna_list_integrationsList all discovered integrations and their status
kahuna_use_integrationExecute operations on discovered integrations
kahuna_verify_integrationVerify integration credentials and connectivity
health_checkVerify MCP server connectivity

Documentation

For Users:

For Contributors:


Contributing

We welcome contributions of all kinds!

๐Ÿ› ๏ธ Developer Setup

Prerequisites

  • Node.js 18+
  • pnpm 9+

Quick Start

# Install dependencies
pnpm install

# Set up environment
cp apps/mcp/.env.example apps/mcp/.env

# Build workspace packages
pnpm build

# Run tests
pnpm test

Scripts

CommandDescription
pnpm buildBuild all packages (via Turborepo)
pnpm testRun all tests across workspace
pnpm lintLint codebase (Biome)
pnpm lint:fixLint and auto-fix issues
pnpm formatFormat codebase (Biome)
pnpm typecheckType-check all packages
pnpm cleanRemove build artifacts and caches

Testing CLI

CommandDescription
pnpm kahuna-testRun testing CLI
pnpm test:createCreate a test project from a scenario
pnpm test:listList available scenarios and test projects
pnpm test:collectCollect results from a test session

Project Structure

kahuna/
โ”œโ”€โ”€ apps/
โ”‚   โ””โ”€โ”€ mcp/                # MCP server (stdio) โ€” context management tools
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ”œโ”€โ”€ knowledge/  # Knowledge base domain logic (agents, storage, surfacing)
โ”‚       โ”‚   โ”œโ”€โ”€ integrations/   # External service integration management
โ”‚       โ”‚   โ”œโ”€โ”€ vault/      # Secure credential management
โ”‚       โ”‚   โ”œโ”€โ”€ usage/      # Token usage and cost tracking
โ”‚       โ”‚   โ””โ”€โ”€ tools/      # MCP tool handlers
โ”‚       โ””โ”€โ”€ templates/      # Project initialization templates
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ testing/            # QA testing infrastructure (scenarios + CLI)
โ”‚   โ””โ”€โ”€ vck-templates/      # Copilot configuration templates
โ””โ”€โ”€ docs/                   # Documentation

License

MIT