Skip to content

API Reference parrot.integrations.msagentsdk.models

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.integrations.msagentsdk.models

View source

Data models for Microsoft 365 Agents SDK bot configuration.

Class MSAgentIntegrationConfig

Configuration for a full-featured Microsoft Agents SDK bot exposed via kind: msagent entries in integrations_bots.yaml.

Extends the minimal MSAgentSDKConfig surface with a CredentialBroker (built from the inline credentials list), O365 OAuth2 SSO/OBO infrastructure, and an automatic A2A companion surface (sharing the same broker). Use to_msagentsdk_config() to obtain the inner MSAgentSDKConfig consumed by MSAgentSDKWrapper.

Parameter Type Default Description
name str
chatbot_id str
kind str 'msagent'
microsoft_app_id Optional[str] None
microsoft_app_password Optional[str] None
microsoft_tenant_id Optional[str] None
anonymous_auth bool False
api_key Optional[str] None
api_key_header str 'x-api-key'
app_type str 'SingleTenant'
authority Optional[str] None
welcome_message Optional[str] None
system_prompt_override Optional[str] None
endpoint Optional[str] None
oauth_connections Dict[str, str] dict()
obo_scopes Dict[str, List[str]] dict()
url Optional[str] None
tags List[str] list()
output_mode str 'text'
enable_credential_broker bool False
credentials List[Dict[str, Any]] list()
o365_client_id Optional[str] None
o365_client_secret Optional[str] None
o365_tenant_id Optional[str] None
redirect_uri Optional[str] None
jwt_secret Optional[str] None
debug bool False

Fields:

Field Type Default Description
name str Agent name (used as key in YAML and for env var fallback prefix).
chatbot_id str ID/name of the bot in BotManager (used with get_bot()).
kind str 'msagent' Integration type discriminator — always "msagent".
microsoft_app_id Optional[str] None Microsoft App ID / Azure AD application (client) ID. Forwarded to MSAgentSDKConfig.client_id.
microsoft_app_password Optional[str] None Microsoft App password / Azure AD client secret. Forwarded to MSAgentSDKConfig.client_secret.
microsoft_tenant_id Optional[str] None Azure AD tenant ID for single-tenant apps. Forwarded to MSAgentSDKConfig.tenant_id.
anonymous_auth bool False If True, skip JWT validation (local dev only).
api_key Optional[str] None Shared secret for API-Key inbound auth.
api_key_header str 'x-api-key' Header name that carries api_key.
app_type str 'SingleTenant' Azure AD application type — "SingleTenant" or "MultiTenant".
authority Optional[str] None Explicit OAuth authority override.
welcome_message Optional[str] None Message sent when a new member joins.
system_prompt_override Optional[str] None Override the agent's default system prompt.
endpoint Optional[str] None Custom messaging route path override.
oauth_connections Dict[str, str] field(default_factory=dict) Maps tool name to Azure Bot OAuth connection name.
obo_scopes Dict[str, List[str]] field(default_factory=dict) Maps tool name to a list of OBO target scopes.
url Optional[str] None Public base URL for the automatic A2A companion surface.
tags List[str] field(default_factory=list) Tags describing the agent, surfaced in the companion AgentCard.
output_mode str 'text'
enable_credential_broker bool False If True, build a CredentialBroker from credentials and pass it to MSAgentSDKWrapper and the A2A companion.
credentials List[Dict[str, Any]] field(default_factory=list) Inline list of provider credential dicts (raw, parsed into ProviderCredentialConfig at startup time).
o365_client_id Optional[str] None Azure AD application (client) ID for O365 OAuth2 SSO.
o365_client_secret Optional[str] None Azure AD client secret for O365 OAuth2 SSO.
o365_tenant_id Optional[str] None Azure AD tenant ID for O365 OAuth2 SSO.
redirect_uri Optional[str] None OAuth2 redirect URI for the O365 SSO flow.
jwt_secret Optional[str] None Shared secret for JWT auth on the A2A companion surface.
debug bool False If True, enable verbose debug logging for this bot.

Method MSAgentIntegrationConfig.from_dict

Create config from dictionary (YAML parsed data).

from_dict(name: str, data: Dict[str, Any]) -> MSAgentIntegrationConfig

Parameter Type Default Description
name str Agent name used as YAML key and env var prefix.
data Dict[str, Any] Parsed YAML dictionary for this agent.

Returns: MSAgentIntegrationConfig — Fully initialised MSAgentIntegrationConfig instance.

Method MSAgentIntegrationConfig.to_msagentsdk_config

Convert to the inner MSAgentSDKConfig used by MSAgentSDKWrapper.

to_msagentsdk_config() -> MSAgentSDKConfig

Returns: MSAgentSDKConfig — MSAgentSDKConfig populated from the MS Agent SDK fields of this config.

Class MSAgentSDKConfig

Configuration for a single agent exposed via Microsoft 365 Agents SDK.

Supports two authentication modes:

  • Azure AD (production): provide client_id, client_secret, and tenant_id (or rely on env var fallback).
  • Anonymous (local development): set anonymous_auth = True and omit Azure AD credentials.
Parameter Type Default Description
name str
chatbot_id str
client_id Optional[str] None
client_secret Optional[str] None
tenant_id Optional[str] None
anonymous_auth bool False
api_key Optional[str] None
api_key_header str 'x-api-key'
app_type str 'SingleTenant'
authority Optional[str] None
kind str 'msagentsdk'
welcome_message Optional[str] None
system_prompt_override Optional[str] None
endpoint Optional[str] None
oauth_connections Dict[str, str] dict()
obo_scopes Dict[str, List[str]] dict()
enable_semantic_cards bool True
max_table_rows int 50
max_card_bytes int 25000

Fields:

Field Type Default Description
name str Agent name (used as key in YAML and for env var fallback prefix).
chatbot_id str ID/name of the bot in BotManager (used with get_bot()).
client_id Optional[str] None Microsoft App ID / Azure AD application (client) ID.
client_secret Optional[str] None Microsoft App password / Azure AD client secret.
tenant_id Optional[str] None Azure AD tenant ID for single-tenant apps; None for multi-tenant.
anonymous_auth bool False If True, skip JWT validation. Use only for local development; never in production.
api_key Optional[str] None Shared secret for API-Key inbound auth. When set, the wrapper accepts a request carrying this value in api_key_header (in addition to Bot Framework JWTs). Needed for Copilot Studio's "Microsoft 365 Agents SDK" connection, which does NOT accept the "None" auth option — it requires API Key or OAuth 2.0. The bot still needs its Azure AD credentials to authenticate the OUTBOUND reply.
api_key_header str 'x-api-key' Header name that carries api_key (default "x-api-key"). Must match the header configured in Copilot's "API Key" connection auth.
app_type str 'SingleTenant' Azure AD application type — "SingleTenant" (default) or "MultiTenant". This drives the OUTBOUND token authority: a multi-tenant Bot Framework app must mint its reply token against the botframework.com authority (not the bot's home tenant), or the Bot Connector rejects the reply with HTTP 401 (Teams especially).
authority Optional[str] None Explicit OAuth authority override. When unset it is derived from app_type/tenant_id. Set this only for sovereign clouds or non-standard setups.
kind str 'msagentsdk' Integration type discriminator — always "msagentsdk".
welcome_message Optional[str] None Message sent when a new member joins the conversation.
system_prompt_override Optional[str] None Override the agent's default system prompt.
endpoint Optional[str] None Custom messaging route path to register for this bot. When unset the wrapper derives the per-bot path /api/msagentsdk/{safe_id}/messages. Set this to the Bot Framework standard "/api/messages" when the channel (Copilot Studio, Teams, the Bot Framework Emulator) is hard-wired to that endpoint. The per-bot path is always ALSO registered, so the bot stays reachable by its canonical URL regardless of this override.
oauth_connections Dict[str, str] field(default_factory=dict) Maps tool name to Azure Bot OAuth connection name for per-user token acquisition via the Bot Framework Token Service. Example: {"o365": "graph_sso", "jira": "jira_oauth"}. When empty, user-token acquisition is disabled (backward compatible).
obo_scopes Dict[str, List[str]] field(default_factory=dict) Maps tool name to a list of OBO target scopes for Microsoft-cluster APIs that require on-behalf-of token exchange. Example: {"o365": ["https://graph.microsoft.com/.default"]}. Only relevant when oauth_connections is non-empty.
enable_semantic_cards bool True If True (default), a SemanticUIResult returned by the agent (FEAT-303) is rendered as an Adaptive Card; if False, the plain-text path is always used even when the model is present.
max_table_rows int 50 Maximum number of table rows rendered in a Semantic UI table card before truncating with a "showing N of M" note (FEAT-303).
max_card_bytes int 25000 Maximum serialized Semantic UI card size in bytes; exceeding it triggers the plain-text fallback (FEAT-303).

Method MSAgentSDKConfig.from_dict

Create config from dictionary (YAML parsed data).

from_dict(name: str, data: Dict[str, Any]) -> MSAgentSDKConfig

Parameter Type Default Description
name str Agent name used as YAML key and env var prefix.
data Dict[str, Any] Parsed YAML dictionary for this agent.

Returns: MSAgentSDKConfig — Fully initialised MSAgentSDKConfig instance.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally