KYA (Know Your Agents) — Open-source trust, governance, and evidentiary assurance infrastructure for autonomous systems. Built on KYP (Know Your Principal), a unified trust model for human users, AI agents, service accounts, and machine identities.
Project description
veldt-kya
Verifiable records for AI agent actions.
When an AI agent takes an action, KYA records it in a cryptographically verifiable chain. If anyone modifies the record later, KYA detects it and pinpoints exactly where the chain was broken.
Think of it as Git for agent actions: every action is committed, hash-chained, and independently verifiable by anyone with the key.
Agent acts
↓
KYA records
↓
Record verified
↓
Record tampered
↓
KYA detects exactly where it changed
pip install veldt-kya
The 30-second demo
Step 1. An AI agent issues a $50 refund.
import json
from kya import (
default_session, record_invocation, record_evidence, verify_chain,
)
from sqlalchemy import text
with default_session() as db:
inv = record_invocation(
db, tenant_id="acme", agent_key="support_bot",
principal_kind="agent", principal_id="support_bot",
)
record_evidence(
db, tenant_id="acme", invocation_id=inv,
evidence_kind="tool_call",
payload={"tool": "refund", "customer": "alice", "amount_usd": 50},
)
db.commit()
Step 2. Verify the audit chain — clean.
print(verify_chain(db, tenant_id="acme", invocation_id=inv))
# → {'valid': True, 'broken_at': None, 'checked': 1, 'reason': None}
Step 3. Someone tampers — changes the refund from $50 to $5000 directly in the database.
tampered = json.dumps({"tool": "refund", "customer": "alice", "amount_usd": 5000})
db.execute(
text("UPDATE kya_evidence SET payload = :p WHERE invocation_id = :i"),
{"i": inv, "p": tampered},
)
db.commit()
Step 4. Verify again — KYA pinpoints the modified row.
print(verify_chain(db, tenant_id="acme", invocation_id=inv))
# → {'valid': False, 'broken_at': 1, 'checked': 1,
# 'reason': 'payload_hash mismatch — payload was modified'}
All four steps run inside the same with default_session() as db: block from Step 1.
That's the whole pitch. The rest of this README is what to do next.
What you get out of the box
- Cryptographically chained evidence — every action HMAC-linked to the previous one
- Independent verification — any party with the key can re-verify the whole chain
- Pinpoint tamper detection — exact row identified when the chain breaks
- Portable storage — SQLite, PostgreSQL, MySQL, or DuckDB; same code, any database
- Persistent by default — survives process restart, container restart, host failure
- Framework-agnostic — works with LangChain, CrewAI, LangGraph, OpenAI Agents, Claude SDK, and MCP
Setup
pip install veldt-kya is enough to run the demo above. KYA falls back to
sqlite:///~/.kya/kya.db when nothing is configured.
For production, point KYA at your real database and signing key:
export KYA_DB_URL=postgresql://user:pass@host/db
export KYA_EVIDENCE_KEY_PROVIDER=aws-kms://arn:aws:kms:...
Vault, sealed secrets, and HSM-backed keys are supported via the same env var.
Beyond the demo
The 30-second demo shows evidence — the core primitive. The open-source package also includes:
- Agent identity anchored on W3C DIDs
- Delegation chains with attribution that carries upstream
- Runtime policy enforcement at the gateway
- Per-agent revocation via W3C StatusList 2021
Each one has the same shape as the demo above: a small, composable API you can adopt one piece at a time.
What KYA isn't
KYA isn't an observability tool. Datadog, OpenTelemetry, and your traces explain what happened operationally — latency, cost, exceptions, execution paths.
KYA explains something different: was the action authorized, who was it attributable to, and can the record be trusted weeks or months later?
Links
- Full documentation — every primitive, with examples
- arXiv paper — formal model of the seven systems primitives behind KYA
- veldt-kya-pro — commercial overlay with signed verdicts, regulator pack, and controls mapped to major healthcare, government, and AI governance frameworks
License
Apache License 2.0 — © 2026 Veldt Labs Inc. See LICENSE.
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 veldt_kya-0.4.4.tar.gz.
File metadata
- Download URL: veldt_kya-0.4.4.tar.gz
- Upload date:
- Size: 952.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 |
af62f32a0525dd47a7ecb73596358a3f2ff3df56388929d96addc8e76776ce72
|
|
| MD5 |
8a058295b1505edc592f7c311f9dca00
|
|
| BLAKE2b-256 |
7c0415e0ec21386eb5783cdd109688630856a7dd38680e77ac660cfbd303bcf4
|
Provenance
The following attestation bundles were made for veldt_kya-0.4.4.tar.gz:
Publisher:
publish.yml on veldtlabs/veldt-kya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
veldt_kya-0.4.4.tar.gz -
Subject digest:
af62f32a0525dd47a7ecb73596358a3f2ff3df56388929d96addc8e76776ce72 - Sigstore transparency entry: 2176574259
- Sigstore integration time:
-
Permalink:
veldtlabs/veldt-kya@9324ff99e04b626aec5013bd1d891c1b4436c747 -
Branch / Tag:
refs/tags/v0.4.4 - Owner: https://github.com/veldtlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9324ff99e04b626aec5013bd1d891c1b4436c747 -
Trigger Event:
push
-
Statement type:
File details
Details for the file veldt_kya-0.4.4-py3-none-any.whl.
File metadata
- Download URL: veldt_kya-0.4.4-py3-none-any.whl
- Upload date:
- Size: 711.1 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 |
a674449c0f9bbd4cfa78d302b7861b48ff3fe5ed07cadc0995ecd28c1af4d54b
|
|
| MD5 |
590768ac785ed34ad22a2c1bbd29290d
|
|
| BLAKE2b-256 |
dfa7541be1f6b6d5bd0d565096d57d5fc94f0f72907e3d7a440de5452a5876ad
|
Provenance
The following attestation bundles were made for veldt_kya-0.4.4-py3-none-any.whl:
Publisher:
publish.yml on veldtlabs/veldt-kya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
veldt_kya-0.4.4-py3-none-any.whl -
Subject digest:
a674449c0f9bbd4cfa78d302b7861b48ff3fe5ed07cadc0995ecd28c1af4d54b - Sigstore transparency entry: 2176574412
- Sigstore integration time:
-
Permalink:
veldtlabs/veldt-kya@9324ff99e04b626aec5013bd1d891c1b4436c747 -
Branch / Tag:
refs/tags/v0.4.4 - Owner: https://github.com/veldtlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9324ff99e04b626aec5013bd1d891c1b4436c747 -
Trigger Event:
push
-
Statement type: