Skip to content

Audit trail and governance hooks for agent actions #5202

@jagmarques

Description

@jagmarques

ADK provides a solid agent framework but lacks hooks for creating tamper-evident records of agent actions. For regulated deployments, EU AI Act Article 12 requires automatic event logging that can be independently verified.

A callback or middleware interface at the tool execution level would let governance tools sign each action without modifying ADK internals. This pattern exists in LangChain (callback handlers), PydanticAI (pre/post tool hooks), and CrewAI (step callbacks).

Specific needs:

  • Pre-tool execution hook with tool name, arguments, and agent context
  • Post-tool execution hook with the result
  • Session-level lifecycle hooks (start, end, error)

I have implementations for other frameworks and could contribute a PR for the hook interface if there is interest.

Metadata

Metadata

Labels

needs review[Status] The PR/issue is awaiting review from the maintainertracing[Component] This issue is related to OpenTelemetry tracing

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions