andnp-searchkernel
andnp-searchkernel is a source-agnostic Python library for building hybrid
keyword, vector, and graph search systems. Applications map their native data
to canonical Record values, choose the storage and provider adapters they
need, and keep source-specific lifecycle logic outside the kernel.
It supports canonical record search, checkpointed record ingestion, optional local/Postgres/FAISS/provider integrations, and bounded federation across compatible search sources. Breaking changes are documented per release in docs/upgrading.md.
Install
The core package supports Python 3.13 and newer:
pip install andnp-searchkernel
Install optional integrations only when you need them:
pip install "andnp-searchkernel[faiss]"
pip install "andnp-searchkernel[pgvector]"
pip install "andnp-searchkernel[pgvector-psycopg3]"
pip install "andnp-searchkernel[huggingface]"
pip install "andnp-searchkernel[ollama]"
pip install "andnp-searchkernel[markdown]"
First local search
The local composition helper creates durable SQLite-backed stores. This small example uses a deterministic provider so it can run without downloading a model; replace it with a real provider for semantic retrieval.
import asyncio
from datetime import UTC, datetime
from pathlib import Path
from searchkernel import Record, build_local_record_kernel
class DemoEmbeddingProvider:
model_name = "demo"
dim = 2
def embed(self, texts: list[str]) -> list[list[float]]:
return [[1.0, 0.0] for _ in texts]
async def main() -> None:
timestamp = datetime.now(UTC)
composition = build_local_record_kernel(
Path("records.db"),
embedding_provider=DemoEmbeddingProvider(),
)
record = Record(
workspace_id="demo",
source_kind="notes",
source_id="welcome",
title="Welcome",
body="Canonical records can be searched locally.",
created_at=timestamp,
updated_at=timestamp,
)
composition.keyword_store.index([record])
outcome = await composition.kernel.search("canonical records", limit=5)
for result in outcome.results:
print(result.record.title, result.score)
asyncio.run(main())
The result is a RecordSearchOutcome. Each result retains the complete
workspace/source identity and search provenance; degraded execution is
reported through outcome.failures and outcome.diagnostics.
Documentation
Start with the documentation map to choose the right guide:
- Getting started — install the package and build a first local index.
- Core concepts — records, identity, ingestion, querying, stores, providers, and readiness.
- Custom content sources — adapt native records to checkpointed ingestion.
- Federated search — combine local or HTTP search sources with bounded concurrency and explicit partial-result diagnostics.
- Performance and retrieval roadmap — developer-facing validation evidence, constraints, and future work.
Optional integrations
The core import surface does not require optional providers or backends. The
available extras are faiss, pgvector, pgvector-psycopg3, huggingface,
ollama, and markdown. See the getting-started guide
for the selection rule and the federation guide
for the HTTP source adapter.
Validation and releases
CI runs Ruff, Pyrefly, import-linter, the safe test suite, supported Python
versions, and selected optional-import checks. Pgvector integration tests
provision a Docker pgvector/pgvector:pg17 container; real-embedding tests are
outside the default offline gate. The performance roadmap records what those
checks do and do not prove.
Merges to main with release-worthy Conventional Commits are released by
the repository workflows. The package and runtime __version__ are checked
against each other in CI and before semantic release.
License
MIT. See LICENSE.
Metadata
Release files for andnp-searchkernel 1.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| andnp_searchkernel-1.17.0.tar.gz | 696.8 kB | With provenance | Details for andnp_searchkernel-1.17.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| andnp_searchkernel-1.17.0-py3-none-any.whl | Python 3 | none | any | Details for andnp_searchkernel-1.17.0-py3-none-any.whl |
Total release size: 1.0 MB
Release files / andnp_searchkernel-1.17.0.tar.gz
| Download URL | andnp_searchkernel-1.17.0.tar.gz |
|---|---|
| Size | 696.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ef9d065bfb47ab6e2acba725b9400d6c46fdc0e9ef53b31310ead3e7c8702f6
|
|
BLAKE2b-256 checksum How to use checksums |
d67c206936d9a5ba8c2c5e0e1e68076345b0e3b006a23264775596c0bb86785e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logRelease files / andnp_searchkernel-1.17.0-py3-none-any.whl
| Download URL | andnp_searchkernel-1.17.0-py3-none-any.whl |
|---|---|
| Size | 315.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
073e3fe28ee096ce920865c4ca5f5f2c45d996967580262488af22aeea97923b
|
|
BLAKE2b-256 checksum How to use checksums |
7317bd634f0e22205ba6e9e801da08949968f2542c4e13fc7c5cedf3972eaff3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logSecurity for andnp-searchkernel 1.17.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for andnp_searchkernel-1.17.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.
Transparency logA 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.