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.dev4

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.dev4
File Size Uploaded Provenance Actions
swarmauri_tool_queryknowledgebase-0.11.0.dev4.tar.gz 7.1 kB Without provenance Details for swarmauri_tool_queryknowledgebase-0.11.0.dev4.tar.gz

Built distribution (wheel)

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

Total release size: 15.6 kB

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

Download URL swarmauri_tool_queryknowledgebase-0.11.0.dev4.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7766692de71ee64f8309fe63e05cb6d09bbf4ebb3d82e1e36f400d46403631f3
BLAKE2b-256 checksum
How to use checksums
8978547b5632dda27f47a17478fee8119314b0fb9b63f63b35d20e9a70ac9935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.dev4-py3-none-any.whl

Download URL swarmauri_tool_queryknowledgebase-0.11.0.dev4-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
324caeebbb1a0c35af91743d088c692d5c572e41ba6e3310a330ced6559e1b60
BLAKE2b-256 checksum
How to use checksums
38c0f651c7586e69607de38ab0d346cf3070329c5fee0efa865d469386724d09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.dev4

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.

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