feat(cursor_sdk): instrument Cursor agent runs - #665
Open
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit into
Open
feat(cursor_sdk): instrument Cursor agent runs#665Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit into
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit into
Conversation
Add tracing for sync and async Cursor agents, model turns, tools, usage, errors, and multimodal attachments, with versioned VCR coverage. Automatic instrumentation is preferred and must run before importing `cursor_sdk`: ```python import braintrust braintrust.auto_instrument() braintrust.init_logger(project="my-project") ``` For manual setup: ```python from braintrust.integrations.cursor_sdk import setup_cursor_sdk setup_cursor_sdk(project="my-project") ``` Custom agent classes can also be instrumented directly: ```python from braintrust.integrations.cursor_sdk import wrap_cursor_sdk_agent wrap_cursor_sdk_agent(MyAgent) ``` Requires Python >=3.10 and cursor-sdk >=1.0.25. The test matrix covers the minimum 1.0.25 release and the latest pinned release, 1.0.26.
Abhijeet Prasad (AbhiPrasad)
force-pushed
the
abhi-cursor-sdk
branch
from
August 6, 2026 15:46
1be8080 to
54f2b97
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves https://github.com/braintrustdata/braintrust-sdk-python/issues
Automatic instrumentation is preferred and must run before importing
cursor_sdk:For manual setup:
Custom agent classes can also be instrumented directly:
Requires Python >=3.10 and cursor-sdk >=1.0.25. The test matrix covers the minimum 1.0.25 release and the latest pinned release, 1.0.26.