An open-source desktop chat application powered by Claude Agent SDK and Composio Tool Router. Build AI agents with access to 500+ tools and persistent chat sessions.
- Multi-Provider Support - Choose between Claude Agent SDK and Opencode for different model options
- Claude Agent SDK Integration - Full agentic capabilities with tool use and multi-turn conversations
- Opencode SDK Support - Access multiple LLM providers (Claude, GPT-5, Grok, GLM, MiniMax, and more)
- Composio Tool Router - Access to 500+ external tools (Gmail, Slack, GitHub, Google Drive, and more)
- Persistent Chat Sessions - Conversations maintain context across messages using SDK session management
- Multi-Chat Support - Create and switch between multiple chat sessions
- Real-time Streaming - Server-Sent Events (SSE) for smooth, token-by-token response streaming
- Tool Call Visualization - See tool inputs and outputs in real-time in the sidebar
- Progress Tracking - Todo list integration for tracking agent task progress
- Modern UI - Clean, dark-themed interface inspired by Claude.ai
- Desktop App - Native Electron application for macOS, Windows, and Linux
| Category | Technology |
|---|---|
| Desktop Framework | Electron.js |
| Backend | Node.js + Express |
| AI Providers | Claude Agent SDK + Opencode SDK |
| Tool Integration | Composio Tool Router + MCP |
| Streaming | Server-Sent Events (SSE) |
| Markdown | Marked.js |
| Styling | Vanilla CSS |
# Clone the repository
git clone https://github.com/ComposioHQ/open-claude-cowork.git
cd open-claude-cowork
# Run the automated setup script
./setup.shThe setup script will:
- Install Composio CLI if not already installed
- Guide you through Composio signup/login
- Configure your API keys in
.env - Install all project dependencies
If you prefer manual setup, follow these steps:
- Node.js 18+ installed
- For Claude Provider:
- Anthropic API key (console.anthropic.com)
- For Opencode Provider:
- Opencode API key (opencode.dev)
- Composio API key (app.composio.dev)
git clone https://github.com/ComposioHQ/open-claude-cowork.git
cd open-claude-cowork# Install Electron app dependencies
npm install
# Install backend dependencies
cd server
npm install
cd ..cp .env.example .envEdit .env with your API keys:
# Claude Provider
ANTHROPIC_API_KEY=your-anthropic-api-key
# Opencode Provider (optional)
OPENCODE_API_KEY=your-opencode-api-key
OPENCODE_HOSTNAME=127.0.0.1
OPENCODE_PORT=4096
# Composio Integration
COMPOSIO_API_KEY=your-composio-api-keyProvider Selection:
- The app allows switching between Claude and Opencode providers in the UI
- Only configure the API key(s) for the provider(s) you want to use
- Opencode can route to multiple model providers through a single SDK
You need two terminal windows:
Terminal 1 - Backend Server:
cd server
npm startTerminal 2 - Electron App:
npm start┌─────────────────────────────────────────────────────────────────┐
│ Electron App │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Main Process │ │ Renderer Process │ │
│ │ (main.js) │ │ (renderer.js) │ │
│ └────────┬────────┘ └────────┬─────────┘ │
│ │ │ │
│ └──────────┬───────────┘ │
│ │ IPC (preload.js) │
└──────────────────────┼───────────────────────────────────────────┘
│
│ HTTP + SSE
▼
┌─────────────────────────────────────────────────────────────────┐
│ Backend Server │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Express.js │───▶│ Claude Agent SDK │ │
│ │ (server.js) │ │ + Session Mgmt │ │
│ └─────────────────┘ └────────┬─────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────┐ │
│ │ Composio Tool Router │ │
│ │ (MCP Server) │ │
│ └─────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
The app uses Claude Agent SDK's built-in session management:
- First message creates a new session, returning a
session_id - Subsequent messages use
resumeoption with the stored session ID - Full conversation context is maintained server-side
Composio Tool Router provides MCP server integration:
- Tools are authenticated per-user via Composio dashboard
- Available tools include Google Workspace, Slack, GitHub, and 500+ more
- Tool calls are streamed and displayed in real-time
The application supports multiple AI providers through a pluggable provider system:
- Uses Anthropic's Claude Agent SDK
- Available models:
- Claude Opus 4.5 (claude-opus-4-5-20250514)
- Claude Sonnet 4.5 (claude-sonnet-4-5-20250514) - default
- Claude Haiku 4.5 (claude-haiku-4-5-20250514)
- Session management via built-in SDK session tracking
- Direct streaming from Claude API
- Routes to multiple LLM providers through a single SDK
- Available models:
opencode/big-pickle- Free reasoning model (default)opencode/gpt-5-nano- OpenAI's reasoning modelsopencode/glm-4.7-free- Zhipu GLM modelsopencode/grok-code- xAI Grok for codingopencode/minimax-m2.1-free- MiniMax modelsanthropic/*- Claude models through Opencode
- Event-based streaming with real-time part updates
- Session management per chat conversation
- Extended thinking support (reasoning parts)
Streaming Implementation: Both providers use Server-Sent Events (SSE) for streaming responses:
- Backend: Express server streams normalized chunks via HTTP
- Frontend: Real-time processing with markdown rendering
- Tool calls: Inline display with input/output visualization
Important: Opencode requires MCP servers to be configured in server/opencode.json
The application automatically updates this file when starting:
- Composio session is created on first request with MCP URL
- Backend writes the MCP config to
server/opencode.json - Opencode reads the config file and loads MCP tools
File: server/opencode.json
{
"mcp": {
"composio": {
"type": "remote",
"url": "https://backend.composio.dev/tool_router/YOUR_ROUTER_ID/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}Note: Don't manually edit this file - it's generated automatically by the backend. The placeholders are replaced with real credentials from your Composio session.
open-claude-cowork/
├── main.js # Electron main process
├── preload.js # IPC security bridge
├── renderer/
│ ├── index.html # Chat interface
│ ├── renderer.js # Frontend logic & streaming handler
│ └── style.css # Styling
├── server/
│ ├── server.js # Express + Provider routing + MCP config writer
│ ├── opencode.json # MCP config (auto-generated, see note below)
│ ├── providers/
│ │ ├── base-provider.js # Abstract base class
│ │ ├── claude-provider.js # Claude Agent SDK implementation
│ │ └── opencode-provider.js # Opencode SDK implementation
│ └── package.json
├── package.json
├── .env # API keys (not tracked)
└── .env.example # Template
Note on server/opencode.json:
- Generated automatically by the backend when you run the app
- Contains Composio MCP URL and credentials
- Opencode reads this file to load tools
- Don't track in git (add to
.gitignoreor use template)
| Command | Description |
|---|---|
npm start |
Start the Electron app |
npm run dev |
Start in development mode with live reload |
cd server && npm start |
Start the backend server |
"Failed to connect to backend"
- Ensure backend server is running on port 3001
- Check Terminal 1 for error logs
- Verify firewall isn't blocking localhost:3001
"API key error"
- For Claude: Verify
ANTHROPIC_API_KEYin.envstarts withsk-ant- - For Opencode: Ensure
OPENCODE_API_KEYis valid and from opencode.dev - Ensure
COMPOSIO_API_KEYis valid
"Provider not available"
- Ensure the required API key is configured in
.env - Restart the backend server after changing
.env - Check server logs for initialization errors
"Session not persisting"
- Check server logs for session ID capture
- Ensure
chatIdis being passed from frontend - Different providers use different session mechanisms (Claude SDK vs Opencode sessions)
"Streaming seems slow or incomplete"
- Check network/firewall settings for SSE connections
- Verify backend is receiving events from provider SDK
- Check browser console for connection errors
- For Opencode: Ensure event subscription is receiving
message.part.updatedevents
"Opencode models not responding"
- Verify Opencode server is running (localhost:4096 or configured URL)
- Check that model identifiers match Opencode format (e.g.,
opencode/big-pickle) - Review Opencode API documentation for available models
- Check server logs for Opencode SDK initialization errors
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Claude Agent SDK Documentation
- Opencode SDK Documentation
- Composio Tool Router
- Composio Dashboard
- Electron Documentation
- Opencode Platform
Built with Claude Code and Composio
