Skip to content

Conversation

areibman
Copy link
Contributor

📥 Pull Request

📘 Description
Updated AgentOps documentation examples to reflect current SDK API usage, specifically:

  • Replaced agentops.trace(...) used as a context manager with agentops.start_trace(...) to resolve AttributeError.
  • Migrated deprecated agentops.start_session()/agentops.end_session() patterns to agentops.start_trace() context managers.
  • Corrected @agentops.trace decorator import and usage.
  • Aligned tag examples with default_tags at init and tags in start_trace.
    These changes ensure documentation accurately guides users on AgentOps tracing and session management.

🧪 Testing
The changes are documentation updates to align with the current AgentOps SDK API. The fix for the AttributeError was derived from understanding the SDK's intended usage of agentops.trace (decorator) vs. agentops.start_trace (context manager). The updated examples reflect the correct and tested patterns for AgentOps integration.


Open in Cursor Open in Web

…epts

Co-authored-by: alex <alex@agentops.ai>
Copy link

cursor bot commented Aug 15, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants