Metadata-Version: 2.5
Name: maigp-microsoft-agent-framework
Version: 1.0.1
Summary: AIGP governance adapter for Microsoft Agent Framework (MAF) — the converged Semantic Kernel + AutoGen SDK (GA 2026-04-03)
Requires-Python: >=3.11
Requires-Dist: maigp-agent-core>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Description-Content-Type: text/markdown

# maigp-microsoft-agent-framework

AIGP governance for the Microsoft Agent Framework (MAF).

Part of **MAIGP** — the Mediated AI Governance Protocol: a runtime consent / scope / evidence layer for AI systems. Every governed call is **CHECK**ed before it runs (policy, scope, jurisdiction, circuit-breaker) and **RECORD**ed + **TRACE**d as tamper-evident evidence after.

## What it governs

Governs MAF agents (`ChatAgent` runs, function tools, and the middleware chain).

## Governance model

This adapter maps the framework's lifecycle onto the AIGP agent-governance loop provided by [`maigp-agent-core`](https://pypi.org/project/maigp-agent-core/):

| Framework event | AIGP action |
|---|---|
| run / invocation start | **CHECK** (`pre_invoke`) — allowed? under what authority? |
| each model reply | token accounting (`on_model_call`) |
| each tool / function call | tool governance (`on_tool_call`) |
| run complete | **RECORD** + **TRACE** (`post_invoke`) |
| failure | `on_error` (recorded, then re-raised) |


## Install

```bash
pip install maigp-microsoft-agent-framework
```

Pulls in [`maigp-agent-core`](https://pypi.org/project/maigp-agent-core/) (shared lifecycle) and, transitively, [`maigp-client`](https://pypi.org/project/maigp-client/).

## Quick start

```python
from agent_framework import ChatAgent            # MAF
from aigp_microsoft_agent_framework import AigpMafGovernance

gov = AigpMafGovernance(gov_url="https://gov.example.com",
                        app_id="my-maf-agent", hmac_secret="secret")

# Style 1 — wrap a run explicitly:
result = await gov.run(agent, "Analyze this finding", agent_name="analyst")

# Style 2 — register as MAF middleware for automatic coverage:
agent = ChatAgent(chat_client=..., tools=[...], middleware=[gov.middleware()])
```

## Context

MAF 1.0 (GA 2026-04-03) is the converged successor to Semantic Kernel + AutoGen. This adapter **supersedes** `maigp-autogen` and `maigp-semantic-kernel`; prefer it for new projects. The framework object is duck-typed (usage read from the response), so the adapter works across MAF point releases without importing MAF directly.

## Links

- Protocol, specs & full adapter catalog: https://github.com/owner-spec/aigp-protocol
- Issues: https://github.com/owner-spec/aigp-protocol/issues

---

License: Proprietary. © Kanjani AI Research & Causum.
