Skip to main content

PiQrypt cryptographic audit trail bridge for Microsoft AutoGen

Project description

piqrypt-autoGen-integration

Verifiable AI Agent Memory_Cryptographic audit trail for Microsoft AutoGen agents.

PyPI Downloads License: MIT PiQrypt

Every reply, code execution, and multi-agent conversation — signed, hash-chained, tamper-proof.

pip install piqrypt-autogen

Quickstart

from piqrypt_autogen import AuditedAssistant, AuditedUserProxy

# Drop-in replacements for AutoGen agents
assistant = AuditedAssistant(
    name="assistant",
    llm_config={"model": "gpt-4o"},
    identity_file="assistant.json"    # PiQrypt identity
)

user_proxy = AuditedUserProxy(
    name="user_proxy",
    human_input_mode="NEVER",
    identity_file="proxy.json"
)

# Normal AutoGen conversation — every reply is stamped
user_proxy.initiate_chat(
    assistant,
    message="Analyze the Q4 financial report and flag anomalies."
)

# Export tamper-proof audit trail
assistant.export_audit("q4-analysis-audit.json")
# $ piqrypt verify q4-analysis-audit.json

Multi-agent group chat

from autogen import GroupChat
from piqrypt_autogen import AuditedAssistant, AuditedUserProxy, AuditedGroupChat

researcher = AuditedAssistant(
    name="researcher",
    llm_config=llm_config,
    identity_file="researcher.json"
)

analyst = AuditedAssistant(
    name="analyst",
    llm_config=llm_config,
    identity_file="analyst.json"
)

user_proxy = AuditedUserProxy(
    name="user",
    human_input_mode="NEVER"
)

group_chat = GroupChat(
    agents=[user_proxy, researcher, analyst],
    messages=[],
    max_round=10
)

manager = AuditedGroupChat(
    groupchat=group_chat,
    llm_config=llm_config,
    identity_file="manager.json"
)

user_proxy.initiate_chat(manager, message="Research AI Act compliance requirements")

# Every agent stamped independently — full end-to-end audit
manager.export_audit("group-chat-audit.json")

Stamp a third-party agent

from piqrypt_autogen import stamp_reply

# Can't subclass? Wrap the method directly
agent = SomeThirdPartyAgent(...)
agent.generate_reply = stamp_reply(
    identity_file="my-agent.json"
)(agent.generate_reply)

Stamp an entire conversation post-hoc

from piqrypt_autogen import stamp_conversation

# After a conversation completes
conv_hash = stamp_conversation(
    messages=user_proxy.chat_messages[assistant],
    private_key=private_key,
    agent_id=agent_id,
    conversation_id="q4-analysis-2026-02"
)

What gets stamped

Event Agent When
agent_initialized AssistantAgent On creation
proxy_initialized UserProxy On creation
groupchat_initialized GroupChatManager On creation
reply_generated AssistantAgent After each reply
proxy_reply UserProxy After each proxy reply
code_executed UserProxy After code block execution
groupchat_start GroupChatManager Before chat runs
groupchat_complete GroupChatManager After chat finishes

All events Ed25519-signed, SHA-256 hash-chained. Raw messages never stored — only hashes.


Verify

piqrypt verify autogen-audit.json
# ✅ Chain integrity verified — 18 events, 0 forks

piqrypt search --type code_executed
# All code executions with timestamps

Links


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

piqrypt_autogen_integration-1.0.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

piqrypt_autogen_integration-1.0.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file piqrypt_autogen_integration-1.0.0.tar.gz.

File metadata

File hashes

Hashes for piqrypt_autogen_integration-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d7ecd8c9489d49f5534e6a0b6c477cd2039a9d584a557cd7528fd9b98ff5441d
MD5 6f3590ab241da9202cb45eea8a4a9eab
BLAKE2b-256 ab14aabd4aaf706e2ad8997555467eee0481737052d86b1f48eb5a0f999430a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqrypt_autogen_integration-1.0.0.tar.gz:

Publisher: publish.yml on PiQrypt/piqrypt-autoGen-integration

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piqrypt_autogen_integration-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for piqrypt_autogen_integration-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44e7cbd4679f38132393c3f25a180228f449669cafc130bf26918ec967f61eaf
MD5 c0c7f05a2418aba7a5520b42cdad4db9
BLAKE2b-256 c28da8e1f65046faeae76d7bf32d3ac00194143647f1d851f1393fbd18dbaedc

See more details on using hashes here.

Provenance

The following attestation bundles were made for piqrypt_autogen_integration-1.0.0-py3-none-any.whl:

Publisher: publish.yml on PiQrypt/piqrypt-autoGen-integration

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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