Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

harborrag-core

The provider-neutral foundation of HarborRAG: domain models, protocol contracts, storage schemas, and security helpers. It has no provider SDK dependencies, so importing it pulls in nothing heavy and performs no I/O.

Every other HarborRAG package depends on this one. You rarely install it alone - install harborrag instead - but you import from it whenever you write an adapter or type a function signature against HarborRAG data.

pip install harborrag-core

What it exports

from harborrag_core import Document, HarborError, RetrievalQuery, RetrievalResult
Group Names
Documents Document, DocumentElement, DocumentProvenance, DocumentRelation, RawDocument, SourceRecord
Retrieval RetrievalQuery, RetrievalResult
Errors HarborError - the base of every HarborRAG exception
Security URLPolicy, URLPolicyError, redact_secrets, redact_mapping

Deeper contracts stay in submodules rather than the package root:

Submodule Contains
harborrag_core.ports.* protocols adapters implement - ports.model_clients, ports.memory, ports.conversation, and the repository ports
harborrag_core.domain.* domain models shared by more than one package
harborrag_core.contracts.errors the full exception family re-exported as HarborError and its subclasses
harborrag_core.base StrictModel and ExtensibleModel, the validated-model base classes

Contributing to this package

  • Add only stable, dependency-light contracts here.
  • Keep provider SDKs out of this package.
  • Add protocols in harborrag_core.ports.* when adapters need a shared model contract; model-client protocols live in harborrag_core.ports.model_clients.
  • Add domain models in harborrag_core.domain.* only when multiple packages need them.
  • Reuse StrictModel or ExtensibleModel from harborrag_core.base for validated models.
  • Add package-wide exceptions to harborrag_core.contracts.errors; keep subsystem error families near their subsystem.

Hard rule: harborrag-core must never import harborrag-adapters, harborrag-engine, harborrag-runtime, harborrag-app, harborrag-mcp-server, or the harborrag meta-package. scripts/check_dependency_direction.py enforces this in CI.

Development

Tests for this package live in packages/harborrag-core/tests/. Run them from the repository root:

uv run pytest packages/harborrag-core/tests

See Extending HarborRAG for how contracts here relate to adapter implementations.

Licensed under the Apache License 2.0.

Metadata

Release files for harborrag-core 2.0.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for harborrag-core 2.0.0a2
File Size Uploaded Provenance Actions
harborrag_core-2.0.0a2.tar.gz 172.8 kB With provenance Details for harborrag_core-2.0.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for harborrag-core 2.0.0a2
File Interpreter ABI Platform Actions
harborrag_core-2.0.0a2-py3-none-any.whl Python 3 none any Details for harborrag_core-2.0.0a2-py3-none-any.whl

Total release size: 364.1 kB

Release files / harborrag_core-2.0.0a2.tar.gz

Download URL harborrag_core-2.0.0a2.tar.gz
Size 172.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7b1ccfc7b9408bc7f2f8eb748cd1d33aa2af897b8af998f91838e5fe87f25025
BLAKE2b-256 checksum
How to use checksums
9ae54246b8520b3aa26ef179c4466890cb8840ff03cf974bec25b821ff292556
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 Oct 27, 2026.

Transparency log

Release files / harborrag_core-2.0.0a2-py3-none-any.whl

Download URL harborrag_core-2.0.0a2-py3-none-any.whl
Size 191.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37f218774d2c0716cfd9414dfede350272badb442fef4837e40a6196dcca040c
BLAKE2b-256 checksum
How to use checksums
4955028ceb0bc2f061bee6e208556a176f5ae94c083e3d330ebf1a733b8458ef
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 Oct 27, 2026.

Transparency log

Security for harborrag-core 2.0.0a2

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.

Select from 2 files

Attestation for harborrag_core-2.0.0a2.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 Oct 27, 2026.

Transparency log

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