Fix agentops unauthorized errors and deprecated call
📥 Pull Request
📘 Description
Addresses AgentOps deprecation warnings by migrating from agentops.end_session() to the modern trace-based API (agentops.start_trace() and agentops.end_trace()). Also resolves 401 Unauthorized errors by improving API key validation and providing clear guidance for setup. A fixed example (fixed_crewai_example.py) and a comprehensive guide (AGENTOPS_FIX_GUIDE.md) are included.
🧪 Testing
A test_fix.py script was created to validate:
- Correct module imports.
- Availability of modern AgentOps API functions.
- Syntax of the fixed example code.
- Absence of deprecated
end_session()and presence of new trace management functions (start_trace,end_trace,auto_start_session=False).
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
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.