crewai-kya
KYA (Know Your Agent) identity verification for CrewAI agents.
Cryptographic agent identity, trust gates, and verification middleware for CrewAI workflows. No blockchain, no cloud dependency — just Ed25519 signatures and a clean Python API.
Install
pip install crewai-kya
For signature verification:
pip install crewai-kya[signing]
Quick Start
from crewai import Agent
from crewai_kya import create_agent_card, attach_card, KYAIdentityTool
# Create your CrewAI agent
researcher = Agent(
role="Researcher",
goal="Find and summarize relevant papers",
backstory="Expert research analyst",
tools=[KYAIdentityTool()], # Agent can verify other agents
)
# Give it a cryptographic identity card
card = create_agent_card(
researcher,
owner_name="Acme Corp",
owner_contact="security@acme.com",
)
attach_card(researcher, card)
That's it. Your agent now has a verifiable identity.
Trust Gates
Block actions when agents don't meet trust requirements:
from crewai_kya import TrustGateTool
# Add to any agent's toolkit
agent = Agent(
role="Gatekeeper",
goal="Verify agent identities before granting access",
tools=[TrustGateTool()],
)
The TrustGateTool checks:
- Completeness score — is the identity card filled out? (0-100)
- Signature — is the card cryptographically signed?
- Capabilities — does the agent declare the required capabilities?
Decorator: @kya_verified
Gate any function on KYA identity:
from crewai_kya import kya_verified
@kya_verified(min_score=60, require_signature=True)
def sensitive_operation(agent, data):
# Only runs if agent has a valid, signed KYA card with score >= 60
return process(data)
# Fails with KYAVerificationError if agent doesn't meet requirements
sensitive_operation(my_agent, sensitive_data)
Failure modes:
on_fail="raise"— raiseKYAVerificationError(default)on_fail="skip"— returnNonesilentlyon_fail="log"— print warning, continue execution
Why KYA over alternatives?
| Feature | crewai-kya | AgentFolio |
|---|---|---|
| Self-hosted | Yes | No |
| Works offline | Yes | No |
| Cryptographic signing | Ed25519 | None |
| Blockchain dependency | None | Required |
| PyPI package | crewai-kya |
Not published |
| Zero external deps | Yes (signing optional) | No |
| Open standard | KYA v0.1 schema | Proprietary |
API Reference
create_agent_card(agent, **kwargs) -> dict
Create a KYA identity card from a CrewAI Agent. Auto-extracts role, goal, backstory, and tool capabilities.
Parameters:
agent— CrewAI Agent instanceowner_name— Organization nameowner_contact— Contact emailagent_id_prefix— ID prefix (default: "crewai")capabilities— Override auto-detected capabilitiesversion— Agent version (default: "0.1.0")risk_classification— EU AI Act level (default: "minimal")human_oversight— Oversight level (default: "human-on-the-loop")
attach_card(agent, card)
Attach a KYA card to an agent instance for middleware access.
get_card(agent) -> dict | None
Retrieve the attached KYA card.
KYAIdentityTool
CrewAI Tool that verifies KYA identity cards. Input: card JSON string. Output: verification result.
TrustGateTool
CrewAI Tool that gates actions on trust score. Input: card JSON + thresholds. Output: PASSED/BLOCKED.
@kya_verified(min_score, require_signature, required_capabilities, on_fail)
Decorator for gating function execution on KYA identity.
Sign Cards
from kya.signer import generate_keypair, sign_card
# One-time: generate Ed25519 keys
generate_keypair("my-org")
# Sign a card
signed_card = sign_card(card, "~/.kya/keys/my-org.key")
License
MIT — LuciferForge
Metadata
Release files for crewai-kya 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| crewai_kya-0.1.0.tar.gz | 13.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crewai_kya-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.2 kB
Release files / crewai_kya-0.1.0.tar.gz
| Download URL | crewai_kya-0.1.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c8db9c6dbe354301a7407e8d39cd6ab8e2b330f2d8da3c5847b1b3a4915568b
|
|
BLAKE2b-256 checksum How to use checksums |
a72bb4675168f1928a44a0f141cf0a088886246f10ad24ba142259a837b9180e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.2
|
Release files / crewai_kya-0.1.0-py3-none-any.whl
| Download URL | crewai_kya-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
450cc65617453fc1e23132ea0bbf9e529ce6762de801709ae20a637a9d8b5fd7
|
|
BLAKE2b-256 checksum How to use checksums |
617aa9fef23fcce7d4c285ea0f2bfe52b4236e8b12bf9032f44c6fc494c810bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.2
|
Security for crewai-kya 0.1.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.
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.