Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

Implements Agent Settings API for managing agent configuration templates by type and instance-specific settings, maintaining SDK parity with Node.js PR microsoft/Agent365-nodejs#130.

Implementation

  • AgentSettingsService - Service class with async methods:

    • get_agent_setting_template / set_agent_setting_template - Manage templates by agent type
    • get_agent_settings / set_agent_settings - Manage instance-specific settings
    • Endpoint generation with URL encoding for special characters
  • Data models - Python dataclasses for type safety:

    • AgentSettingTemplate - Template configuration with agent_type, settings, optional metadata
    • AgentSettings - Instance settings with agent_instance_id, agent_type, settings, optional metadata
  • HTTP client - httpx for async operations with bearer token authentication

  • Endpoints - Power Platform API paths:

    • /agents/v1.0/settings/templates/{agentType}
    • /agents/v1.0/settings/instances/{agentInstanceId}

Usage

from microsoft_agents_a365.runtime import (
    AgentSettingsService,
    AgentSettingTemplate,
    PowerPlatformApiDiscovery,
)

service = AgentSettingsService(
    PowerPlatformApiDiscovery("prod"),
    tenant_id
)

# Manage templates
template = await service.get_agent_setting_template("my-agent-type", token)
await service.set_agent_setting_template(
    AgentSettingTemplate(
        agent_type="my-agent-type",
        settings={"key": "value"}
    ),
    token
)

# Manage instance settings
settings = await service.get_agent_settings("instance-id", token)

Testing

Added 15 unit tests covering endpoint generation, HTTP operations, error handling, and multi-cluster support.

Original prompt

This section details on the original issue you should resolve

<issue_title>[SDK Parity] Python for PR microsoft/Agent365-nodejs#130</issue_title>
<issue_description>## SDK Parity Update Required

This issue was automatically created by the AI-First Polling workflow to maintain SDK parity.

Source PR Information

Original PR: microsoft/Agent365-nodejs#130 - Add Agent Settings Service with template and instance management
PR URL: microsoft/Agent365-nodejs#130
PR Author: @app/copilot-swe-agent

PR Description

Implements the Agent Settings API for managing agent configuration templates by type and instance-specific settings.## Changes- AgentSettingsService - New service class in @microsoft/agents-a365-runtime with methods: - getAgentSettingTemplate/setAgentSettingTemplate - Manage templates by agent type - getAgentSettings/setAgentSettings - Manage settings by agent instance ID - Type definitions - AgentSettingTemplate and AgentSettings interfaces with settings as Record<string, unknown> and optional metadata- Endpoints - Constructs Power Platform API URLs: - /agents/v1.0/settings/templates/{agentType} - /agents/v1.0/settings/instances/{agentInstanceId}## Usagetypescriptimport { AgentSettingsService, PowerPlatformApiDiscovery } from '@microsoft/agents-a365-runtime';const service = new AgentSettingsService( new PowerPlatformApiDiscovery('prod'), tenantId);// Manage templatesconst template = await service.getAgentSettingTemplate('my-agent-type', token);await service.setAgentSettingTemplate({ agentType: 'my-agent-type', settings: { key: 'value' }}, token);// Manage instance settingsconst settings = await service.getAgentSettings('instance-id', token);await service.setAgentSettings({ agentInstanceId: 'instance-id', agentType: 'my-agent-type', settings: { instanceKey: 'value' }}, token);

Original prompt> Implementing the Agents Settings for NodeJS> > See attached swagger file for more information on this API.> > This currently API supports:> > GET or SET agent setting template by agent type> > GET or SET agent settings by agent instance.> > https://github.com/user-attachments/files/23107469/swagger.json
---💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Parity Task

Changes detected in: Node.js/TypeScript SDK
Target SDK: Python

Action Required

Please apply the changes described in the original PR (microsoft/Agent365-nodejs#130) to the Python SDK to maintain feature parity across all SDKs.

Before implementing:

  • First, check if this feature already exists in the Python SDK
  • If the feature is already implemented, close this issue with the wontfix label and add a comment explaining that parity already exists

For bug fixes (IMPORTANT):

  • Bug fixes require extra caution - only act if the same bug exists in the Python SDK
  • Carefully analyze whether the bug described in the original PR replicates in the target platform
  • If the bug does NOT exist in the Python SDK, close this issue with the wontfix label and explain that the bug is not present
  • Stay strictly in context - only fix the specific bug described, do not make additional changes or "improvements"
  • Do not port bug fixes that are specific to the source SDK's language or platform constraints

When creating the PR for this implementation:

  • Assign the PR to @app/copilot-swe-agent (the author of the original PR)
  • Reference this issue in the PR description
  • Ensure the PR description explains what parity changes were made

Implementation Guidelines for Python

When implementing this feature in the Python SDK:

  • Review existing code in python/libraries/ to understand the codebase structure and patterns
  • Follow the coding style, naming conventions, and architectural patterns used in the Python SDK
  • Check for configuration files (e.g., pyproject.toml, .flake8, mypy.ini) that define coding standards
  • Ensure your implementation is consistent with existing SDK components
  • Include appropriate tests following the testing patterns in the Python SDK

Related Information


This is an automated issue. Please close with wontfix label if parity is not needed.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: sergioescalera <8428450+sergioescalera@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Python implementation of Agent Settings Service Add Agent Settings Service for template and instance management Jan 5, 2026
Copilot AI requested a review from sergioescalera January 5, 2026 22:12
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.

[SDK Parity] Python for PR microsoft/Agent365-nodejs#130

2 participants