Groq Claude + DeepSeek R1
Add the following code to your Python file
1from kern.agent import Agent2from kern.models.anthropic import Claude3from kern.models.groq import Groq45reasoning_agent = Agent(6 model=Claude(id="claude-sonnet-4-5"),7 reasoning_model=Groq(8 id="deepseek-r1-distill-llama-70b", temperature=0.6, max_tokens=1024, top_p=0.959 ),10)11reasoning_agent.print_response("9.11 and 9.9 -- which is bigger?", stream=True)Set up your virtual environment
1uv venv --python 3.122source .venv/bin/activate1uv venv --python 3.122.venv\Scripts\activateInstall dependencies
1uv pip install -U kern-ai groq anthropicExport your Groq and Anthropic API keys
1export GROQ_API_KEY="your_groq_api_key_here"2 export ANTHROPIC_API_KEY="your_anthropic_api_key_here"1$Env:GROQ_API_KEY="your_groq_api_key_here"2$Env:ANTHROPIC_API_KEY="your_anthropic_api_key_here" Run Agent
1python groq_plus_claude.py