Audifact
MULTI-AGENT EXAMPLE

Auditable Multi-Agent Systems
with AutoGen

Enterprise multi-agent systems with cryptographic audit trails. Every agent execution and structured response — permanently recorded and verifiable.

No credit card required • Cryptographic proofs included

THE PROBLEM

AutoGen agents collaborate —
but proving what each one decided is hard.

⚖️

Regulatory Compliance

When agents make decisions or produce structured outputs, auditors need immutable records of every turn, input, and final answer.

📉

Accountability & Traceability

In GroupChat or modern teams, you need per-agent provenance — who said what, when, and why.

🔍

Structured Outputs & Audit

With output_content_type or JSON mode, the final answers must be captured cleanly for replay and verification.

GETTING STARTED

Installation

Stable (pyautogen 0.5.x)
pip install "audifact-sdk[autogen]" pyautogen
Uses the stable AudifactTracer
Modern AG2 (0.7+)
pip install "audifact-sdk[autogen]" "autogen-agentchat>=0.7" "autogen-ext[openai]>=0.7"
Uses AudifactTracerAG2 (also available as AudifactTracer alias in some contexts)
PRODUCTION-READY EXAMPLES

Auditable AutoGen Workflows

We support both the stable (widely used) and modern AG2 versions of Autogen.
STABLE VERSION

Classic pyautogen (GroupChat)

import autogen
from audifact.autogen import AudifactTracer

llm_config = { ... }

researcher = autogen.AssistantAgent(name="researcher", llm_config=llm_config, ...)
critic = autogen.AssistantAgent(name="critic", llm_config=llm_config, ...)
writer = autogen.AssistantAgent(name="writer", llm_config=llm_config, ...)

groupchat = autogen.GroupChat(agents=[researcher, critic, writer], ...)
manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)

# Wrap the manager — all agent turns are now traced
tracer = AudifactTracer(
    api_key="af_YOUR_API_KEY",
    agent_name="autogen-research-team",
    # include_context=True  # opt-in for full inputs/outputs
)
traced = tracer.wrap(manager)

user_proxy.initiate_chat(traced, message="Topic: ...")
full source →

Uses stable AudifactTracer (GroupChatManager instrumentation)

MODERN VERSION

AG2 (autogen-agentchat 0.7+ + structured output)

from autogen_agentchat.agents import AssistantAgent
from autogen_agentchat.teams import RoundRobinGroupChat
from autogen_agentchat.ui import Console
from pydantic import BaseModel
from audifact.autogen import AudifactTracerAG2

class StructuredAnswer(BaseModel):
    answer: str
    confidence: float
    key_points: list[str]

analyst = AssistantAgent(
    name="analyst",
    model_client=...,
    output_content_type=StructuredAnswer,  # structured output → output_json
    ...
)

tracer = AudifactTracerAG2(
    api_key="af_YOUR_API_KEY",
    agent_name="ag2-modern-team",
    include_context=True,
)
traced = tracer.wrap(analyst)

team = RoundRobinGroupChat(participants=[traced, ...], ...)
await Console(team.run_stream(task="..."))
full source →

Uses AudifactTracerAG2 (on_messages_stream + output_content_type support)

Safe demo — nothing written to ledger. Use your real API key + OPENAI key to record real runs.

TRANSPARENCY

Every agent turn is captured — stable and modern

Structured decisions and outputs with cryptographic hashes. Never raw prompts by default.

💬
Group Chat / Team Run
decision_type: group_chat_start or team run
input_hash: a3f9c2e1
Stable: GroupChat • Modern: RoundRobin + registration
Recorded in explorer
🧠
Agent Execution
decision_type: agent_execution
agent_name + run_id
Stable generate_reply vs Modern on_messages_stream
Tamper-evident turn
📝
Agent Response
outcome_type: agent_response
duration_ms + output_json
StructuredAnswer + reasoning captured
Linked to decision
Team / Group Complete
group_chat_complete / team result
final structured answer
full hash chain + team result
Cryptographically signed
All events visible in the Explorer with full hash chain verification.
WHY ENTERPRISE CHOOSES AUDIFACT + AUTOGEN

Cryptographic guarantees for AutoGen agents

Tamper-evident ledger

Every execution and response is hash-chained.

Regulatory readiness

Instant proofs for auditors — stable or AG2.

Structured output capture

Answers + reasoning land cleanly in output_json.

Agent + team identity

Signed identities. Full provenance for every participant.

Ready to make your AutoGen agents auditable?

Stable or modern — cryptographic proofs in minutes. No credit card required.

Enterprise plans: dedicated support, custom retention, on-prem options.