Skip to content

Vibekit sdk v2 redesign#254

Draft
homanp wants to merge 4 commits intomainfrom
cursor/vibekit-sdk-v2-redesign-faed
Draft

Vibekit sdk v2 redesign#254
homanp wants to merge 4 commits intomainfrom
cursor/vibekit-sdk-v2-redesign-faed

Conversation

@homanp
Copy link
Collaborator

@homanp homanp commented Jan 13, 2026

Description

This PR introduces VibeKit SDK v2, a complete redesign focused on a simpler API, enhanced flexibility, and improved maintainability.

Key changes include:

  • New Package Structure: Introduction of @vibe-kit/core for shared agent logic and individual provider packages (e.g., @vibe-kit/e2b, @vibe-kit/modal). The @vibe-kit/sdk package is now deprecated.
  • Direct Agent Attachment: Agents are now properties directly on sandbox instances (e.g., sandbox.claude.run()), simplifying the mental model and usage.
  • Full Sandbox Access: Native sandbox provider methods are fully exposed, allowing users direct access without SDK wrapping.
  • On-Demand Agent Installation: Agents are installed at runtime within the sandbox, eliminating the need for Dockerfile bundling and reducing image sizes.
  • DRY Agent Implementations: Centralized agent logic in @vibe-kit/core ensures consistency and easier maintenance across all providers.
  • CLI Flags Passthrough: Enables passing raw CLI flags to agents, making the SDK future-proof for new agent features without requiring SDK updates.
  • Streaming Agent Results: AgentResult now supports both AsyncIterable for streaming events and PromiseLike for awaiting final outcomes.

This redesign aims to provide a cleaner, more intuitive, and highly extensible SDK experience.

Related Issue

Fixes #

Checklist

  • I tested my changes
  • I reviewed my own code

Open in Cursor Open in Web

This major redesign implements the new VibeKit SDK v2 architecture:

- Create @vibe-kit/core package with:
  - Type definitions (BaseSandbox, Agent, AgentResult, AgentEvent)
  - attachAgents utility to add agent capabilities to any sandbox
  - Agent implementations (Claude, Codex, Gemini, Grok, Opencode)
  - On-demand agent installation in sandboxes

- Update all provider packages with new createSandbox API:
  - @vibe-kit/e2b
  - @vibe-kit/modal
  - @vibe-kit/daytona
  - @vibe-kit/cloudflare
  - @vibe-kit/beam
  - @vibe-kit/blaxel

- New API pattern:
  const sandbox = await createSandbox({ apiKey });
  await sandbox.claude({ apiKey }).run("Build an app");

- Deprecate @vibe-kit/sdk with migration warning

- Update README with new v2 documentation

- Add tests for core package
@cursor
Copy link

cursor bot commented Jan 13, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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.

2 participants