Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/microsoft/agent-governance-toolkit/llms.txt

Use this file to discover all available pages before exploring further.

All five AGT language SDKs implement the same four governance primitives — policy evaluation, agent identity, trust scoring, and tamper-evident audit logging — so teams can enforce the same governance rules whether they’re building in Python, TypeScript, .NET, Rust, or Go. Policy YAML files work identically across all SDKs. The Python package has the full stack; the other four SDKs cover the core governance surface needed to build production agents.

Core Governance Primitives

PrimitivePythonTypeScript.NETRustGo
Policy evaluationPolicyEvaluatorPolicyEnginePolicyEnginePolicyEnginePolicyEngine
Agent identityAgentIdentityAgentIdentityAgentIdentityAgentIdentityAgentIdentity
Trust scoringTrustEngineTrustManagerFileTrustStoreTrustEngineTrustManager
Audit loggingAuditLoggerAuditLoggerAuditLoggerAuditLoggerAuditLogger

SDK Examples

Install
npm install @microsoft/agent-governance-sdk
Prerequisites: Node.js ≥ 18, TypeScript ≥ 5.4. The package has two runtime dependencies: @noble/ed25519 for cryptography and js-yaml for YAML policy parsing.PolicyEngine
import { PolicyEngine } from "@microsoft/agent-governance-sdk";

const engine = new PolicyEngine([
  { action: "data.read",  effect: "allow" },
  { action: "data.write", effect: "deny"  },
]);

engine.evaluate("data.read");    // "allow"
engine.evaluate("data.write");   // "deny"
engine.evaluate("data.delete");  // "deny" — default when no rule matches
Load rich YAML policies with expressions, rate limits, and conflict resolution:
const engine = new PolicyEngine();
await engine.loadFromYAML("./policies/production.yaml");
const result = engine.evaluatePolicy(
  "did:agentmesh:analytics-agent:abc123",
  { user: { role: "admin" }, action: "data.write" }
);
console.log(result.allowed);      // true
console.log(result.matchedRule);  // "admin-full-access"
AgentIdentity (Ed25519 DIDs)
import { AgentIdentity } from "@microsoft/agent-governance-sdk";

const agent = AgentIdentity.generate("sales-assistant", ["crm.read", "email.send"], {
  organization: "Contoso",
  sponsor: "alice@contoso.com",
});

console.log(agent.did);  // did:agentmesh:sales-assistant:<fingerprint>

// Sign and verify
const message = new TextEncoder().encode("Transfer $500 to account 1234");
const signature = agent.sign(message);
console.log(agent.verify(message, signature));  // true

// Delegate with narrowed capabilities
const child = agent.delegate("data-worker", ["crm.read"]);
console.log(child.parentDid);         // parent's DID
console.log(child.delegationDepth);   // 1
AuditLogger (Hash-chain)
import { AuditLogger } from "@microsoft/agent-governance-sdk";

const logger = new AuditLogger();

logger.log({ agentId: "agent-1", action: "data.read",  decision: "allow" });
logger.log({ agentId: "agent-1", action: "data.write", decision: "deny"  });

console.log(logger.verify());  // true — chain is intact
const json = logger.exportJSON();
Unified AgentMeshClient
import { AgentMeshClient } from "@microsoft/agent-governance-sdk";

const client = AgentMeshClient.create("my-agent", {
  capabilities: ["data.read", "data.write"],
  policyRules: [
    { action: "data.read",  effect: "allow" },
    { action: "*",           effect: "deny"  },
  ],
});

const result = await client.executeWithGovernance("data.read");
console.log(result.decision);    // "allow"
console.log(result.trustScore);  // { overall: 0.5, tier: "Provisional", ... }
console.log(result.auditEntry);  // { hash: "3a7f...", previousHash: "0000...", ... }

Capability Matrix

CapabilityPythonTypeScript.NETRustGo
Policy Engine
Identity & Auth
Trust Scoring
Audit Logging
MCP Security
Execution Rings
SRE / SLOs
Kill Switch
Lifecycle Management
Framework Integrations
Shadow AI Discovery
Prompt Defense Evaluator
Unified CLI (agt)
Governance Dashboard
Legend: ✅ Implemented · ◑ Partial · — Not yet available
.NET is marked partial for Identity & Auth parity because it now supports stronger native asymmetric identity flows (ECDSA P-256) while the other SDKs center on Ed25519-based identity material.

Python-Only Capabilities

Several capabilities are available exclusively in Python today. They represent the full governance stack for enterprise deployments:
CapabilityPackageDescription
Replay Debuggingagent-sreDeterministic replay of agent sessions
Governance Dashboarddemo/Real-time fleet visibility (Streamlit)
Unified CLI (agt)agent-complianceagt verify, agt doctor, agt lint-policy
OWASP Verificationagent-complianceASI 2026 compliance attestation
20+ Framework Adaptersagentmesh-integrationsLangChain, CrewAI, AutoGen, OpenAI Agents, Google ADK, etc.

Policy YAML Portability

Policy YAML files work identically across all five SDKs. Write the policy once and load it from any language:
# policies/production.yaml — works in Python, TypeScript, .NET, Rust, and Go
version: "1.0"
agent: production-agent
policies:
  - name: data-access
    type: capability
    allowed_actions:
      - "data.read"
      - "data.write"
    denied_actions:
      - "shell:*"
      - "admin.*"
  - name: api-throttle
    type: rate_limit
    actions:
      - "api.*"
    max_calls: 100
    window: "1m"
# Python
pip install agent-governance-toolkit[full]

# TypeScript
npm install @microsoft/agent-governance-sdk

# .NET
dotnet add package Microsoft.AgentGovernance

# Rust
cargo add agentmesh

# Go
go get github.com/microsoft/agent-governance-toolkit/agent-governance-golang

Build docs developers (and LLMs) love