Skip to main content
AutoGen comes in two lineages, Microsoft’s autogen-agentchat (the 0.4 rewrite) and the ag2 / pyautogen fork. Both build their model client internally from a config, and neither exposes a single hook that sees both tool calls and model calls the way ADK, CrewAI, and Strands do. So Sakshi does not ship a watch_autogen, and does not pretend to. It governs AutoGen at the two boundaries that are stable across both lineages: the tool and the model client.

Govern at the tool boundary

This is the path that works across every AutoGen version, and it is where the consequential decisions are. Open a witness session around the run, and inside each tool that matters, witness the step and call enforce before acting.
Register approve_loan as a tool with your AutoGen agent as you normally would. The witness session is active for the duration of the run, so the tool’s step lands on the same decision, and enforce fails closed.

Witness the model calls

If you construct the underlying provider client yourself, wrap it with the matching Sakshi middleware before AutoGen uses it, and every model call inside the witness session is recorded, exactly as for a direct OpenAI or Anthropic call.
When AutoGen builds the client internally from a config dict, there is no object to wrap; use the tool-boundary path above, which is where governance matters most.
This is the same honesty as the LangChain page: Sakshi will not ship a middleware that implies a clean hook the framework does not offer. If AutoGen adds a stable tool-and-model interception point, a dedicated integration follows.

Full SDK reference

The client, the witness session, and enforcement.