Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

veldt_kya-0.5.2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veldt_kya-0.5.2-py3-none-any.whl (755.4 kB view details)

Uploaded Python 3

File details

Details for the file veldt_kya-0.5.2.tar.gz.

File metadata

  • Download URL: veldt_kya-0.5.2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for veldt_kya-0.5.2.tar.gz
Algorithm Hash digest
SHA256 7f12ee78d6f9b98a0e4bebbcd08017d0a026d8c4502cb5ce2d23b7c8ef3eaccf
MD5 f72af05dc41bad7a7c8d6ebfcfc5785f
BLAKE2b-256 d6e559b331b264172c7a7a53ad8ea92b352872e763ce398fac172708e661c548

See more details on using hashes here.

Provenance

The following attestation bundles were made for veldt_kya-0.5.2.tar.gz:

Publisher: publish.yml on veldtlabs/veldt-kya

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file veldt_kya-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: veldt_kya-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 755.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for veldt_kya-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f397f9bb88a1b62625cae1376f1745df1cd8c51ffb446e360879d7bbfc0680ca
MD5 5db976e53854c09044edfc37ad67e04e
BLAKE2b-256 50ce87943179a0c371146804844e898ee54920367a2c570124ab486d5ba470ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for veldt_kya-0.5.2-py3-none-any.whl:

Publisher: publish.yml on veldtlabs/veldt-kya

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.4

2 files

This release

0.5.2 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.0

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page