initial implementatiton - #91
Open
Bardemic wants to merge 14 commits into
Open
Conversation
…nd tool, store sandbox urls
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.
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.