docs(architect): weekly KB update — 52 files refreshed (2026-04)
Key content changes: - MLOps: MLflow 3 scorers expanded (RetrievalRelevance, Fluency, multi-turn judges) - MLflow 3 A/B eval: mirror_traffic GA confirmed, new scorer catalog - CI/CD: OIDC auth replaces deprecated --sdk-auth (Azure ML GitHub Actions) - Agent framework A2A: updated SDK patterns (A2ACardResolver, BearerAuth) - AG-UI backend tool rendering: accurate TOOL_CALL_* event shapes - Computer Use agents: US region requirement, credentials patterns - Purview governance: bulk term edit, expire/delete workflows - CAF AI Secure: 3-phase structure confirmed current - Copilot Studio: Claude Sonnet 4.5/4.6 GA, new orchestration controls - M365 manifest: v1.26 GA (April 2026), copilotAgents node - Power Platform: agent flow capacity enforcement corrected - Azure Monitor: Simple Log Alerts GA, AMBA for policy-based alerting - Security Copilot: SCU capacity model (400 SCU/1000 users) - EU Data Boundary: all EU + EFTA countries confirmed - gateway-multi-backend: added 4th topology, subscription-level quota note Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
6645e93205
commit
be4925a8ff
40 changed files with 398 additions and 239 deletions
|
|
@ -209,32 +209,55 @@ var result = await mainAgent.RunAsync("Hvordan er været i Oslo?");
|
|||
|
||||
AG-UI backend tool rendering stoetter HITL via to mekanismer:
|
||||
|
||||
**C# - ApprovalRequiredAIFunction:**
|
||||
**C# - AIFunctionFactory med serializerOptions (Verified MCP 2026-04):**
|
||||
```csharp
|
||||
// Tool som krever human approval
|
||||
var approvalTool = ApprovalRequiredAIFunction.Create(DeleteRecord);
|
||||
|
||||
// Workflow emitter RequestInfoEvent med ToolApprovalRequestContent
|
||||
await foreach (var evt in workflow.WatchStreamAsync()) {
|
||||
if (evt is RequestInfoEvent req && req.Data is ToolApprovalRequestContent tc) {
|
||||
bool approved = await AskUserApproval(tc.ToolName);
|
||||
await handle.SendResponseAsync(req.Request.CreateResponse(approved));
|
||||
}
|
||||
// Definer tool med Description-attributter
|
||||
[Description("Search for restaurants in a location.")]
|
||||
static RestaurantSearchResponse SearchRestaurants(
|
||||
[Description("The restaurant search request")] RestaurantSearchRequest request)
|
||||
{
|
||||
// implementasjon
|
||||
}
|
||||
|
||||
// Registrer tool - NB: serializerOptions PÅKREVD for komplekse typer
|
||||
var jsonOptions = app.Services.GetRequiredService<IOptions<JsonOptions>>().Value;
|
||||
AITool[] tools = [
|
||||
AIFunctionFactory.Create(SearchRestaurants, serializerOptions: jsonOptions.SerializerOptions)
|
||||
];
|
||||
|
||||
// FunctionCallContent og FunctionResultContent streames til klient
|
||||
// FunctionCallContent: .Name, .Arguments (key-value pairs)
|
||||
// FunctionResultContent: .CallId, .Result eller .Exception
|
||||
```
|
||||
|
||||
**Python - @tool med approval_mode:**
|
||||
**Python - @tool decorator (Verified MCP 2026-04):**
|
||||
```python
|
||||
@tool(approval_mode="always_require")
|
||||
def delete_record(record_id: str) -> str:
|
||||
# Sletter en post - krever alltid menneskelig godkjenning
|
||||
return db.delete(record_id)
|
||||
from typing import Annotated
|
||||
from pydantic import Field
|
||||
from agent_framework import tool
|
||||
|
||||
# Workflow pauser og emitter function_approval_request event
|
||||
# Klient-loop maa haandtere og respondere
|
||||
@tool
|
||||
def get_weather(
|
||||
location: Annotated[str, Field(description="The city")],
|
||||
) -> str:
|
||||
"""Get the current weather for a location."""
|
||||
return f"The weather in {location} is 22 degrees C."
|
||||
|
||||
# Klasse-baserte tools for gruppering
|
||||
class WeatherTools:
|
||||
@tool
|
||||
def get_current_weather(self, location: Annotated[str, Field(description="City")]) -> str:
|
||||
"""Get current weather."""
|
||||
return f"Current weather in {location}: Sunny"
|
||||
```
|
||||
|
||||
**Backend tool events streames til klient i sanntid:** TOOL_CALL_START, TOOL_CALL_ARGS, TOOL_CALL_END, TOOL_CALL_RESULT.
|
||||
**Backend tool events streames til klient i sanntid (Verified MCP 2026-04):**
|
||||
```json
|
||||
{"type": "TOOL_CALL_START", "toolCallId": "call_abc123", "toolCallName": "get_weather"}
|
||||
{"type": "TOOL_CALL_ARGS", "toolCallId": "call_abc123", "delta": "{"location": "Oslo"}"}
|
||||
{"type": "TOOL_CALL_END", "toolCallId": "call_abc123"}
|
||||
{"type": "TOOL_CALL_RESULT","toolCallId": "call_abc123", "content": "The weather in Oslo is 22C."}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -428,7 +451,7 @@ def update_citizen_record(ssn: str, field: str, value: str) -> str:
|
|||
1. [Azure OpenAI Function Calling](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/function-calling) — **Verified 2026-02**
|
||||
2. [Semantic Kernel Agent Functions](https://learn.microsoft.com/en-us/semantic-kernel/frameworks/agent/agent-functions) — **Verified 2026-02**
|
||||
3. [Agent Framework - Agent as Function Tool](https://learn.microsoft.com/en-us/agent-framework/tutorials/agents/agent-as-function-tool) — **Verified 2026-02**
|
||||
4. [AG-UI Backend Tool Rendering](https://learn.microsoft.com/en-us/agent-framework/integrations/ag-ui/backend-tool-rendering) — **Verified 2026-04** (backend tool streaming, ApprovalRequiredAIFunction C#, @tool(approval_mode) Python, TOOL_CALL_* events)
|
||||
4. [AG-UI Backend Tool Rendering](https://learn.microsoft.com/en-us/agent-framework/integrations/ag-ui/backend-tool-rendering) — **Verified (MCP 2026-04)** — AIFunctionFactory.Create() med serializerOptions for komplekse typer (C#), @tool decorator med Annotated/Field (Python), TOOL_CALL_START/ARGS/END/RESULT events, FunctionCallContent/.Arguments og FunctionResultContent/.Result (C#), klasse-baserte tools-moenster (Python)
|
||||
5. [Azure OpenAI Assistants Function Calling](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/assistant-functions) — **Verified 2026-02**
|
||||
6. [Structured Outputs](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/structured-outputs) — **Verified 2026-02**
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue