Skip to main content
Not all AI models are created equal. Some excel at creative writing, others at coding, and some are just blazing fast. With Vizra ADK, you can mix and match providers to give each agent the perfect brain for its job.

Quick Setup

Getting started is as easy as 1-2-3.

1. Set Your Default Provider

.env
VIZRA_ADK_DEFAULT_PROVIDER=openai
VIZRA_ADK_DEFAULT_MODEL=gpt-4-turbo

# Don't forget your API key!
OPENAI_API_KEY=sk-...

2. Or Configure Per Agent

app/Agents/CustomerSupportAgent.php
use Prism\Prism\Enums\Provider;

class CustomerSupportAgent extends BaseLlmAgent
{
    protected ?Provider $provider = Provider::Anthropic;
    protected string $model = 'claude-3-opus-20240229';
}

3. Or Switch on the Fly

$agent->setProvider('groq')
    ->setModel('mixtral-8x7b-32768')
    ->setTemperature(0.7);

Supported Providers

Vizra ADK supports 10 LLM providers via Prism PHP. Each brings something special to the table.

OpenAI

The industry leader - GPT-4 is your Swiss Army knife for any task.
Best ForPopular Models
General purpose, creative tasks, code generationgpt-4-turbo, gpt-3.5-turbo, o1-preview
Environment Variable: OPENAI_API_KEY
protected ?Provider $provider = Provider::OpenAI;
protected string $model = 'gpt-4-turbo';
Claude is thoughtful, careful, and great at complex reasoning.
Best ForPopular Models
Analysis, writing, safe & ethical responsesclaude-3-opus, claude-3-sonnet
Environment Variable: ANTHROPIC_API_KEY
protected ?Provider $provider = Provider::Anthropic;
protected string $model = 'claude-3-opus-20240229';
Multimodal magic - handles text, images, and more.
Best ForPopular Models
Multimodal tasks, fast responses, cost efficiencygemini-1.5-pro, gemini-1.5-flash
Environment Variable: GEMINI_API_KEY
protected ?Provider $provider = Provider::Gemini;
protected string $model = 'gemini-1.5-flash';
Speed demon. Insanely fast inference for real-time applications.
Best ForPopular Models
Real-time chat, low latency needsmixtral-8x7b-32768, llama2-70b-4096
Environment Variable: GROQ_API_KEY
protected ?Provider $provider = Provider::Groq;
protected string $model = 'mixtral-8x7b-32768';
Run models locally - your data never leaves your machine.
Best ForPopular Models
Privacy, offline use, experimentationllama2, codellama, mistral, phi
protected ?Provider $provider = Provider::Ollama;
protected string $model = 'llama2';
Requires Ollama to be installed and running locally.
One API, 100+ models - the ultimate flexibility.
Best ForAvailable Models
Model flexibility, A/B testing, cost optimizationGPT-4, Claude, Gemini, Llama, and 100+ more
Environment Variable: OPENROUTER_API_KEY
protected ?Provider $provider = Provider::OpenRouter;
protected string $model = 'openai/gpt-4-turbo';
// Or use any model: 'anthropic/claude-3-opus', 'google/gemini-pro', etc.
Perfect for testing different models without managing multiple API keys.
Specialized models for chat and code generation.Environment Variable: DEEPSEEK_API_KEY
protected ?Provider $provider = Provider::DeepSeek;
protected string $model = 'deepseek-coder';
Open-weight models with impressive performance.Environment Variable: MISTRAL_API_KEY
protected ?Provider $provider = Provider::Mistral;
protected string $model = 'mistral-large-latest';
Grok models from Elon’s xAI team.Environment Variable: XAI_API_KEY
protected ?Provider $provider = Provider::XAI;
protected string $model = 'grok-beta';
Embedding specialist for semantic search.Environment Variable: VOYAGEAI_API_KEY
protected ?Provider $provider = Provider::VoyageAI;
protected string $model = 'voyage-large-2';
Primarily for embeddings, not text generation.

Cool Provider Tricks

Auto-Detection Magic

Just set the model name and Vizra figures out the provider.
// These auto-detect the provider!
protected string $model = 'gpt-4';        // OpenAI
protected string $model = 'claude-3-opus'; // Anthropic
protected string $model = 'gemini-pro';    // Gemini
protected string $model = 'llama2';        // Ollama

Runtime Switching

Change providers on the fly based on user needs.
// Premium users get the good stuff!
if ($user->isPremium()) {
    $agent->setProvider('anthropic')
          ->setModel('claude-3-opus-20240229');
} else {
    $agent->setProvider('openai')
          ->setModel('gpt-3.5-turbo');
}

Choosing the Right Provider

Not sure which to pick? Here’s your cheat sheet.
Use CaseRecommended Provider
Business AppsOpenAI GPT-4 or Anthropic Claude - reliable and versatile
Speed DemonsGroq or Gemini Flash - when milliseconds matter
Privacy FirstOllama - keep everything local and secure
Code GenerationDeepSeek Coder or GPT-4 - they speak fluent code
Long ContextClaude 3 or Gemini 1.5 Pro - handle entire books
Budget ConsciousGPT-3.5 Turbo or local Ollama models

API Keys Setup

Don’t forget to add your API keys to the .env file.
.env
# OpenAI
OPENAI_API_KEY=sk-...

# Anthropic
ANTHROPIC_API_KEY=sk-ant-...

# Google Gemini
GEMINI_API_KEY=...

# OpenRouter (100+ models!)
OPENROUTER_API_KEY=...

# Add others as needed!
GROQ_API_KEY=...
MISTRAL_API_KEY=...
# etc...

Next Steps

Now that you’ve picked your provider, let’s create some amazing agents.

Create Your First Agent

Learn how to build powerful AI agents with your chosen provider.