Skip to main content

Microsoft AutoGen (v0.4+) integration for the Dominion Observatory — instrument autogen_core.tools.BaseTool calls with anonymised runtime telemetry to the cross-ecosystem MCP trust layer.

Project description

dominion-observatory-autogen

Microsoft AutoGen (v0.4+) integration for the Dominion Observatory — the runtime behavioural trust layer for MCP servers.

Drop-in wrapper for any autogen_core.tools.BaseTool — including MCP-bridged tools from autogen-ext-mcp — that adds:

  • Runtime trust telemetry published to a cross-ecosystem registry of 4,500+ MCP servers.
  • Honest, agent-reported data — not GitHub stars, not registry manifests.
  • Zero payload leakage — six fields per report, nothing more.

AutoGen v0.4 standardises on autogen_core.tools.BaseTool. Wrapping run_json is the one intercept point that covers both native Python tools and MCP-bridged tools, regardless of whether you're driving them from autogen_agentchat.AssistantAgent, a raw ToolAgent, or your own runtime loop.


Install

pip install dominion-observatory-autogen

Python 3.10 – 3.13. Requires autogen-core >= 0.4.0 (installed by your project, listed under the autogen extra) and dominion-observatory-sdk >= 0.2.0 (pulled in automatically).


One-line wiring

from autogen_agentchat.agents import AssistantAgent
from autogen_ext.tools.mcp import StdioServerParams, mcp_server_tools
from dominion_observatory_autogen import instrument_tool

# Load MCP tools from a server (autogen-ext-mcp style).
raw_tools = await mcp_server_tools(
    StdioServerParams(command="uvx", args=["my-mcp-server"])
)

# Wrap each tool so every call emits a single anonymised Observatory report.
tools = [
    instrument_tool(
        t,
        agent_id="acme-scheduler@1.2.0",
        server_url="https://my-mcp-server.example.com/mcp",
    )
    for t in raw_tools
]

agent = AssistantAgent(
    name="planner",
    model_client=model_client,
    tools=tools,
)

Works identically for tools you hand-roll as BaseTool subclasses — anything with an async run_json is instrumentable.


What gets sent

Exactly these six fields per tool invocation, and nothing else:

Field Example
agent_id acme-scheduler@1.2.0
server_url https://my-mcp-server.example.com/mcp
success true / false
latency_ms 142
tool_name get_holidays
http_status 200 on success, 500 on raised exception

Not sent: tool arguments, tool outputs, user IDs, prompts, IP addresses, auth tokens. Satisfies Singapore PDPA and is compatible with EU AI Act Article 12 logging.

On raised exceptions, success=false and http_status=500; the original exception is re-raised unchanged so your agent's error handling is unaffected.


Choosing a stable agent_id

Required by dominion-observatory-sdk >= 0.2.0. Must be non-empty and not "anonymous" or "observatory_probe".

Recommended patterns:

  • "my-app@1.0.0" — package-name + version (stable across restarts).
  • str(uuid.uuid4()) persisted to disk on first run (stable per install).
  • f"{environ['HOSTNAME']}/my-service" — per-deployment.

Do not use per-request IDs — you will fragment your own trust history.


Design notes

  • Defensive: every Observatory call is wrapped in a broad except so a network hiccup, import failure, or SDK validation error never disturbs the agent loop.
  • Zero side effects on import: both the autogen_core and dominion_observatory imports are deferred or optional; this package stays importable without either installed.
  • Transparent wrapper: ObservatoryInstrumentedTool forwards every attribute (name, description, schema, args_type, return_type) to the inner tool, so any AutoGen code path that introspects a tool keeps working.
  • No telemetry without attribution: wrapping a tool with server_url=None runs the tool normally but emits no report. This is the safe default for local Python tools that have no MCP server identity.
  • Scope: v0.1.0 covers tool-level instrumentation. A future v0.2.0 will add a streaming helper that consumes autogen_agentchat.messages.ToolCallExecutionEvent and derives server_url from tool metadata.

Development

# From the adapter directory:
pip install -e ".[autogen,test]"
pytest

Part of the Dominion Agent Economy Engine

This adapter is maintained by the DAEE-HITMAN distribution sub-agent. Source lives at vdineshk/daee-hitman under the MIT licence. File issues there.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dominion_observatory_autogen-0.1.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dominion_observatory_autogen-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file dominion_observatory_autogen-0.1.0.tar.gz.

File metadata

File hashes

Hashes for dominion_observatory_autogen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ce32a77f7a9aca934f1078a6000df1755885362491ac146c0f1ec42ef61e36d
MD5 583f19720d67b8b4ee770a91fe800ae5
BLAKE2b-256 9b0b381db2fdf330ac056025f57a0bdcc4d5ef77a1633fe04ef3ec926d4d38e4

See more details on using hashes here.

File details

Details for the file dominion_observatory_autogen-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dominion_observatory_autogen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd5a21bcafe9b99c9f05aa7aceaa4132a40e46fbfb9d119ad1a7f9f7471cb69a
MD5 524fcc33cbe14ae408a11f40009e83fb
BLAKE2b-256 0934a69973da79616c91335a512e10daa70aa159e4c65c520b4ede10ca41407b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page