You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using FoundryAgent from agent-framework==1.4.0, passing a SkillsProvider via context_providers=[skills_provider] appears to have no effect. The agent does not use any provided skill definitions at runtime.
What I’m trying to do
Have the agent execute a simple skill (cats-name) that always returns a deterministic output.
Skill definition (SKILL.md)
---name: cats-namedescription: Generate a cat's name.---
Always return 'KittyKitty'.
Steps to reproduce
Create a SkillsProvider that loads the above cats-name skill.
Construct a FoundryAgent with that provider in context_providers:
🤖 Automated triage reproduction notes(agent-authored — trust but verify)
Agent analysis
Repro: RawFoundryAgentChatClient._prepare_options() in packages/foundry/agent_framework_foundry/_agent.py:341 calls _prepare_messages_for_azure_ai(messages) which strips system/developer messages and returns extracted text as _instructions, but this value is assigned to an unused variable and never forwarded to the API request or parent _prepare_options. Minimal repro: construct RawFoundryAgentChatClient with a mock project_client, pass messages containing a system message (as SkillsProvider would inject), call _prepare_options, observe the system message content is lost. The fix should forward the extracted instructions either by preserving them in the messages passed to super()._prepare_options or by injecting them into the Foundry request body (e.g., as an 'instructions' field or in extra_body).
This is somewhat confusing but mostly expected, the FoundryAgent class is for connecting to agents already in Foundry (either prompt agents or Hosted Agents), so the expectation is that most of the logic of the agent is in Foundry, rather then locally, the only exception is that you can have function definitions that need the local callable function, which can be done, other tools are ignored because the foundry agent wouldn't know how to deal with them. ContextProviders are a generic concept that can be used for many things, some that do make sense but some that don't when using FoundryAgent (for instance you do want to add additional context into the messages, or store the conversation somewhere), but context providers that add tools, like the SkillsProvider, will not work as expected unless the Foundry agent already knows about those tools.
Activity
github-actions commentedon May 15, 2026
🤖 Automated triage reproduction notes (agent-authored — trust but verify)
Agent analysis
Repro: RawFoundryAgentChatClient._prepare_options() in packages/foundry/agent_framework_foundry/_agent.py:341 calls _prepare_messages_for_azure_ai(messages) which strips system/developer messages and returns extracted text as
_instructions, but this value is assigned to an unused variable and never forwarded to the API request or parent _prepare_options. Minimal repro: construct RawFoundryAgentChatClient with a mock project_client, pass messages containing a system message (as SkillsProvider would inject), call _prepare_options, observe the system message content is lost. The fix should forward the extracted instructions either by preserving them in the messages passed to super()._prepare_options or by injecting them into the Foundry request body (e.g., as an 'instructions' field or in extra_body).python/packages/foundry/tests/foundry/test_foundry_agent_skills_bug.py::test_foundry_agent_should_forward_skill_instructions_to_api1.4.01.4.0eavanvalkenburg commentedon May 21, 2026
This is somewhat confusing but mostly expected, the FoundryAgent class is for connecting to agents already in Foundry (either prompt agents or Hosted Agents), so the expectation is that most of the logic of the agent is in Foundry, rather then locally, the only exception is that you can have function definitions that need the local callable function, which can be done, other tools are ignored because the foundry agent wouldn't know how to deal with them. ContextProviders are a generic concept that can be used for many things, some that do make sense but some that don't when using FoundryAgent (for instance you do want to add additional context into the messages, or store the conversation somewhere), but context providers that add tools, like the SkillsProvider, will not work as expected unless the Foundry agent already knows about those tools.
eavanvalkenburg commentedon May 22, 2026
Closing as the docs have been updated to better explain the limitations of FoundryAgent (and we can't do anthing about those)
Document FoundryAgent (Python) capabilities and limitations (#1028)