Skip to main content

kkanbu

A taste oracle that learns who you are — your preferences, values, and reasoning patterns — then speaks on your behalf.

kkanbu is an MCP server that builds a persistent knowledge graph of your identity. When an AI agent needs to know something about you, kkanbu answers grounded in what it actually knows — not guesses.

kkanbu was born as the user-proxy for Ouroboros, a specification-first AI development workflow: during Ouroboros's Socratic interviews, kkanbu answers on the user's behalf so autonomous runs never block on human availability — and when it isn't confident enough to speak for you, it flags the question for your later review instead of guessing. It works standalone with any MCP client, but that flag-and-continue loop is what it was designed around.

How It Works

AI Agent ←──MCP──→ kkanbu ←──→ Knowledge Graph (SQLite)

kkanbu stores knowledge as a graph of nodes (preferences, values, patterns, reasoning) connected by edges (supports, contradicts, derives_from). Each node tracks what you believe and why. When kkanbu isn't confident, it flags the question for later review rather than guessing.

Installation

Requires Python 3.11+ and an Anthropic API key.

With Claude Code (recommended)

claude mcp add --scope user kkanbu -- uvx kkanbu

This installs kkanbu from PyPI and registers it as an MCP server. The --scope user flag makes it available across all sessions.

From source

git clone https://github.com/Jaeha0526/kkanbu.git
cd kkanbu
pip install -e .

# Optional: JS-rendered webpage ingestion (SPAs, React sites)
pip install -e ".[js]"

# Register with Claude Code
claude mcp add --scope user kkanbu -- uv run --directory /path/to/kkanbu kkanbu

Manual MCP config

Add to your .mcp.json:

{
  "mcpServers": {
    "kkanbu": {
      "command": "uvx",
      "args": ["kkanbu"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

Usage

Create a profile and log in

kkanbu_of_who(action="create", username="myname")
kkanbu_of_who(action="login", username="myname")

Each user gets an isolated knowledge graph at ~/.kkanbu/profiles/<username>/knowledge.db.

Teach it about yourself

kkanbu_learn(
  insight="I value simplicity in design — clean, minimal interfaces over feature-packed ones",
  why="Visual noise stresses me out"
)

Or ingest existing material — codebases, documents, or webpages:

kkanbu_ingest(path="/path/to/my-project")
kkanbu_ingest(path="https://my-portfolio.com")

Let it ask you questions

kkanbu can proactively find gaps in what it knows and ask deep questions:

kkanbu_curious()
# → "When you feel most like yourself, what are you usually doing?"

kkanbu_curious(session_id="abc123", user_response="When I'm building something...")
# Drills deeper into the same thread

Answer on your behalf

kkanbu_answer(question="What kind of work environment do you thrive in?")
# → Voice-faithful answer grounded in the knowledge graph,
#   with confidence scores and automatic flagging when uncertain

Correct mistakes

kkanbu_correct(
  original="prefers quiet isolation",
  correction="prefers collaborative spaces",
  why="Does best thinking when bouncing ideas off people"
)

Reflect on the graph

kkanbu_reflect()
# → Finds contradictions, tensions, and blind spots
#   Stores findings as flags for review

Visualize

kkanbu_visualize()
# → Opens interactive D3.js graph at http://localhost:7742

Tools

Tool Description
kkanbu_of_who Manage user profiles — create, delete, list, login, logout
kkanbu_answer Answer questions on your behalf using the knowledge graph
kkanbu_learn Teach preferences, values, or patterns
kkanbu_ingest Extract insights from codebases, documents, or webpages
kkanbu_curious Ask deep questions to fill knowledge gaps
kkanbu_reflect Analyze the graph for contradictions and tensions
kkanbu_correct Fix wrong answers or stored preferences
kkanbu_distill Distill conversation history into persistent graph learnings
kkanbu_get_flags Show unresolved flagged items
kkanbu_resolve_flag Review and resolve flags through Socratic conversation
kkanbu_status Show knowledge graph statistics
kkanbu_model Show, set, or reset the LLM model used by all tools (persists across restarts)
kkanbu_visualize Launch interactive graph visualization in the browser

Configuration

Environment Variable Description Default
ANTHROPIC_API_KEY Required for LLM-powered tools
KKANBU_HOME Base directory for profiles and data ~/.kkanbu
KKANBU_MODEL Per-process model override — takes precedence over the kkanbu_model setting
KKANBU_EFFORT Reasoning depth for every LLM call on models that support it: low/medium/high/xhigh/max. Lower trades depth for cost. high
KKANBU_QA_LOG Append every kkanbu_answer Q&A pair (question, answer, confidences, flag) to <profile>/answers.jsonl. Set to 0/false/off to disable. 1 (on)

Development

pip install -e ".[dev]"
pytest
ruff check src/

License

MIT

Release files for kkanbu 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kkanbu 0.3.0
File Size Uploaded
kkanbu-0.3.0.tar.gz 266.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kkanbu 0.3.0
File Interpreter ABI Platform
kkanbu-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 340.5 kB

Release files / kkanbu-0.3.0.tar.gz

Download URL kkanbu-0.3.0.tar.gz
Size 266.7 kB
Tags Source
SHA-256 checksum
How to use checksums
03397c5884998963d676fd495b666094b5d9eb29bf51f066d2ef9cc1b0d2a685
BLAKE2b-256 checksum
How to use checksums
55675daef682acfb68ad4058784eee2719e261dd20fdf3c5faef9c367a94409e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / kkanbu-0.3.0-py3-none-any.whl

Download URL kkanbu-0.3.0-py3-none-any.whl
Size 73.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44391fe0c0f29866ee00592204a68bd4a2fb78687f445a3cf719de564ca578ce
BLAKE2b-256 checksum
How to use checksums
50a8a1c17d1a07577f7e63bceda203dbd6fda50346a822b1463275cf5eda6876
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page