Description:
The Messages API currently supports persistent container execution with the code execution tool (code_execution_20250825), including container ID reuse, file uploads via the Files API, and retrieval of generated files 2.
This functionality is available on Microsoft Azure AI Foundry 2.
The Agent SDK provides built-in tools, including Bash for terminal commands 3, but lacks native support for the Messages API's code execution container functionality with container ID persistence.
Use Case:
I'm building agents that need to:
Execute code in persistent containers across multiple turns (maintaining state between executions)
Upload skill directories and files to containers
Retrieve generated files from container executions
Deploy on Microsoft Azure AI Foundry with container persistence
Integrate with the Microsoft Agent Framework
Current Workaround:
Currently considering wrapping the Messages API client as a custom tool in the Agent SDK, but this approach may not maintain the same container lifecycle guarantees or integrate cleanly with the Agent SDK's architecture.
Requested Feature:
Add native support for the code execution tool's container functionality to the Agent SDK, including:
Container ID persistence across agent turns
File upload capabilities (via Files API integration)
Generated file retrieval
Full compatibility with Microsoft Azure AI Foundry deployments 7
Benefits:
Enables stateful code execution in Agent SDK workflows
Provides feature parity between Messages API and Agent SDK
Simplifies integration with Microsoft Agent Framework
Reduces need for custom workarounds that may not maintain proper container lifecycle
Additional Context:
Microsoft Agent Framework is already implementing support for code_execution_[2] (https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)02508252, and native Agent SDK support would enable better integration patterns for enterprise deployments on Azure.
microsoft/agent-framework#4339
Description:
The Messages API currently supports persistent container execution with the code execution tool (code_execution_20250825), including container ID reuse, file uploads via the Files API, and retrieval of generated files 2.
This functionality is available on Microsoft Azure AI Foundry 2.
The Agent SDK provides built-in tools, including Bash for terminal commands 3, but lacks native support for the Messages API's code execution container functionality with container ID persistence.
Use Case:
I'm building agents that need to:
Execute code in persistent containers across multiple turns (maintaining state between executions)
Upload skill directories and files to containers
Retrieve generated files from container executions
Deploy on Microsoft Azure AI Foundry with container persistence
Integrate with the Microsoft Agent Framework
Current Workaround:
Currently considering wrapping the Messages API client as a custom tool in the Agent SDK, but this approach may not maintain the same container lifecycle guarantees or integrate cleanly with the Agent SDK's architecture.
Requested Feature:
Add native support for the code execution tool's container functionality to the Agent SDK, including:
Container ID persistence across agent turns
File upload capabilities (via Files API integration)
Generated file retrieval
Full compatibility with Microsoft Azure AI Foundry deployments 7
Benefits:
Enables stateful code execution in Agent SDK workflows
Provides feature parity between Messages API and Agent SDK
Simplifies integration with Microsoft Agent Framework
Reduces need for custom workarounds that may not maintain proper container lifecycle
Additional Context:
Microsoft Agent Framework is already implementing support for code_execution_[2] (https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)02508252, and native Agent SDK support would enable better integration patterns for enterprise deployments on Azure.
microsoft/agent-framework#4339