-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 Error During Agent Handoff in Multi-Agent System #206
Comments
I was not able to reproduce your error. I think you maybe edited the example? I updated Are you able to provide a different repo, ideally one I can copy paste and run without edits? |
I'm running into a similar issue where the FileSearchTool returns a 404 when continuing a conversation. The logs show a POST to https://api.openai.com/v1/responses returning a 404 with the error:
I've traced it down to our organization's Zero-Data Retention (ZDR) policy. When using an API key with ZDR, the item isn’t created, leading to the error. The same behavior can be reproduced using the Responses API directly via the playground. I've also verified that API keys from an account without ZDR don't reproduce the issue. Maybe we could add a custom handler for the InputMessage transformation to ignore / transform certain messages, which might help bypass cases where ZDR impacts item creation. Any thoughts on this approach? Love the library btw! |
@MoyezM do you have a simple repro case? I'd like to debug that! |
Yup! Here you go! async def reproduce_404(vector_store_id: str):
agent = Agent(
name="404Repro",
instructions="Test Agent",
tools=[
FileSearchTool(vector_store_ids=[vector_store_id]),
],
)
run = await Runner.run(agent, "What files are in the vector store?")
input_list = run.to_input_list()
input_list.append(
{
"type": "message",
"role": "user",
"content": "Read the files in the vector store",
}
)
run = await Runner.run(agent, input_list)
print(run.raw_responses)
|
hi @rm-openai, I fixed the issue above by changing my api_key, thanks for your help! But sadly I came across another bug which tells:
It seems like I cannot combine a ComputerAgent with SearchAgent, I'm a bit confused... Here I created another script to reproduce my case: from computers import DockerComputer
from agents import (
Agent,
ComputerTool,
ModelSettings,
Runner,
WebSearchTool,
)
with DockerComputer() as computer:
computer_agent = Agent(
name="Computer Agent",
instructions="You are a real user computer agent, which means that you are connected to a real user's computer and granted full access to it. Your task is to help transfer the user's instructions to the computer and do the actions on the computer iteratively to finish the task. Also, you can handoff the task to the Search Agent as needed if you need to do online information retrieval.",
tools=[ComputerTool(computer)],
model="computer-use-preview",
model_settings=ModelSettings(truncation="auto"),
handoff_description="A real user computer environment to do GUI actions.",
)
search_agent = Agent(
name="Search Agent",
instructions="You are a searching agent connected to the Internet, you can help do information retrieval to gather useful information for the user's instruction. However, you cannot do any GUI actions on the computer unless you handoff the task to the Computer Agent.",
tools=[WebSearchTool(user_location={"type": "approximate", "city": "New York"})],
handoff_description="A search engine to do retrival actions.",
)
computer_agent.handoffs.append(search_agent)
search_agent.handoffs.append(computer_agent)
triage_agent = Agent(
name="Triage Agent",
instructions="You are a general digital agent. Your task is to help understand the user's instructions and help execute the task in a real computer environment, which is controlled by the Computer Agent. You can break down the task into smaller steps and delegate the steps to the corresponding agents. Remember always ground the task into the real computer environment by assigning the Computer Agent to do the actions. You can handoff the task to the Search Agent as needed if you need to do online information retrieval. But ALWAYS remember: you can only handoff the sub-task to one Agent at a time, which means you cannot handoff the task to both Computer Agent and Search Agent at the same time.",
handoffs=[computer_agent, search_agent],
)
async def main():
result = await Runner.run(
triage_agent,
input="help me search for the NBA finals result of last 5 years and then write the results in a new markdown file using MarkText, save it as 'NBA.md'",
)
print(result)
if __name__ == "__main__":
import asyncio
asyncio.run(main()) Could you please help me solve this? |
Please read this first
Describe the bug
During execution of a multi-agent task, our system encountered a critical 404 error when attempting to process a function call between agents. The error occurred specifically when the General Agent tried to hand off to the Search Agent to find NBA finals results.
Debug information
v0.0.4
Log
Repro steps
Call Flow
User requested: "can you help me search for the NBA finals result of last 5 years and then write the results in a new markdown file using MarkText, save it as "NBA.md""
General Agent correctly determined this required both search capabilities and computer interaction
General Agent attempted to make parallel tool calls:
transfer_to_search_agent (ID: fc_67d876754b2c8191bec6637d6c64a8d70ca151ec7ca34d36)
transfer_to_computer_agent (ID: fc_67d87675a94c81918773f9919a2b10b30ca151ec7ca34d36)
When processing these calls, the system attempted to retrieve the function call by ID, but received a 404 error
Expected Behavior
The handoff between agents should occur without any 404 errors. Function calls should remain accessible throughout the entire processing cycle.
The text was updated successfully, but these errors were encountered: