Provider-Agnostic API Architecture
This document explains how AgentDock works with multiple LLM providers through a unified API layer.
What This Means For Users
AgentDock supports a variety of LLM providers (OpenAI, Anthropic, Gemini, DeepSeek, Groq, etc.) through a single, consistent interface. This means:
- Consistent Experience - The same chat interface works across all providers
- Easy Provider Switching - Change providers without changing your application code
- Unified Error Handling - Clear, consistent error messages regardless of provider
- Simple API Key Management - Manage all provider keys in one place
Benefits
For Developers
- Simplified Integration - Connect to any supported provider using the same API
- No Provider-Specific Code - Write code once that works with all providers
- Future-Proof - New providers are added to the core library without requiring changes to your application
- Type Safety - Full TypeScript support for all providers
For End Users
- Provider Flexibility - Use preferred providers without learning new interfaces
- Graceful Error Handling - Receive clear, actionable error messages
- Consistent Model Selection - Choose models through a standardized interface
- Smooth Failover - Automatic retries and provider fallbacks when configured
Supported Providers
AgentDock currently supports these LLM providers:
- OpenAI - GPT models (3.5, 4, etc.)
- Anthropic - Claude models
- Google - Gemini models
- DeepSeek - DeepSeek models
- Groq - Fast inference for various models
Error Handling
The provider-agnostic design includes standardized error handling:
- Normalized Errors - Technical provider errors are translated to user-friendly messages
- Clear API Key Guidance - Specific instructions when API keys are missing or invalid
- Appropriate Recovery Options - Context-aware options for resolving different error types
How It Works
Behind the scenes, AgentDock:
- Accepts a standard message format for all providers
- Translates requests to provider-specific formats
- Manages streaming connections appropriately for each provider
- Normalizes responses and errors back to a standard format
This abstraction layer means that applications using AgentDock don't need to know the details of each provider's API.