Providers

Configure LLM providers for your agents — built-in services, custom endpoints, and runtime switching.

Overview

Traditional agent architectures couple prompt execution directly to specific API libraries, creating fragile systems and vendor lock-in. Generative Layers resolves this by decoupling the agent's symbolic reasoning from concrete neural endpoints. Through the bind() operator, agents establish a transactional governance boundary around any provider, allowing runtime model switching and out-of-band policy checks directly at the resource boundary.

Built-in Providers
Provider Free Tier Tested Models Status Setup
Groq 30 req/min, 14,400/day llama-3.3-70b-versatile ✓ Tested
Cerebras Free (no credit card) gpt-oss-120b ✓ Tested
Gemini 15 req/min, 1,500/day gemini-2.0-flash, gemini-2.5-flash ✓ Tested
OpenAI Paid only gpt-4o, gpt-4o-mini Compatible
DeepSeek Small initial credit deepseek-chat Compatible
Usage Examples
Groq (Recommended Free Option)
Offers high-throughput hardware-accelerated inference with a generous daily rate limit, suitable for executing multi-phase validation loops.
gl.bind("agent1", "groq", "llama-3.3-70b-versatile", "");
gl.bind("agent1", "groq", "llama-3.3-70b-versatile", "", Bid);
bind("agent1", "groq", "llama-3.3-70b-versatile", "", Bid);
Cerebras
Provides low-latency wafer-scale inference. Accessible via a zero-cost API tier with no credit card registration, serving as an ideal environment for rapid prototyping and lifecycle testing.
gl.bind("agent1", "cerebras", "gpt-oss-120b", "");
gl.bind("agent1", "cerebras", "gpt-oss-120b", "", Bid);
bind("agent1", "cerebras", "gpt-oss-120b", "", Bid);
Gemini (Native Google API)
Integrates with Google's foundation models via native API drivers, bypassing generic wrapper translations to support advanced multi-modal and structured reasoning workloads directly.
gl.bind("agent1", "gemini", "gemini-2.5-flash", "");
gl.bind("agent1", "gemini", "gemini-2.5-flash", "", Bid);
bind("agent1", "gemini", "gemini-2.5-flash", "", Bid);
Using Any Custom Provider (Zero Code Changes)
Switching Providers at Runtime
Auto-Detection
Omitting the provider parameter during binding triggers a fallback resolution sequence that scans the environment variables. The framework traverses the environment in a fixed priority hierarchy (GROQ_API_KEYCEREBRAS_API_KEYGEMINI_API_KEYOPENAI_API_KEYDEEPSEEK_API_KEY) and automatically selects the first active key. If no external provider key is present, the framework falls back to a deterministic mock engine to support testing and local compilation without network dependencies.