-
-
Notifications
You must be signed in to change notification settings - Fork 937
Added Claude Agent SDK guide and examples #2803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
WalkthroughThis PR adds documentation for integrating the Claude Agent SDK with Trigger.dev: a setup guide (docs/guides/ai-agents/claude-code-trigger.mdx) and two example-project pages (claude-changelog-generator.mdx and claude-github-wiki.mdx). It updates the AI Agents overview and introduction guides to reference the new content and modifies docs/docs.json by consolidating multi-line JSON arrays into single-line arrays and adding the new page entries. No runtime code changes or public API alterations are included. Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
docs/docs.json(13 hunks)docs/guides/ai-agents/claude-code-trigger.mdx(1 hunks)docs/guides/ai-agents/overview.mdx(2 hunks)docs/guides/example-projects/claude-changelog-generator.mdx(1 hunks)docs/guides/example-projects/claude-github-wiki.mdx(1 hunks)docs/guides/introduction.mdx(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,jsx,tsx,json,md,css,scss}
📄 CodeRabbit inference engine (AGENTS.md)
Format code using Prettier
Files:
docs/docs.json
🧠 Learnings (5)
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks
Applied to files:
docs/guides/ai-agents/claude-code-trigger.mdx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties
Applied to files:
docs/guides/ai-agents/claude-code-trigger.mdx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk/v3` with Zod schema for payload validation
Applied to files:
docs/guides/ai-agents/claude-code-trigger.mdx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger.config.ts : Configure OpenTelemetry instrumentations and exporters in trigger.config.ts for enhanced logging
Applied to files:
docs/guides/ai-agents/claude-code-trigger.mdx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Generate example payloads for tasks when possible
Applied to files:
docs/guides/introduction.mdx
🪛 GitHub Actions: 📚 Docs Checks
docs/guides/ai-agents/claude-code-trigger.mdx
[error] 1-1: Broken link detected: '/dashboard/overview' in guides/ai-agents/claude-code-trigger.mdx. Command 'npx mintlify@4.0.393 broken-links' exited with code 1.
🪛 LanguageTool
docs/guides/example-projects/claude-changelog-generator.mdx
[grammar] ~33-~33: Use a hyphen to join words.
Context: ...or" > Click here to view the full open source code for this project in our exam...
(QB_NEW_EN_HYPHEN)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Mintlify Deployment
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (7)
docs/guides/example-projects/claude-github-wiki.mdx (1)
69-82: LGTM!The trigger.config.ts example correctly demonstrates marking the Claude Agent SDK as external, which is necessary for proper bundling behavior.
docs/guides/introduction.mdx (1)
31-31: LGTM!The additions of Claude Agent SDK guide entry and example projects are properly formatted and correctly reference the new documentation pages added in this PR.
Also applies to: 55-56
docs/guides/example-projects/claude-changelog-generator.mdx (1)
71-84: LGTM!The trigger.config.ts configuration correctly demonstrates the necessary setup for the Claude Agent SDK, including marking it as external and appropriate resource allocation settings.
docs/guides/ai-agents/overview.mdx (1)
7-62: LGTM!The reorganization into "Example projects using AI agents" and "Agent fundamentals" sections improves the documentation structure. The new Claude-related example project cards are properly formatted and reference the correct paths.
docs/docs.json (2)
298-298: LGTM!The additions of claude-code-trigger guide and the two new example projects (claude-changelog-generator and claude-github-wiki) are correctly placed in the navigation structure and align with the new documentation pages added in this PR.
Also applies to: 306-306, 353-354
13-13: Formatting improvement noted.The reformatting of JSON arrays to single-line format is consistent with Prettier formatting guidelines and improves readability for simple arrays.
docs/guides/ai-agents/claude-code-trigger.mdx (1)
108-108: Model identifier is correct.The identifier
claude-sonnet-4-20250514matches Anthropic's official API, which lists Claude Sonnet 4 with the id "claude-sonnet-4-20250514". No change required.
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/guides/ai-agents/claude-code-trigger.mdx(1 hunks)docs/guides/example-projects/claude-github-wiki.mdx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/guides/example-projects/claude-github-wiki.mdx
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `trigger.dev/sdk/v3` for all imports in Trigger.dev tasks
Applied to files:
docs/guides/ai-agents/claude-code-trigger.mdx
📚 Learning: 2025-11-27T16:27:35.304Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `task()` function from `trigger.dev/sdk/v3` to define tasks with id and run properties
Applied to files:
docs/guides/ai-agents/claude-code-trigger.mdx
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: The SDK at packages/trigger-sdk is an isomorphic TypeScript SDK
Applied to files:
docs/guides/ai-agents/claude-code-trigger.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
docs/guides/ai-agents/claude-code-trigger.mdx (2)
79-112: Well-structured agent task with proper error handling.The code example demonstrates good practices:
- Proper signal handling for cancellation via AbortController
- Resource cleanup with try/finally ensuring temp directory removal
- Appropriate logging for debugging
- Correct async iteration pattern for agent messages
92-92: No action needed. The model identifier"claude-sonnet-4-20250514"is a valid and currently supported Claude model.
No description provided.