Skip to main content
Pre-release

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

Swarmauri Logo

Downloads Hits Python License Release

Swarmauri Query Knowledge Base Tool

swarmauri_tool_queryknowledgebase exposes ranked knowledge-base retrieval as a Swarmauri tool while preserving document content, metadata, identifiers, and scores.

Features

  • Uses the repository-standard retrieve(query, top_k) workflow.
  • Returns structured, ranked results instead of flattening documents into text.
  • Supports exact-match metadata filtering and bounded result counts.
  • Keeps runtime knowledge-base adapters out of serialized tool state.
  • Wraps provider failures without leaking connection details.

Installation

uv add swarmauri_tool_queryknowledgebase
pip install swarmauri_tool_queryknowledgebase

Usage

from swarmauri_tool_queryknowledgebase import QueryKnowledgeBaseTool

tool = QueryKnowledgeBaseTool(knowledge_base=my_document_store)
results = tool(
    "How are API keys rotated?",
    top_k=3,
    metadata_filter={"product": "sdk"},
)

for result in results:
    print(result["rank"], result["content"], result["metadata"])

The configured knowledge base must implement retrieve(query, top_k=5) and return documents or dictionaries in relevance order.

License

Apache-2.0.

Metadata

Release files for swarmauri_tool_queryknowledgebase 0.11.0.dev3

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

Source distribution (sdist)

Source distribution for swarmauri_tool_queryknowledgebase 0.11.0.dev3
File Size Uploaded Provenance Actions
swarmauri_tool_queryknowledgebase-0.11.0.dev3.tar.gz 7.0 kB Without provenance Details for swarmauri_tool_queryknowledgebase-0.11.0.dev3.tar.gz

Built distribution (wheel)

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

Total release size: 15.6 kB

Release files / swarmauri_tool_queryknowledgebase-0.11.0.dev3.tar.gz

Download URL swarmauri_tool_queryknowledgebase-0.11.0.dev3.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
403ff273faeac8d073d400ef4f1b46ca26e240d25d05171c32f5068a33624427
BLAKE2b-256 checksum
How to use checksums
fdc7f0a7282f99ef5eb481f47493dc50eb1c3c28d4e050921ee51ee9c68096bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_tool_queryknowledgebase-0.11.0.dev3-py3-none-any.whl

Download URL swarmauri_tool_queryknowledgebase-0.11.0.dev3-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c02a2ce894df196b5433e1cac8669d044d1b25691ca590d1757810e012d4ff2
BLAKE2b-256 checksum
How to use checksums
3fe7c23f785b3a5550b8bef6d5ee9f7645ea319f5305ab290661791dde6d499d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for swarmauri_tool_queryknowledgebase 0.11.0.dev3

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.

Release history Release notifications | RSS feed

This release
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