Skip to content

initial implementatiton - #91

Open
Bardemic wants to merge 14 commits into
mainfrom
claude/migrate-vercel-zed-acp-96exC
Open

initial implementatiton#91
Bardemic wants to merge 14 commits into
mainfrom
claude/migrate-vercel-zed-acp-96exC

Conversation

@Bardemic

Copy link
Copy Markdown
Owner

No description provided.

Bardemic and others added 13 commits January 14, 2026 18:12
Major changes:
- Install @agentclientprotocol/sdk and @zed-industries/claude-code-acp
- Create ACPClient wrapper class for managing Claude Code agent connections
- Update runAgentLLM and runOrchestratorAgentLLM to use ACP instead of Vercel AI SDK
- Add ANTHROPIC_API_KEY to required environment variables
- Support image handling through ACP ContentBlock format
- Switch from OpenAI models to Claude Sonnet 4.5 via ACP

The main agent workflow now uses Claude Code via Zed's ACP adapter,
providing access to Claude's capabilities through the Agent Client Protocol.
Images are properly supported using the ACP image content blocks.

Note: Vercel AI SDK dependencies remain for backward compatibility with
utility functions (generateTitle) and Slack agent integration.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

This commit properly migrates from Vercel AI SDK to Anthropic SDK
without running any local agent processes.

Major Changes:
- Replace ACP local agent approach with direct Anthropic API calls
- Install @anthropic-ai/sdk package
- Create AnthropicClient wrapper class in src/utils/anthropic.ts
- Update runAgentLLM and runOrchestratorAgentLLM to use Anthropic SDK
- Keep ALL existing custom tools (sandbox, browser, GitHub, PostHog, etc.)
- Implement automatic multi-turn tool calling loop
- Support images via Anthropic's ImageBlockParam format
- Switch to claude-sonnet-4-5-20250929 model

Architecture:
- Direct API calls to Anthropic (no local processes)
- Existing tool infrastructure preserved (sandboxTools, browserTools, etc.)
- Tools transformed from Vercel AI SDK format to Anthropic format
- Automatic tool execution with proper error handling
- Real-time updates via PostHog integration
- Accurate token usage tracking

Benefits over previous approach:
- No local claude-code-acp process required
- Uses existing, proven tool implementations
- Simpler architecture - just API calls
- Full control over tool execution and permissions
- Proper TypeScript type safety

The system now calls Claude API directly while using all your custom
tools exactly as they were designed to work.
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