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_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.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kkanbu-0.1.7.tar.gz | 260.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kkanbu-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 332.3 kB
Release files / kkanbu-0.1.7.tar.gz
| Download URL | kkanbu-0.1.7.tar.gz |
|---|---|
| Size | 260.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1893550ad9c3e66a5d774da8259b9b4a052dce44a868c885de78ea7acaa0467
|
|
BLAKE2b-256 checksum How to use checksums |
29cf5a82a9dbcd6e9871bddd0e4fefbdd7b800d13a88f116d068a5c57571a499
|
| 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.1.7-py3-none-any.whl
| Download URL | kkanbu-0.1.7-py3-none-any.whl |
|---|---|
| Size | 71.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1bb6eaa13c0ac72c2d5d5d3604ce8757c27a62e118e59c4c60d68e584f5b5a9
|
|
BLAKE2b-256 checksum How to use checksums |
2d95f97bc889ae5eb44620acc3fcdcffbb6d5cdd172c05131b79b6f3423562de
|
| 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}
|