Skip to content

Conversation

@melionel
Copy link
Contributor

Corrected the phrasing for registering the subscription with the preview feature in Azure Portal.

Corrected the phrasing for registering the subscription with the preview feature in Azure Portal.
Comment on lines +7 to +10
await AgentServerApplication.RunAsync(new ApplicationOptions(
ConfigureServices: services => services.AddSingleton<IAgentInvocation, SystemUtilityAgentInvocation>(),
TelemetrySourceName: "SystemUtilityAgent"
)).ConfigureAwait(false);
Copy link
Contributor

@iuiaoin iuiaoin Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the .NET version of adapter sample usage is like:

var agent = new ChatClientAgent(chatClient,
      name: "AgentWithHostedMCP",
      instructions: @"You are a helpful assistant with access to tools for fetching Microsoft documentation.

  IMPORTANT: When the user asks about Microsoft Learn articles or documentation:
  1. You MUST use the microsoft_docs_fetch tool to retrieve the actual content
  2. Do NOT rely on your training data
  3. Always fetch the latest information from the provided URL

  Available tools:
  - microsoft_docs_fetch: Fetches and converts Microsoft Learn documentation
  - microsoft_docs_search: Searches Microsoft/Azure documentation
  - microsoft_code_sample_search: Searches for code examples")
      .AsBuilder()
      .UseFoundryTools(FoundryConnectedTool.Mcp(toolConnectionId))
      .UseOpenTelemetry(sourceName: "Agents", configure: (cfg) => cfg.EnableSensitiveData = true)
      .Build();

// Run agent with tool support using ToolDefinition objects
await agent.RunAIAgentAsync(telemetrySourceName: "Agents");

Is SystemUtilityAgentInvocation an existing built-in AgentInvocation, or do I need to implement it myself? I was trying running this sample locally, but I couldn’t find SystemUtilityAgentInvocation in the codebase ('SystemUtilityAgentInvocation' could not be found).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JC-386 JC-386 merged commit 42b1200 into microsoft-foundry:main Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants