• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
AimactGrow
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
AimactGrow
No Result
View All Result

An Implementation of the Microsoft Agent Governance Toolkit for Secure AI Agent Instrument Use with Insurance policies, Approvals, Audit Logs, and Threat Controls

Admin by Admin
May 31, 2026
Home AI
Share on FacebookShare on Twitter


situations = [
   {
       "name": "Safe database read",
       "tool": research_db,
       "kwargs": {
           "table": "customers",
           "operation": "select",
           "type": "select",
           "sensitivity": "medium"
       }
   },
   {
       "name": "Blocked destructive database action",
       "tool": research_db,
       "kwargs": {
           "table": "customers",
           "operation": "drop",
           "type": "drop_table",
           "sensitivity": "critical"
       }
   },
   {
       "name": "External email requiring approval",
       "tool": research_email,
       "kwargs": {
           "to": "[email protected]",
           "recipient_domain": "instance.com",
           "topic": "Quarterly replace",
           "physique": "Sharing a non-confidential quarterly replace.",
           "sort": "send_email",
           "sensitivity": "medium"
       }
   },
   {
       "identify": "Exterior electronic mail denied as a result of approval rejection",
       "device": research_email,
       "kwargs": {
           "to": "[email protected]",
           "recipient_domain": "instance.com",
           "topic": "Confidential technique",
           "physique": "This incorporates confidential technique.",
           "sort": "send_email",
           "sensitivity": "crucial"
       }
   },
   {
       "identify": "Secure sandbox shell command",
       "device": ops_shell,
       "kwargs": {
           "command": "echo Agent governance is energetic",
           "sort": "shell_exec",
           "sensitivity": "low"
       }
   },
   {
       "identify": "Harmful shell command blocked",
       "device": ops_shell,
       "kwargs": {
           "command": "rm -rf /content material/one thing",
           "sort": "shell_exec",
           "sensitivity": "crucial"
       }
   },
   {
       "identify": "Low-trust agent blocked from delicate information",
       "device": shadow_db,
       "kwargs": {
           "desk": "executive_compensation",
           "operation": "choose",
           "sort": "choose",
           "sensitivity": "crucial"
       }
   },
   {
       "identify": "Monetary switch requiring approval",
       "device": finance_transfer,
       "kwargs": {
           "quantity": 2500,
           "vacation spot": "vendor-123",
           "sort": "transfer_money",
           "sensitivity": "excessive"
       }
   },
   {
       "identify": "Massive monetary switch rejected",
       "device": finance_transfer,
       "kwargs": {
           "quantity": 15000,
           "vacation spot": "vendor-999",
           "sort": "transfer_money",
           "sensitivity": "crucial"
       }
   },
]
outcomes = []
for state of affairs in situations:
   strive:
       output = state of affairs["tool"](**state of affairs["kwargs"])
       outcomes.append({
           "state of affairs": state of affairs["name"],
           "standing": "executed",
           "output": output
       })
   besides Exception as e:
       outcomes.append({
           "state of affairs": state of affairs["name"],
           "standing": "blocked_or_pending",
           "error": str(e)
       })
audit_df = audit_log.to_dataframe()
display_cols = [
   "timestamp",
   "agent_name",
   "tool_name",
   "decision",
   "matched_rule",
   "severity",
   "reason",
   "record_hash"
]
show(audit_df[display_cols])
test_cases = [
   {
       "name": "drop_table must be denied",
       "identity": research_agent,
       "tool_name": "query_database",
       "action": {"type": "drop_table", "sensitivity": "critical", "autonomous": True},
       "expected": "deny"
   },
   {
       "name": "safe select should be allowed",
       "identity": research_agent,
       "tool_name": "query_database",
       "action": {"type": "select", "sensitivity": "low", "autonomous": True},
       "expected": "allow"
   },
   {
       "name": "external email should require approval",
       "identity": research_agent,
       "tool_name": "send_email",
       "action": {
           "type": "send_email",
           "recipient_domain": "example.com",
           "sensitivity": "medium",
           "autonomous": True
       },
       "expected": "require_approval"
   },
   {
       "name": "low trust sensitive access denied",
       "identity": unknown_agent,
       "tool_name": "query_database",
       "action": {"type": "select", "sensitivity": "critical", "autonomous": True},
       "expected": "deny"
   },
   {
       "name": "shell command should enter sandbox",
       "identity": ops_agent,
       "tool_name": "shell_exec",
       "action": {
           "type": "shell_exec",
           "command": "echo hello",
           "sensitivity": "low",
           "autonomous": True
       },
       "expected": "sandbox"
   },
]
test_results = []
for check in test_cases:
   determination = engine.consider(
       identification=check["identity"],
       tool_name=check["tool_name"],
       motion=check["action"]
   )
   handed = determination.determination == check["expected"]
   test_results.append({
       "check": check["name"],
       "anticipated": check["expected"],
       "precise": determination.determination,
       "handed": handed,
       "matched_rule": determination.matched_rule
   })
test_df = pd.DataFrame(test_results)
show(test_df)
engine.activate_kill_switch()
strive:
   research_db(
       desk="clients",
       operation="choose",
       sort="choose",
       sensitivity="low"
   )
besides Exception as e:
   cross
engine.deactivate_kill_switch()
audit_df = audit_log.to_dataframe()
abstract = (
   audit_df
   .groupby(["decision", "severity"], dropna=False)
   .dimension()
   .reset_index(identify="rely")
   .sort_values("rely", ascending=False)
)
show(abstract)
agent_summary = (
   audit_df
   .groupby(["agent_name", "decision"])
   .dimension()
   .reset_index(identify="rely")
   .sort_values(["agent_name", "count"], ascending=[True, False])
)
show(agent_summary)
decision_counts = audit_df["decision"].value_counts()
plt.determine(figsize=(8, 5))
decision_counts.plot(sort="bar")
plt.title("Governance Selections Throughout Agent Actions")
plt.xlabel("Resolution")
plt.ylabel("Rely")
plt.xticks(rotation=30)
plt.tight_layout()
plt.present()
severity_counts = audit_df["severity"].fillna("none").value_counts()
plt.determine(figsize=(8, 5))
severity_counts.plot(sort="bar")
plt.title("Governance Occasions by Severity")
plt.xlabel("Severity")
plt.ylabel("Rely")
plt.xticks(rotation=30)
plt.tight_layout()
plt.present()
G = nx.DiGraph()
for _, row in audit_df.iterrows():
   agent_node = f"Agent: {row['agent_name']}"
   tool_node = f"Instrument: {row['tool_name']}"
   decision_node = f"Resolution: {row['decision']}"
   rule_node = f"Rule: {row['matched_rule']}" if pd.notna(row["matched_rule"]) else "Rule: default"
   G.add_node(agent_node, node_type="agent")
   G.add_node(tool_node, node_type="device")
   G.add_node(decision_node, node_type="determination")
   G.add_node(rule_node, node_type="rule")
   G.add_edge(agent_node, tool_node, relation="calls")
   G.add_edge(tool_node, decision_node, relation="produces")
   G.add_edge(decision_node, rule_node, relation="matched")
plt.determine(figsize=(14, 9))
pos = nx.spring_layout(G, seed=42, okay=0.8)
nx.draw_networkx_nodes(G, pos, node_size=1800)
nx.draw_networkx_edges(G, pos, arrows=True, arrowstyle="->", arrowsize=15)
nx.draw_networkx_labels(G, pos, font_size=8)
plt.title("Agent Governance Graph: Brokers, Instruments, Selections, and Coverage Guidelines")
plt.axis("off")
plt.tight_layout()
plt.present()
EXPORT_DIR = "/content material/agt_tutorial_outputs"
os.makedirs(EXPORT_DIR, exist_ok=True)
audit_json_path = os.path.be part of(EXPORT_DIR, "tamper_evident_audit_log.json")
audit_csv_path = os.path.be part of(EXPORT_DIR, "governance_audit_log.csv")
policy_copy_path = os.path.be part of(EXPORT_DIR, "advanced_agent_policy.yaml")
test_results_path = os.path.be part of(EXPORT_DIR, "policy_test_results.csv")
with open(audit_json_path, "w") as f:
   json.dump([asdict(r) for r in audit_log.records], f, indent=2, default=str)
audit_df.to_csv(audit_csv_path, index=False)
test_df.to_csv(test_results_path, index=False)
shutil.copy(POLICY_PATH, policy_copy_path)
Tags: AgentApprovalsauditControlsgovernanceImplementationLogsMicrosoftpoliciesRiskSafetoolToolkit
Admin

Admin

Next Post
Russian Spies Are Aggressively Searching for Western Know-how as Sanctions Chew, Officers Say

Russian Spies Are Aggressively Searching for Western Know-how as Sanctions Chew, Officers Say

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended.

the WH rejected DOD’s proposal for the pinnacle of NSA and US Cyber Command, extending the businesses’ management vacuum; Trump fired NSA’s head in April (John Sakellariadis/Politico)

Over 100K Nepali residents gathered on Discord to assist nominate an interim chief after protests sparked by a social media ban led to the federal government’s collapse (Pranav Baskar/New York Occasions)

September 12, 2025
Do Self-Promotional “Finest” Lists Enhance ChatGPT Visibility? Research of 26,283 Supply URLs

Do Self-Promotional “Finest” Lists Enhance ChatGPT Visibility? Research of 26,283 Supply URLs

December 4, 2025

Trending.

Backrooms director Kane Parsons explains the birds, the portals, and his sensible results

Backrooms director Kane Parsons explains the birds, the portals, and his sensible results

May 31, 2026
Nsfw Chatgpt Options – Examples I’ve Used

Nsfw Chatgpt Options – Examples I’ve Used

October 13, 2025
100 Most Costly Key phrases for Google Advertisements in 2026

100 Most Costly Key phrases for Google Advertisements in 2026

January 13, 2026
ModeloRAT and Mistic Backdoor Exercise Linked to Ransomware Preliminary Entry Dealer

ModeloRAT and Mistic Backdoor Exercise Linked to Ransomware Preliminary Entry Dealer

June 24, 2026
Cisco Catalyst SD-WAN Zero-Day CVE-2026-20245 Exploited to Acquire Root Entry

Cisco Catalyst SD-WAN Zero-Day CVE-2026-20245 Exploited to Acquire Root Entry

June 25, 2026

AimactGrow

Welcome to AimactGrow, your ultimate source for all things technology! Our mission is to provide insightful, up-to-date content on the latest advancements in technology, coding, gaming, digital marketing, SEO, cybersecurity, and artificial intelligence (AI).

Categories

  • AI
  • Coding
  • Cybersecurity
  • Digital marketing
  • Gaming
  • SEO
  • Technology

Recent News

The Final Airbender Will Get a Restricted Theatrical Launch

The Final Airbender Will Get a Restricted Theatrical Launch

July 16, 2026
Faux Céline Dion Paris Tickets Bought on Fb and Ticketmaster Clones

Faux Céline Dion Paris Tickets Bought on Fb and Ticketmaster Clones

July 16, 2026
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved