Multi-agent cryptographic session for PiQrypt — co-signed A2A handshakes between AI agents
Project description
piqrypt-session
Standard: AISS v2.0 · Full stack: piqrypt.com
Multi-agent cryptographic session for PiQrypt.
Establishes co-signed A2A handshakes between all agents before any action takes place. Each agent keeps its own verifiable memory. Every interaction references a shared session — provable, tamper-proof, non-repudiable.
pip install piqrypt-session
Works with any framework — LangChain, AutoGen, CrewAI, OpenClaw, or plain Python.
The idea
When multiple AI agents collaborate, today's systems record what each agent did — but not that they agreed to work together, and not that one agent's action was seen and acknowledged by another.
piqrypt-session fills that gap:
Before any action:
LLM ↔ TradingBot → co-signed handshake ✅
LLM ↔ OpenClaw → co-signed handshake ✅
TradingBot ↔ OpenClaw → co-signed handshake ✅
During the session:
LLM recommends BUY AAPL
→ LLM memory: "I sent this recommendation to TradingBot"
→ TradingBot memory: "I received this recommendation from LLM"
→ Both events share the same interaction_hash
→ Neither can deny it happened
Quickstart
from piqrypt_session import AgentSession
# Define your agents — any framework, any setup
session = AgentSession([
{"name": "llm", "identity_file": "llm.json"},
{"name": "trading_bot", "identity_file": "trading-bot.json"},
{"name": "openclaw", "identity_file": "openclaw.json"},
])
# Start — performs all pairwise handshakes automatically
session.start()
# [PiQrypt Session] ✅ Session started: sess_a3f9b2c1d4e5f6a7
# Agents : llm, trading_bot, openclaw
# Handshakes: 3 co-signed
# Timestamp : 1740477600
# Stamp a co-signed interaction between two agents
session.stamp("llm", "recommendation_sent", {
"symbol": "AAPL",
"action": "buy",
"confidence": 0.87,
"reasoning": "Strong Q4 earnings, positive momentum",
}, peer="trading_bot")
# → event in LLM memory: "I sent recommendation to TradingBot"
# → event in TradingBot memory: "I received recommendation from LLM"
# → both share interaction_hash
# Stamp a unilateral action
session.stamp("trading_bot", "order_executed", {
"symbol": "AAPL",
"action": "buy",
"price": 182.50,
"quantity": 100,
"order_id": "ORD-20260225-001",
})
# End session
session.end()
# Export full audit — all agents, all events, all handshakes
session.export("trading-session-audit.json")
# $ piqrypt verify trading-session-audit.json
What each agent's memory contains
LLM memory (~/.piqrypt/llm/events/):
{ "event_type": "session_start", "session_id": "sess_a3f9..." }
{ "event_type": "a2a_handshake", "peer_agent_id": "trading_bot_id", "peer_signature": "..." }
{ "event_type": "a2a_handshake", "peer_agent_id": "openclaw_id", "peer_signature": "..." }
{ "event_type": "recommendation_sent", "interaction_hash": "c7d2...", "peer_agent_id": "trading_bot_id" }
{ "event_type": "session_end", "session_id": "sess_a3f9..." }
TradingBot memory (~/.piqrypt/trading_bot/events/):
{ "event_type": "session_start", "session_id": "sess_a3f9..." }
{ "event_type": "a2a_handshake", "peer_agent_id": "llm_id", "peer_signature": "..." }
{ "event_type": "recommendation_sent_received", "interaction_hash": "c7d2...", "peer_agent_id": "llm_id" }
{ "event_type": "order_executed", "session_id": "sess_a3f9..." }
{ "event_type": "session_end", "session_id": "sess_a3f9..." }
What links them:
- Same
session_idacross all memories - Same
interaction_hashin co-signed events - Each memory has the peer's signature embedded
Framework-agnostic
piqrypt-session works independently of any agent framework.
Combine with framework bridges for full coverage:
# LangChain agent + AutoGen agent in the same session
from piqrypt_langchain import PiQryptCallbackHandler
from piqrypt_autogen import AuditedAssistant
from piqrypt_session import AgentSession
# Each framework stamps its own actions
lc_handler = PiQryptCallbackHandler(identity_file="langchain-agent.json")
ag_assistant = AuditedAssistant(name="analyst", llm_config=llm_config,
identity_file="autogen-agent.json")
# Session links them together
session = AgentSession([
{"name": "langchain_agent", "identity_file": "langchain-agent.json"},
{"name": "autogen_agent", "identity_file": "autogen-agent.json"},
])
session.start()
# All individual actions are stamped by the bridges
# All interactions between agents are co-signed by the session
session.stamp("langchain_agent", "analysis_sent", {
"result": analysis_output
}, peer="autogen_agent")
N agents — automatic handshakes
| Agents | Handshakes |
|---|---|
| 2 | 1 |
| 3 | 3 |
| 4 | 6 |
| 5 | 10 |
| N | N*(N-1)/2 |
All handshakes happen automatically on session.start().
Verify
piqrypt verify trading-session-audit.json
# ✅ Session sess_a3f9b2c1d4e5f6a7
# Agents : 3
# Handshakes: 3 co-signed
# Events : 14 total
# Integrity : verified
# Forks : 0
Scope
| Use case | Profile |
|---|---|
| Development / PoC | AISS-1 (Free, included) |
| Non-critical production | AISS-1 (Free) |
| Regulated production | AISS-2 (Pro) |
Links
- PiQrypt core: github.com/piqrypt/piqrypt
- LangChain bridge: piqrypt-langchain-integration
- AutoGen bridge: piqrypt-autogen-integration
- CrewAI bridge: piqrypt-crewai-integration
- OpenClaw bridge: piqrypt-openclaw-integration
- Issues: piqrypt@gmail.com
PiQrypt — Verifiable AI Agent Memory
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 piqrypt_session_multi_ai_agents-1.1.0.tar.gz.
File metadata
- Download URL: piqrypt_session_multi_ai_agents-1.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
062a3e5fe74e6fe769744589e956fa67ded1cf08345bd62e12cbfd7c1a14a4a8
|
|
| MD5 |
d95dee6671dc894a7575cc03f617ca2e
|
|
| BLAKE2b-256 |
0a1301ad102b118f4b004d35e5a3006b1598430a3935cd9881fa4544d016ba3c
|
Provenance
The following attestation bundles were made for piqrypt_session_multi_ai_agents-1.1.0.tar.gz:
Publisher:
publish.yml on PiQrypt/piqrypt-session-multi-ai-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
piqrypt_session_multi_ai_agents-1.1.0.tar.gz -
Subject digest:
062a3e5fe74e6fe769744589e956fa67ded1cf08345bd62e12cbfd7c1a14a4a8 - Sigstore transparency entry: 1340460368
- Sigstore integration time:
-
Permalink:
PiQrypt/piqrypt-session-multi-ai-agents@880b0c46e7f7758209163a38d92da0a4ae1688db -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/PiQrypt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@880b0c46e7f7758209163a38d92da0a4ae1688db -
Trigger Event:
release
-
Statement type:
File details
Details for the file piqrypt_session_multi_ai_agents-1.1.0-py3-none-any.whl.
File metadata
- Download URL: piqrypt_session_multi_ai_agents-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4094e00ca16eab60e4cafa2e701c9bf928d827032ac680cc27db2c819387c36a
|
|
| MD5 |
f6a76df30af3969c7ba7734cffbb35d9
|
|
| BLAKE2b-256 |
a0c9bed79fe69c79e1403b986ba2b23667c9e9761b7440732ed4c608ee229f51
|
Provenance
The following attestation bundles were made for piqrypt_session_multi_ai_agents-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on PiQrypt/piqrypt-session-multi-ai-agents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
piqrypt_session_multi_ai_agents-1.1.0-py3-none-any.whl -
Subject digest:
4094e00ca16eab60e4cafa2e701c9bf928d827032ac680cc27db2c819387c36a - Sigstore transparency entry: 1340460372
- Sigstore integration time:
-
Permalink:
PiQrypt/piqrypt-session-multi-ai-agents@880b0c46e7f7758209163a38d92da0a4ae1688db -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/PiQrypt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@880b0c46e7f7758209163a38d92da0a4ae1688db -
Trigger Event:
release
-
Statement type: