Skip to main content

AI-oriented context DB middleware — Pluggable engine between Raw Data and Context serving

Project description

konkondb

AI-oriented context DB middleware — a pluggable engine between raw data and AI-ready context.

What it does

konkondb lets you store raw data (text, JSON, documents) and transform it into AI-optimized context through a user-defined plugin. You write a konkon.py with two functions — build() to transform raw data into your preferred format (vector DB, SQLite views, Markdown, etc.) and query() to retrieve context from it. The framework handles storage, orchestration, and serving.

Quick Start

# Install
pip install konkondb

# Create a new project
konkon init myproject
cd myproject

# Store some raw data
konkon insert "The quick brown fox jumps over the lazy dog"
konkon insert -m source=notes.md "Meeting notes from 2026-02-27"

# Transform data via your plugin
konkon build

# Query the transformed context
konkon search "fox"

Plugin

konkon init generates a konkon.py template:

"""konkon plugin."""

from konkon.types import RawDataAccessor, QueryRequest, QueryResult


def build(raw_data: RawDataAccessor) -> None:
    """Transform raw data into AI-ready context."""
    for record in raw_data:
        # record.id, record.content, record.meta, record.created_at
        pass


def query(request: QueryRequest) -> str | QueryResult:
    """Handle a query request."""
    # request.query — the search string
    # request.params — optional parameters dict
    return ""

build() receives a read-only accessor over all raw records. Use it to populate your own context store — a vector DB, a SQLite index, a set of Markdown files, or anything else.

query() receives a search request and returns results from your context store.

Architecture

konkondb is organized into three Bounded Contexts with strict dependency boundaries:

CLI (orchestrator)
 |
 +---> Ingestion Context    — Raw DB (SQLite, append-only)
 |
 +---> Transformation Context — Plugin Host (load + invoke konkon.py)
 |
 +---> Serving Context      — REST API / MCP server adapters
  • Ingestion owns the Raw DB (single source of truth). Plugins never access it directly — they receive a RawDataAccessor protocol instead.
  • Transformation loads the user plugin, validates the contract (build + query), and orchestrates execution.
  • Serving exposes query() results over REST or MCP. Fully stateless — no direct DB access.

Module boundaries are enforced at the import level by tach.

Development

# Install dependencies
uv sync

# Run all tests (unit tests + module boundary checks)
uv run pytest

# Run boundary checks only
uv run tach check

Requires Python >= 3.11.

Status

Alpha — under active development. API may change.

License

TBD

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

konkondb-0.1.0.tar.gz (77.8 kB view details)

Uploaded Source

Built Distribution

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

konkondb-0.1.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file konkondb-0.1.0.tar.gz.

File metadata

  • Download URL: konkondb-0.1.0.tar.gz
  • Upload date:
  • Size: 77.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for konkondb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5ebab615a66dbd8dba19a44041e2225583d0e4ead38af0929a1dd6a29b844d64
MD5 2de6ed54e87df38314192df9f5a66950
BLAKE2b-256 25eb761bb7e53d26dde464b271347dcbd05b688a4ae1b67b1e3a91505d1d0ef7

See more details on using hashes here.

Provenance

The following attestation bundles were made for konkondb-0.1.0.tar.gz:

Publisher: release.yml on mkXultra/konkondb

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

File details

Details for the file konkondb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: konkondb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for konkondb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57e9d85eeb3d004bf2bb4b113c07305cdccc569c56aa0a550e0e36b6685ff0c6
MD5 530ba7f3c1c16e913d92eed8a7181f30
BLAKE2b-256 7747ad68563ee1726798a867d487b85bb25603089ccc0ec50fdc904f91445b19

See more details on using hashes here.

Provenance

The following attestation bundles were made for konkondb-0.1.0-py3-none-any.whl:

Publisher: release.yml on mkXultra/konkondb

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