Skip to main content

A self-hosted multi-tenant memory engine that turns a Zettelkasten into scoped agent-queryable memory over MCP

Project description

CI Publish PyPI Python Docs Coverage

🇧🇷 🇲🇽 🇯🇵 🇨🇳

A self-hosted multi-tenant memory engine that turns a Zettelkasten into scoped agent-queryable memory over MCP

What this is

aizk is a memory an AI assistant can actually keep. Text goes in, an entity and fact knowledge graph comes out, addressed by meaning so the same knowledge extracted twice never duplicates. Everything lives in one self-hosted Postgres, and row level security enforces who can see what at the database layer, private notes, shared projects, and overlapping groups never cross. It speaks MCP, so Claude or any other MCP-capable assistant calls it directly. Full explanation at phvv.me/aizk.

Quickstart

One command brings up the whole engine, Postgres, the embed, rerank, and extraction containers, and one aizk container that is the MCP server, the background worker, and the scheduled auto-backup at once. It migrates and comes up ready over HTTP with nothing else to run.

docker compose up -d

Then call its tools from any MCP client.

from fastmcp import Client

async with Client("http://localhost:8080/mcp") as client:
    await client.call_tool("remember", {"text": "aizk runs entirely on local hardware."})
    result = await client.call_tool("recall", {"query": "where does aizk run?"})
    print(result.data)

Every docker-compose knob and every Settings default live in one file, .env.example, copy it to .env and edit, both compose and the app read the same AIZK_-prefixed variables. Running the server, worker, or backup outside the container is a plain pip install aizk and the matching aizk command. See Operations for deployment and backups.

The flows

flowchart LR
    A[agent] -->|remember, ingest| W[write path<br/>chunk, extract, consolidate]
    A -->|recall, get_context| Re[read path<br/>fused retrieval]
    W --> P[(Postgres<br/>knowledge graph + row level security)]
    Re --> P
    P --> Re --> A

Writing turns text into a typed entity and fact graph, one content row shared by meaning plus one scoped, bi-temporal claim per owner. Reading fuses five retrieval lanes behind one Postgres round trip, filtered to exactly what the caller's own scopes make visible before a row is ever considered. The full breakdown of both, with a diagram for each stage, lives in Engine.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aizk-0.0.1.tar.gz (535.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aizk-0.0.1-py3-none-any.whl (258.2 kB view details)

Uploaded Python 3

File details

Details for the file aizk-0.0.1.tar.gz.

File metadata

  • Download URL: aizk-0.0.1.tar.gz
  • Upload date:
  • Size: 535.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aizk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b7449ede45c18efce85455ea77e615b5fda3d1443036064973445628169703ae
MD5 4996120d0d8ac3f671f49e133e52769d
BLAKE2b-256 7784631371d0ec226f1c9c60f311ef5cba2576082561519248bf94bd5b97474b

See more details on using hashes here.

Provenance

The following attestation bundles were made for aizk-0.0.1.tar.gz:

Publisher: publish.yml on phvv-me/aizk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aizk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: aizk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 258.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aizk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da06ac2f56a5a46ad51ba577678c952f309c2e13b86237f631f3b1eda7b88a21
MD5 84ee984457ecd5cad614547245fcc9a6
BLAKE2b-256 26da6c4d935c2a2b4d2c3dca67701a2396ebb9f3efcb3c98f4c4f5458a932017

See more details on using hashes here.

Provenance

The following attestation bundles were made for aizk-0.0.1-py3-none-any.whl:

Publisher: publish.yml on phvv-me/aizk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page