Programmatic Adapter Opportunities Research
This document summarizes research into which existing subprocess-based adapters would benefit from programmatic SDK or remote API variants.
Current State
Existing Adapter Types
- Subprocess adapters (11): cursor, copilot, gemini, qwen, hermes, omp, openclaw, claude, codex, pi, opencode
- Programmatic adapters (3): claude-agent-sdk, codex-sdk, pi-sdk
- Remote adapters (3): opencode-http, codex-websocket, agent-mux-remote
Research Results
High Priority Candidates
1. Google Gemini SDK Adapter
- Current:
geminiCLI command - Opportunity: Official Google AI SDKs (Python, Node.js, Go, Java)
- Benefits:
- Direct SDK integration eliminates CLI subprocess overhead
- Better streaming support with WebSocket via Gemini Live API
- Native tool calling without CLI parsing
- Production-ready officially supported libraries
- Recommendation: Implement
gemini-sdk-adapterextending BaseProgrammaticAdapter
2. Qwen/DashScope SDK Adapter
- Current:
qwenCLI command - Opportunity: Official Alibaba DashScope SDKs + OpenAI-compatible API
- Benefits:
- Already uses OpenAI-compatible API underneath CLI
- Official Python/Node.js SDKs available
- Async/streaming support built-in
- Significant performance improvement over CLI
- Recommendation: Implement
qwen-sdk-adapterextending BaseProgrammaticAdapter
3. GitHub Copilot SDK Adapter
- Current:
gh copilotCLI extension - Opportunity: New GitHub Copilot SDK (public preview as of April 2026)
- Benefits:
- Same engine as CLI but with programmatic control
- Multi-language SDKs (Python, TypeScript, Go, .NET, Java)
- OpenTelemetry support for distributed tracing
- JSON-RPC communication with Copilot server
- Recommendation: Implement
copilot-sdk-adapterextending BaseProgrammaticAdapter
Medium Priority Candidates
4. Cursor API Adapter
- Current:
cursor-agentCLI command - Opportunity: Community reverse-engineered APIs (HTTP/2 + streaming)
- Status: No official SDK, but APIs exist
- Recommendation: Monitor for official API release before implementing
5. Hermes RPC Adapter
- Current:
hermesCLI command - Opportunity: Proposed RPC mode + existing REST endpoints
- Status: RPC mode not yet implemented
- Recommendation: Consider when RPC mode becomes available
6. OpenClaw SDK Adapter
- Current:
openclawCLI command - Opportunity: Python SDK (
openclaw-py) + REST API - Benefits: Open-source with plugin system
- Recommendation: Medium priority for open-source integration scenarios
Not Recommended
7. OMP/MCP
- Analysis: MCP is a protocol standard, not an agent platform
- Current Support: Already integrated in existing adapters via MCP plugin support
- Recommendation: No separate adapter needed
Implementation Recommendations
Phase 1: High-Impact SDK Adapters
gemini-sdk-adapter- Google AI SDK integrationqwen-sdk-adapter- DashScope SDK integrationcopilot-sdk-adapter- GitHub Copilot SDK integration
Phase 2: API/Remote Adapters
cursor-api-adapter- When official API becomes availablehermes-rpc-adapter- When RPC mode is implemented
Phase 3: Specialty Adapters
openclaw-sdk-adapter- For open-source integration needs
Technical Approach
Programmatic Adapters
- Extend
BaseProgrammaticAdapter - Use official SDKs for direct integration
- Implement streaming via SDK native capabilities
- Mock implementations for testing
Remote Adapters
- Extend
BaseRemoteAdapter - HTTP/WebSocket connections to APIs
- Server lifecycle management
- Real-time bidirectional communication
Next Steps
- Implement high-priority SDK adapters (gemini-sdk, qwen-sdk, copilot-sdk)
- Update adapter validation to support non-subprocess adapter types
- Create comprehensive tests for new adapter variants
- Update documentation with new adapter capabilities
- Monitor Cursor and Hermes for official API releases