AutoGen Integration
Strathon enforces policies on AutoGen tool calls before they execute,
across multi-agent conversations, with the full action set including
interactive approval. Integration wraps BaseChatAgent.on_messages and
captures conversations, tool calls, and LLM interactions.
Enforcement scope: full. The pre-execution hook is async, so all seven actions enforce:
blockandthrottlestop the call,steersubstitutes the tool result directly, andrequire_approvalpauses until an operator decides (and fails closed on expiry).
Installation
pip install "strathon[autogen]"Install this in your agent's environment, not alongside the receiver.
autogen-corerequiresprotobuf~=5.29.3and the receiver requiresprotobuf>=7.35.1. Those ranges do not overlap, so pip resolves one and reports the other as unsatisfied. The two are designed to run apart — the receiver in its own container or virtualenv, the SDK inside the agent application — so this only appears if both land in one environment. If you are testing the AutoGen adapter, give it a clean virtualenv; an adapter exercised against an unsupportedprotobufis not a trustworthy result.
Setup
from strathon import Client, instrument
client = Client(
api_key="stra_...",
endpoint="http://localhost:4318",
)
instrument(client, frameworks=["autogen"])What Gets Captured
- Agent messages: sender, receiver, content
- Tool calls: function name, arguments, return value
- Multi-agent conversations: full message thread
- LLM calls: model, tokens, latency
Example Policy
Block code execution tools outright:
attrs["gen_ai.tool.name"] == "execute_code"Block code execution in production (AutoGen group chats re-send the full history every turn, so a runaway loop is expensive: gate the dangerous tool):
attrs["gen_ai.tool.name"] == "execute_code"
&& attrs["strathon.project.environment"] == "production"Notes
- Wraps
BaseChatAgent.on_messagesandBaseGroupChat.runfor conversation and team tracing, andBaseTool.run_jsonto enforce policies on each tool call (the enforcement boundary). All installed at instrument time. - Requires
autogen-agentchat>=0.7.5(installed by theautogenextra). - Multi-agent conversations create a single trace with per-agent spans.