Skip to main content

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},
)

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

Project details


Download files

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

Source Distribution

eil_card-0.1.1.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

eil_card-0.1.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file eil_card-0.1.1.tar.gz.

File metadata

  • Download URL: eil_card-0.1.1.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for eil_card-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eba5566b6a3aee9762316c4a8d570d76ede19011c66b0eb0198ec1f80d9f7745
MD5 dfcac396a3331f683500e6ed8b5c9d8a
BLAKE2b-256 b252520eb43aa97da2fdab7b4580862d8e2801d51177464b3bb8fa6b26e0743d

See more details on using hashes here.

File details

Details for the file eil_card-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: eil_card-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for eil_card-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83145d4280d1ac004d1ee2cfec45943ecf182db1a71e563a9f09ea3ae4582b7a
MD5 b578eb00c421415a9f3feb26015c09ac
BLAKE2b-256 e87f0c77a667a27be627347fea8d5192c67bc4d782077b61c12746a1eea1d127

See more details on using hashes here.

Supported by

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