agentops icon indicating copy to clipboard operation
agentops copied to clipboard

[Bug]: Sessions not detected with CrewAI + Azure OpenAI endpoints

Open applisi-dla opened this issue 9 months ago • 3 comments

Contact Details

[email protected]

📦 Package Version

0.4.5

🎞️ Framework Version

0.108.0

🔎 Describe the Bug

Im using a CrewAI Flow with Agents using Azure openAI models (gpt-4o)

main.py ->

load_dotenv()
agentops.init(
    api_key="API_KEY",
    default_tags=['crewai']
)

The sessions are not recorded at all

🤝 Contribution

  • [ ] Yes, I'd be happy to submit a pull request with these changes.
  • [ ] I need some guidance on how to contribute.
  • [ ] I'd prefer the AgentOps team to handle this update.

applisi-dla avatar Apr 02 '25 09:04 applisi-dla

Hey @applisi-dla -- 2 questions:

  • Does an AgentOps url appear in the terminal when you run your script?
  • Does this work with models other than Azure OpenAI?

areibman avatar Apr 02 '25 18:04 areibman

I am also facing this issue, and I am using the standard OpenAI endpoint. The URL was present in previous versions of AgentOps, but it is no longer showing in the AgentOps dashboard after updating to the latest version.

devamalreizend avatar Apr 04 '25 09:04 devamalreizend

I looked into this and found that the AgentOps listener in CrewAI attempts to create a new session during the CrewKickoffStartedEvent, but it requires the AgentOps API key to be present in the environment or explicitly passed. Additionally, it appears a session had already been initialized earlier.

fenilfaldu avatar Apr 06 '25 21:04 fenilfaldu