Quick Reference
Core Components
| Component | Purpose | Time to Learn |
|---|---|---|
| Account Interface | Provider configuration and key management | 5 min |
| Bifrost Client | Main client methods and request handling | 10 min |
| Plugins | Custom middleware and request/response hooks | 15 min |
| MCP Integration | Tool calling and external integrations | 15 min |
| Logging | Custom logging and monitoring | 5 min |
| Schemas | Data structures and interfaces reference | 10 min |
Usage Patterns
Basic Usage (Most Common)Common Use Cases
”I want to…”
| Goal | Start Here | Example Code |
|---|---|---|
| Add multiple AI providers | Account Interface | Multi-provider setup |
| Handle failover automatically | Bifrost Client | Fallback configuration |
| Add custom logging/monitoring | Plugins | Rate limiting, caching |
| Use external tools/APIs | MCP Integration | Database queries, web search |
| Optimize for production | Account Interface | Connection pooling, keys |
| Debug requests/responses | Logging | Custom logger setup |
| Build a chatbot with tools | MCP Integration | Tool registration |
| Understand error types | Schemas | BifrostError handling |
| Add rate limiting | Plugins | PreHook implementation |
| Cache responses | Plugins | PostHook response caching |
Architecture Overview
Understanding the Flow:- Account Interface: Configuration provider (keys, settings, provider configs)
- Bifrost Client: Core request router with fallbacks and concurrency
- Plugins: Request/response middleware (rate limiting, caching, monitoring)
- MCP Integration: Tool calling and external service integration
Deep Architecture: For system internals, worker design, and performance details, see Architecture Documentation.
Language Integrations
Using HTTP Transport Instead? If you need to use Bifrost from non-Go languages (Python, Node.js, etc.) or in microservices:- HTTP Transport Setup - 30-second API setup
- HTTP Transport Usage - REST API documentation
- Drop-in Integration - Replace OpenAI/Anthropic URLs
Tip: HTTP transport hosts the same Go package via REST API, so concepts like Account and Plugins are configured via JSON instead of Go code.
Advanced Configuration
Performance Tuning
- Memory Management - Buffer sizes, concurrency settings
- Networking - Proxies, timeouts, connection pooling
- Key Management - Load balancing, rotation
Production Setup
- Error Handling - Error types and recovery patterns
- Provider Configuration - All 8+ providers setup
Development
Next Steps
Quick Start Path:- 30-second setup - Get running now
- Account setup - Configure providers and keys
- Client usage - Learn core methods
- Add plugins - Customize behavior (optional)
- MCP Integration - Tool calling (if needed)
- Production - All providers setup