Fixes #227: Add Vercel AI SDK Integration Example#248
Conversation
Adds a practical example demonstrating how to integrate the Jules TypeScript SDK with the Vercel AI SDK. Includes a basic application showing how an AI model can delegate a coding task to a Jules session using the Tool API. Fixes #227 Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Updates the previous Vercel AI SDK integration example to follow Agent DX best practices. - Wraps the AI integration in a `citty` CLI supporting human text and machine-readable JSON outputs. - Adopts the `@ai-sdk/google` provider using `gemini-3.1-flash-lite-preview`. - Refactors the Jules `tool` into a rigorous Typed Service Contract (spec/handler boundary) for explicit parsing and error handling. Fixes #227 Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Refactors the `ai-sdk` Agent CLI example to adhere strictly to scalable design patterns. - Extracts API integration to `src/services/agent.ts`. - Extracts CLI flag handling and rendering to `src/commands/start.ts`. - Updates `src/cli.ts` to be a minimal root entrypoint that lazily registers commands, preventing merge conflicts as the CLI scales. Fixes #227 Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Improves the ai-sdk CLI example by adhering directly to Agent DX best practices outlined by Justin Poehnelt. - **Input Hardening**: Upgrades the Zod tool specification to proactively block hallucinated or adversarial inputs (control characters, URL-encoded strings, path traversals). - **Dry-Run Validation**: Introduces a `--dry-run` flag via `citty`, plumbing it through the LLM system prompt and short-circuiting real Jules sessions. - **Agent Context Docs**: Adds a `CONTEXT.md` explicitly defining operating invariants (formatting, mutations, schema rules) for integrating agents. Fixes #227 Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Adds a practical example demonstrating how to integrate the Jules TypeScript SDK with the Vercel AI SDK.
Includes a basic application showing how an AI model can delegate a coding task to a Jules session using the
toolAPI andgenerateText. Updates thepackages/core/README.mdto link to the new example.Fixes #227
PR created automatically by Jules for task 9809600208710944803 started by @davideast