Skip to content

Audit trail hooks for agent tool execution #13851

@jagmarques

Description

@jagmarques

Semantic Kernel has a strong plugin and function calling architecture but no hook point for creating tamper-evident records of what agents actually did. For regulated deployments, EU AI Act Article 12 requires automatic event logging that can be independently verified.

A pre/post function execution hook at the kernel level would let governance tools sign each action without modifying SK internals. This pattern exists in LangChain (callback handlers), PydanticAI (pre/post tool hooks), CrewAI (step callbacks), and Google ADK is evaluating it.

Specific needs:

  • Pre-function execution hook with function name, arguments, and agent context
  • Post-function execution hook with the result
  • Kernel-level lifecycle hooks (plan start, step complete, error)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions