Complete guide to using Bifrost as a Go package in your applications. This section focuses on practical implementation patterns and code examples.
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 |
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 |
ποΈ Deep Architecture: For system internals, worker design, and performance details, see Architecture Documentation.
π‘ 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.