Skip to content

feat(sdks-js): add Claude Agent SDK integration#587

Draft
toddtreece wants to merge 1 commit intografana:mainfrom
toddtreece:feat/sdks-js-claude-agent-sdk
Draft

feat(sdks-js): add Claude Agent SDK integration#587
toddtreece wants to merge 1 commit intografana:mainfrom
toddtreece:feat/sdks-js-claude-agent-sdk

Conversation

@toddtreece
Copy link
Member

Summary

  • Add Claude Agent SDK framework integration (@grafana/sigil-sdk-js/claude-agent-sdk)
  • Wrap the Agent SDK query() stream to instrument generations, tool execution, and streaming metrics
  • Detect message-level errors (model_context_window_exceeded, *_error content blocks) not surfaced by the outer SDK error field

Testing

pnpm --dir sdks/js run test:build && node --test sdks/js/test/frameworks.claude-agent-sdk.handler.test.mjs sdks/js/test/frameworks.claude-agent-sdk.mapper.test.mjs sdks/js/test/frameworks.claude-agent-sdk.wrapper.test.mjs

Add a new JS SDK framework integration for the Anthropic Claude Agent
SDK as a subpath export (@grafana/sigil-sdk-js/claude-agent-sdk).

Wrap the Agent SDK query() stream to instrument generations, tool
execution, and streaming metrics. Detect message-level errors
(model_context_window_exceeded, *_error content blocks) not surfaced
by the outer SDK error field.
@cla-assistant
Copy link

cla-assistant bot commented Mar 17, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant
Copy link

cla-assistant bot commented Mar 17, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

1 participant