EIL Card Python SDK — resolve verified entity identity for AI agents
Project description
EIL Card Python SDK (eil-card)
Resolve verified organization and person identity from the EIL Card registry — with LangChain, CrewAI, and LlamaIndex integrations.
Install
pip install eil-card
Optional framework extras:
pip install eil-card[langchain]
pip install eil-card[llamaindex]
pip install eil-card[crewai]
pip install eil-card[all]
Quick start
from eil_card import DigitalCard, discover_capabilities, discover_act_capabilities
result = DigitalCard.resolve(domain="sinyalle.com")
card = result["card"]
print(card["name"]["official"], card.get("verified"))
caps = discover_capabilities(card)
if caps["available"]:
print("Gateway:", caps["agent_gateway"])
act = discover_act_capabilities(card)
print("Write/act scopes:", act["scopes_parsed"]["write"], act["scopes_parsed"]["act"])
LangChain
from eil_card.integrations.langchain import create_eil_resolve_tool
tool = create_eil_resolve_tool()
# tools = [tool]
Tool name matches the TypeScript SDK: resolve_entity_identity.
CrewAI
from crewai import Agent
from eil_card.integrations.crewai import create_eil_resolve_crewai_tool
resolve_tool = create_eil_resolve_crewai_tool()
agent = Agent(role="Researcher", goal="Verify entities", tools=[resolve_tool])
LlamaIndex
from eil_card.integrations.llamaindex import EILReader
docs = EILReader().load_data(domain="sinyalle.com")
JWS trust (Registry+)
from eil_card import DigitalCard
result = DigitalCard.resolve(domain="sinyalle.com", verify_jws=True)
print(result.get("trust", {}).get("jws"))
# Crypto verify: pip install eil-card[crypto]
result = DigitalCard.resolve(
domain="sinyalle.com",
verify_jws={"public_key_pem": open("registry-public.pem").read(), "require_valid": True},
)
Access policy ("robots.txt for agents")
from eil_card import DigitalCard, discover_access_policy, is_training_denied
result = DigitalCard.resolve(domain="sinyalle.com")
policy = discover_access_policy(result["card"])
# {"read": "gateway", "act": "gateway", "training": "deny", "state": "active", ...}
if is_training_denied(result["card"]):
skip_for_training()
if policy["read"] == "deny":
raise SystemExit("Entity opts out of agent access")
Agent act headers (pilot gateway)
from eil_card import build_idempotency_key, build_agent_act_headers, agent_act_headers_to_fetch
key = build_idempotency_key(
agent_client_id="my-agent",
action_id="create_post",
entity_id="sinyalle.com",
nonce="run-1",
)
headers = agent_act_headers_to_fetch(
build_agent_act_headers(
access_token="...",
idempotency_key=key,
action_id="create_post",
card_id="sinyalle.com",
)
)
Development
cd packages/python
pip install -e ".[dev]"
pytest
Publish (maintainers)
pip install build twine
python -m build
twine upload dist/*
Set PYPI_API_TOKEN in the environment or ~/.pypirc.
Docs
- https://eilcard.com/docs/agents
- TypeScript SDK parity:
packages/sdk/SDK.md
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 eil_card-0.2.0.tar.gz.
File metadata
- Download URL: eil_card-0.2.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad1139bc339a0dccd17d1b9f644d7058ad20ae3c74fa613eb14f1247addb966c
|
|
| MD5 |
94cf4c2d53c331fba0e9151e169c9fd3
|
|
| BLAKE2b-256 |
6ab3483acb80373d09abff2fb91b9199765cf4ec3d59be21a7c9f6b4c1176213
|
File details
Details for the file eil_card-0.2.0-py3-none-any.whl.
File metadata
- Download URL: eil_card-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e969cfd535fc59cda0152e7528e480efce10daec75e306b4c3c427242ff8038c
|
|
| MD5 |
121edff910afb3e6859ca5287334d6e5
|
|
| BLAKE2b-256 |
dbc3d48b5af133667b766becf0b15938f8f6d3444f36d4b5d24a8d9bf0a9ef8f
|