Skip to main content

kairos-ai-evidence

Evidence Engine plugin for the Kairos SDK. Provides contract-validated evidence evaluation with deterministic verdict and confidence derivation — no model-emitted scores.

Installation

pip install kairos-ai-evidence

This pulls in the core SDK automatically — the plugin declares kairos-ai>=0.5,<0.6 as a dependency.

Quick start

from kairos_ai_evidence import (
    EVIDENCE_PACKET,
    make_packet,
    make_source_record,
    make_claim_record,
    derive_support_level,
    derive_verdict,
    derive_overall_verdict,
    derive_confidence,
)

MCP server

Run the Evidence Engine as an MCP server so a calling model must pass retrieved content through the trust boundary before it can answer. Install the optional mcp extra:

pip install "kairos-ai-evidence[mcp]"
# or, for an ephemeral run:
uvx --from "kairos-ai-evidence[mcp]" kairos-evidence-mcp
pipx install "kairos-ai-evidence[mcp]"

Then run the console script (stdio transport, matching the standard local MCP pattern):

kairos-evidence-mcp

The server exposes two tools:

  • evaluate_evidence(documents, claims, query, as_of=None) — retrieval-agnostic. Works on a bare install with no retriever configured. You supply the documents (any shape with a url and body text); they are sanitized by the content gate before any claim is evaluated.
  • verified_answer(query, claims=None, max_results=None) — the stronger firewall. Retrieval happens server-side, behind the gate, so the calling model cannot substitute its own (possibly stale or hostile) documents for evidence — it must consume the gated response. as_of is machine-stamped on every call; it is never accepted from the wire. Requires a retriever to be configured (see below) — without one, this tool returns a structured RetrieverNotConfigured error and directs the caller to evaluate_evidence.

Neither tool runs an LLM inside the server. Both return the same deterministic JSON evidence bundle (working_context, citations, overall_verdict, confidence, per-claim verdicts, source counts, etc.) — the calling model composes the natural-language answer from it.

Configuring a retriever

verified_answer needs a retriever: a plain Python callable (query: str, *, max_results: int) -> RetrieverResult. Configuration is programmatic only — there is no environment-variable or import-by-string retriever resolution, which would be a code-execution vector. Write a small launcher script that imports your own search function and passes it in:

# my_launcher.py
from kairos_ai_evidence.mcp.server import create_server

from my_project.search import web_search  # your own retrieval function

if __name__ == "__main__":
    create_server(retriever=web_search).run()
python my_launcher.py

See examples/mcp_server_launcher.py for a runnable version with an offline stub retriever (no network calls) — swap the stub for your own retriever following the pattern shown there.

Security notes

  • stdio transport only — no HTTP/SSE, no listening socket.
  • Logs go to stderr only, structural metadata only (counts, verdict, confidence, timing) — never query text or document content.
  • Every error crossing the wire is either a fixed structural message or has passed through sanitize_exception — no raw content, credentials, stack traces, or file paths ever reach the caller.
  • trust_policy and other pipeline configuration are create_server(...) keyword arguments only — never tool arguments on the wire.
  • The MCP response is built only from gated/derived pipeline output; raw retriever or document text never reaches the response un-gated.

Packet version compatibility

kairos-ai-evidence packet_version kairos-ai
0.2.x 1.0 >=0.5,<0.6

License

Apache 2.0 — Copyright 2026 Vanxa

Metadata

Release files for kairos-ai-evidence 0.2.0

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

Source distribution (sdist)

Source distribution for kairos-ai-evidence 0.2.0
File Size Uploaded Provenance Actions
kairos_ai_evidence-0.2.0.tar.gz 70.8 kB With provenance Details for kairos_ai_evidence-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kairos-ai-evidence 0.2.0
File Interpreter ABI Platform Actions
kairos_ai_evidence-0.2.0-py3-none-any.whl Python 3 none any Details for kairos_ai_evidence-0.2.0-py3-none-any.whl

Total release size: 134.0 kB

Release files / kairos_ai_evidence-0.2.0.tar.gz

Download URL kairos_ai_evidence-0.2.0.tar.gz
Size 70.8 kB
Tags Source
SHA-256 checksum
How to use checksums
32edf0a91794d82b9587393d51f384b9fd1c1fe1ee64349e94e8c227bc11a346
BLAKE2b-256 checksum
How to use checksums
39c79c961a86434d193d7d601bbdce2a03d92edc156c2ac5a6ae57bd7d20197b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 3, 2026.

Transparency log

Release files / kairos_ai_evidence-0.2.0-py3-none-any.whl

Download URL kairos_ai_evidence-0.2.0-py3-none-any.whl
Size 63.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a43e0707a83d5c89a78eee62504d12127d066f3ea060a1e4679f06033f8edd26
BLAKE2b-256 checksum
How to use checksums
44a6d1ca96b72efad6ee2805b728c6714f0230e6dc9701c15ed7e76ea82270eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 3, 2026.

Transparency log

Security for kairos-ai-evidence 0.2.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kairos_ai_evidence-0.2.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 Jul 3, 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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