Skip to main content
kennis

kennis

A local knowledge and memory system for people and AI agents.

You put papers, documentation sites and your own notes into one corpus on your machine, and kennis searches it by the words you type and by what you mean, then shows you the passage it found. The same corpus is open to you at the terminal, in a window in your browser, and to an AI agent over MCP.

The kennis window: a search for 'why do we combine rankings instead of scores', with two tagged notes as the best matches, each showing a keyword and a meaning measure

Documentation: https://kwazzi-jack.github.io/kennis/

Status

kennis is experimental. It is pre-release software written by one person for their own research. Its commands, settings and on-disk format change between releases without notice or migration, so a corpus built now is one you should be prepared to rebuild. Expect bugs.

Linux is the platform kennis is developed and used on. macOS runs the test suite in CI. Windows is not yet working properly: CI runs the tests there, but kennis is not used on Windows, and Windows users should expect far more bugs than on Linux. Running kennis under WSL has not been tried.

Install

You need Python 3.12 to 3.14, uv and git.

uv tool install kennis                # the command line, the window and PDF conversion
uv tool install "kennis[mcp]"         # and the MCP server for agents

PDF conversion is the large part of the install: MinerU brings PyTorch, and on Linux the CUDA libraries, several gigabytes. The install guide says how to take PyTorch's CPU build instead, which is a few hundred megabytes.

A first corpus

Create the corpus, which is a folder of markdown files and a git repository at ~/.local/share/kennis:

kennis config init --defaults
kennis corpus init

Put something in. remember writes a note; corpus add brings in a file (-n notes), a paper by arXiv identifier or DOI (-l literature) or a documentation site (-d docs):

kennis remember "Reciprocal rank fusion scores a chunk by 1/(60+rank) summed over the legs that ranked it, so agreement between two methods that fail differently is what wins." --title "Why fusion uses ranks"
kennis corpus add -n reading-list.md --title "Reading list"
kennis corpus add -l arxiv:1101.1764
kennis corpus add -d https://docs.astropy.org/en/stable/ --max-pages 20

Index it, then search. The first index downloads a 65 MB embedding model, once:

kennis corpus index
kennis search "why do we combine rankings instead of scores"
Found 3 in notes

Notes keywords as a fraction of the best match here, meaning as an absolute cosine
  [1] Why fusion uses ranks
      keywords: very high  meaning: high  id=t1pukd6jxw chunk=0
      kennis://open/t1pukd6jxw/0
      # Why fusion uses ranks Reciprocal rank fusion scores a chunk by
      1/(60+rank) summed over the legs that ranked it, so agreement
      between two methods that fail differently is what wins.
  [2] Reading list - Combining the two
      keywords: high  meaning: high  id=b4m9up9nyj chunk=3
      kennis://open/b4m9up9nyj/3
      ## Combining the two Hybrid search runs both and fuses the rankings,
      so a passage both methods place highly rises to the top.
  ...

Each hit gives two measures. keywords is BM25, the words you typed, as a fraction of the best match in that collection; meaning is the cosine similarity of the embeddings, on a scale measured for this model, so it means the same thing for every query. The line above the group names both scales. id and chunk are what kennis read takes, and the kennis:// link opens the passage in the window.

kennis read t1pukd6jxw                # the whole document, as markdown
kennis read b4m9up9nyj --chunks 3     # just the passage that matched
kennis tag retrieval kennis://open/t1pukd6jxw/0
kennis search "how are results combined" --tag retrieval

The tutorial runs these steps with their full output.

The window

kennis gui

opens kennis in your own browser: the same search, each passage drawn in place, the corpus as a tree, tags, and adding and indexing with their progress shown. It is served on 127.0.0.1 by kennis's own service, and every request carries a token minted when the service starts. The picture at the top of this page is the window. See The graphical interface.

An agent

With the mcp extra installed, an agent that speaks MCP starts kennis serve itself. For Claude Code, in ~/.claude.json:

{
  "mcpServers": {
    "kennis": { "command": "kennis", "args": ["serve"] }
  }
}

The agent can then search and read the corpus, cite a passage with a link that opens it in your window, and write a note with remember - the one tool that changes anything. See Serve an agent.

Learn more

Your data

kennis keeps everything on your machine, has no telemetry, and sends a document to a third party only when you set a hosted backend and supply its key. Adding a paper or a site fetches from the host you name, and an agent connected through kennis serve passes what it reads to whatever its model runs on. The full list, with every host, is Your data: where it is kept and where it goes.

Contributing

See CONTRIBUTING.md. To run kennis from a checkout:

git clone https://github.com/kwazzi-jack/kennis.git
cd kennis
uv sync --extra mcp
uv run kennis --help

Licence

GPL-3.0-or-later. See LICENSE.

Metadata

Release files for kennis 0.14.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 kennis 0.14.0
File Size Uploaded Provenance Actions
kennis-0.14.0.tar.gz 1.4 MB Without provenance Details for kennis-0.14.0.tar.gz

Built distribution (wheel)

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

Total release size: 3.0 MB

Release files / kennis-0.14.0.tar.gz

Download URL kennis-0.14.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
a1c51dfeb9a2701b3737664502209750b7987b4b03ca7f31b9eabb548306c34b
BLAKE2b-256 checksum
How to use checksums
ac0ae957d715310745824837f64c8d99de01ff8c1d5e3a2f5497821086000411
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / kennis-0.14.0-py3-none-any.whl

Download URL kennis-0.14.0-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
402f6a3d3806e1b9bad0cdd6af0341df53d35054a9ecdbb7c8a58c5f32abfe19
BLAKE2b-256 checksum
How to use checksums
a3aaad578a331b5b6e6e27fb1dd3a73db9f530d654126048441da9f3c7acd441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for kennis 0.14.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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