Skip to content

feat(examples): add AgentLair agent platform integration example#18

Open
piiiico wants to merge 1 commit into
agent-intent:mainfrom
piiiico:feat/agentlair-example
Open

feat(examples): add AgentLair agent platform integration example#18
piiiico wants to merge 1 commit into
agent-intent:mainfrom
piiiico:feat/agentlair-example

Conversation

@piiiico

@piiiico piiiico commented Mar 31, 2026

Copy link
Copy Markdown

Summary

Adds a self-contained example demonstrating how AgentLair operates as the agent identity platform within a Verifiable Intent Autonomous mode delegation chain.

The VI spec explicitly lists "agent platform APIs" as out of scope. AgentLair fills this gap by providing agent keypair management (P-256), vault-based L3 signing, and hash-chained audit trails — the infrastructure layer that complements VI's authorization proof layer.

What the example covers

  • Agent key provisioning: AgentLair provides the P-256 keypair bound as cnf.jwk in the L2 mandate
  • L2 mandate creation: User delegates to AgentLair agent with constraints (amount limit, merchant allowlist, product allowlist)
  • Vault-based L3 signing: AgentLair vault signs L3a (payment) and L3b (checkout) credentials — private key never leaves the vault
  • Selective disclosure routing: Merchant and network each receive only the disclosures relevant to their role
  • Chain + constraint verification: Both merchant and network verify the full delegation chain
  • Audit trail: AgentLair records a hash-chained audit entry linked to the VI transaction ID

The example is self-contained, follows the same patterns as existing examples in examples/, and runs against the SDK with no additional dependencies.

How to run

pip install -e ".[dev]"
python examples/agentlair_integration.py

Test plan

  • pytest passes (308 tests, 0 failures)
  • python examples/agentlair_integration.py runs end-to-end successfully
  • No changes to existing code — example-only addition
  • DCO sign-off included

Signed-off-by: Håkon Åmdal hakon@amdal.dev

Adds a self-contained example demonstrating how AgentLair operates as
the agent identity platform within a VI Autonomous mode delegation chain.

AgentLair fills the "agent platform APIs" gap that VI's spec explicitly
leaves out of scope, providing agent keypair management, vault-based L3
signing, and audit trail infrastructure.

The example follows the same patterns as existing examples and covers:
- Agent P-256 keypair provisioning (via AgentLair API in production)
- L2 mandate creation with agent key binding and constraints
- L3 credential signing (checkout + payment mandates)
- Privacy-preserving selective disclosure routing
- Chain and constraint verification by merchant and network
- AgentLair audit trail linked to VI transaction ID

Signed-off-by: Håkon Åmdal <hakon@amdal.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant