Share via

How to attach files to code interpreter in new foundry multi-agent workflow

cheng victor 0 Reputation points
2026-02-26T13:40:51.1733333+00:00

Hi everyone,

I am working on using mult-agent worflow in new foudry to perform generate chart and data analysis.


attachments = [MessageAttachment(     file_id=file_id,     tools=[     	CodeInterpreterToolDefinition(),   ], )]

response = openai_client.responses.create(        
	conversation=conversation.id,        
	input="Could you please create bar chart in TRANSPORTATION sector for the operating profit from the uploaded csv file and provide file to me?",		
	attachment = [attachments ],        
	extra_body={"agent_reference": {"name": agent.name, "type": "agent_reference"}},   
 )

However, i am facing a problem that is create function have no parameters of attachment.

Is anyone can provide suggestion on how to upload document (.csv) to multi-agent workflow and the sub-agent ( Data Analysis Agent / Chart Generation Agent) can utilze the document for code Interpreter execution

Packages:

azure-ai-project==2.0.0b4

Cheers

Azure AI Bot Service
Azure AI Bot Service

An Azure service that provides an integrated environment for bot development.

{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.