I’m having trouble with the Azure AI Agent Service. Everything works fine when I just ask the AI to do simple tasks. But when I try to make it create a file or upload one, it gets stuck.
Here’s what happens:
- I run the agent like normal
- When it gets to the part where it’s supposed to process the run, it just sits there
- After exactly 10 minutes, it says the run expired
I’ve tried different AI models and locations, but I get the same problem. It’s weird because if I ask it to “Generate a joke”, it works great. But if I say “Generate a joke and save it to a file”, it freezes up.
I’m using Python 3.12.8 and the latest version of azure-ai-projects (1.0.0b4). Has anyone else run into this? Any ideas on how to fix it?
Here’s a simple code example of what’s not working:
from azure.ai.projects import ProjectsClient
client = ProjectsClient(endpoint, key)
agent = client.agents.create(name="FileWriter", description="Writes files")
thread = client.threads.create()
run = client.agents.create_and_process_run(
thread_id=thread.id,
assistant_id=agent.id,
messages=[{"role": "user", "content": "Write 'Hello World' to a file named greeting.txt"}]
)
print(f"Run status: {run.status}")
This just hangs for 10 minutes before failing. Any help would be awesome!