agentops icon indicating copy to clipboard operation
agentops copied to clipboard

Fix agentops unauthorized errors and deprecated call

Open areibman opened this issue 4 months ago • 2 comments

📥 Pull Request

📘 Description Addresses AgentOps 401 Unauthorized errors and deprecation warnings by:

  • Implementing robust API key validation and loading from environment variables.
  • Migrating from the deprecated agentops.end_session() to agentops.end_trace().
  • Providing a comprehensive example script (test_agentops_auth.py) and documentation (AGENTOPS_AUTH_FIX.md) for correct AgentOps integration with CrewAI.

🧪 Testing The test_agentops_auth.py script was created and run to validate:

  • Successful AgentOps initialization and data export with a valid AGENTOPS_API_KEY.
  • Correct handling and informative error messages for missing or invalid API keys.
  • Resolution of the end_session() deprecation warning.

Open in Cursor Open in Web

areibman avatar Aug 13 '25 16:08 areibman

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch. Learn more about Cursor Agents

cursor[bot] avatar Aug 13 '25 16:08 cursor[bot]

This pull request has been automatically marked as stale because it has not had any activity in the last 14 days.

If no updates are made within 7 days, this PR will be automatically closed.

github-actions[bot] avatar Aug 28 '25 00:08 github-actions[bot]