Monitor your agents in production with Azure Monitor, Application Insights, and MAF's built-in telemetry.
import { TelemetryMiddleware } from "@microsoft/agents";
const agent = new Agent({
name: "ObservableAgent",
middlewares: [
new TelemetryMiddleware({
connectionString: process.env.APPLICATIONINSIGHTS_CONNECTION_STRING,
trackConversations: true,
trackToolCalls: true,
})
]
});
Guardrails enforce safety and compliance policies on agent inputs and outputs.
import { Guardrail, ContentSafetyPolicy } from "@microsoft/agents";
const agent = new Agent({
name: "SafeAgent",
guardrails: [
new ContentSafetyPolicy({
blockHateSpeech: true,
blockPersonalInfo: true,
maxInputLength: 4096,
})
]
});
| Practice | Description |
|---|---|
| Managed Identity | Use Azure Managed Identity instead of connection strings |
| Tool Auth | Validate authentication and authorization in every tool handler |
| Rate Limiting | Prevent abuse with per-user rate limits |
| PII Redaction | Configure guardrails to detect and redact PII |
| Audit Logging | Log all agent decisions and tool calls for audit |