Skip to content

Fixes #227: Add Vercel AI SDK Integration Example#248

Merged
davideast merged 4 commits intomainfrom
fix/issue-227-ai-sdk-example-9809600208710944803
Mar 10, 2026
Merged

Fixes #227: Add Vercel AI SDK Integration Example#248
davideast merged 4 commits intomainfrom
fix/issue-227-ai-sdk-example-9809600208710944803

Conversation

@davideast
Copy link
Collaborator

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 and generateText. Updates the packages/core/README.md to link to the new example.

Fixes #227


PR created automatically by Jules for task 9809600208710944803 started by @davideast

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>
@google-labs-jules
Copy link
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions github-actions bot added the fleet-merge-ready Ready for fleet sequential merge label Mar 10, 2026
@github-actions github-actions bot added this to the Examples milestone Mar 10, 2026
davideast and others added 3 commits March 10, 2026 00:58
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>
@davideast davideast merged commit aec184a into main Mar 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet-merge-ready Ready for fleet sequential merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet Execution] [Vercel AI SDK Integration Example]

1 participant