Evidence Engine plugin for the Kairos SDK — contract-validated evidence evaluation
Project description
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 aurland 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_ofis 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 structuredRetrieverNotConfigurederror and directs the caller toevaluate_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_policyand other pipeline configuration arecreate_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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kairos_ai_evidence-0.2.0.tar.gz.
File metadata
- Download URL: kairos_ai_evidence-0.2.0.tar.gz
- Upload date:
- Size: 70.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32edf0a91794d82b9587393d51f384b9fd1c1fe1ee64349e94e8c227bc11a346
|
|
| MD5 |
d5aa1c6fc0c15ba031f80685da02a674
|
|
| BLAKE2b-256 |
39c79c961a86434d193d7d601bbdce2a03d92edc156c2ac5a6ae57bd7d20197b
|
Provenance
The following attestation bundles were made for kairos_ai_evidence-0.2.0.tar.gz:
Publisher:
publish-plugin-evidence.yml on govanxa/kairos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kairos_ai_evidence-0.2.0.tar.gz -
Subject digest:
32edf0a91794d82b9587393d51f384b9fd1c1fe1ee64349e94e8c227bc11a346 - Sigstore transparency entry: 2056240613
- Sigstore integration time:
-
Permalink:
govanxa/kairos@3934f02758d2f9c186e656eef0ccbec906cb27cc -
Branch / Tag:
refs/tags/evidence-v0.2.0 - Owner: https://github.com/govanxa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-plugin-evidence.yml@3934f02758d2f9c186e656eef0ccbec906cb27cc -
Trigger Event:
push
-
Statement type:
File details
Details for the file kairos_ai_evidence-0.2.0-py3-none-any.whl.
File metadata
- Download URL: kairos_ai_evidence-0.2.0-py3-none-any.whl
- Upload date:
- Size: 63.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a43e0707a83d5c89a78eee62504d12127d066f3ea060a1e4679f06033f8edd26
|
|
| MD5 |
dda6f1e9be9c6e6c19e851f8c52f7fdd
|
|
| BLAKE2b-256 |
44a6d1ca96b72efad6ee2805b728c6714f0230e6dc9701c15ed7e76ea82270eb
|
Provenance
The following attestation bundles were made for kairos_ai_evidence-0.2.0-py3-none-any.whl:
Publisher:
publish-plugin-evidence.yml on govanxa/kairos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kairos_ai_evidence-0.2.0-py3-none-any.whl -
Subject digest:
a43e0707a83d5c89a78eee62504d12127d066f3ea060a1e4679f06033f8edd26 - Sigstore transparency entry: 2056241157
- Sigstore integration time:
-
Permalink:
govanxa/kairos@3934f02758d2f9c186e656eef0ccbec906cb27cc -
Branch / Tag:
refs/tags/evidence-v0.2.0 - Owner: https://github.com/govanxa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-plugin-evidence.yml@3934f02758d2f9c186e656eef0ccbec906cb27cc -
Trigger Event:
push
-
Statement type: