Skip to content

Add forensic reporting example with agent-forensics#2803

Closed
ilflow4592 wants to merge 1 commit intoopenai:mainfrom
ilflow4592:add-agent-forensics-example
Closed

Add forensic reporting example with agent-forensics#2803
ilflow4592 wants to merge 1 commit intoopenai:mainfrom
ilflow4592:add-agent-forensics-example

Conversation

@ilflow4592
Copy link
Copy Markdown

Description

Add an example demonstrating forensic reporting for OpenAI Agents using agent-forensics.

The example shows how to:

  • Add forensic hooks to an agent with one line (hooks=f.openai_agents())
  • Auto-capture all decisions, tool calls, and LLM interactions
  • Generate a forensic report after agent execution
  • Auto-classify failure patterns (hallucinated tool output, missing approval, etc.)
  • Extract model config for deterministic replay

This is useful for:

  • Debugging agent failures ("why did the agent do that?")
  • EU AI Act compliance (Article 14 — decision traceability)
  • Comparing agent behavior across runs (replay diff)

Usage

pip install openai-agents agent-forensics
python examples/basic/agent_forensics_example.py

Dependencies

  • agent-forensics (optional, only needed for this example)

@seratch
Copy link
Copy Markdown
Member

seratch commented Mar 29, 2026

Thanks for sharing this. We don't have this example in this repo but please include it in your own repo!

@seratch seratch closed this Mar 29, 2026
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.

2 participants