Skip to main content

Models

  • Recommended: groq/llama-3.3-70b-versatile (best quality)
  • Fast: groq/llama-3.1-8b-instant (fastest)
  • Qwen: groq/qwen/qwen3-32b (multilingual)
  • Legacy: groq/llama3-70b-8192, groq/mixtral-8x7b-32768

Python

# export GROQ_API_KEY=your-api-key
from praisonaiagents import Agent

agent = Agent(
    instructions="You are a helpful assistant",
    llm="groq/llama-3.3-70b-versatile"
)
agent.start("Explain neural networks")

With Tools

# export GROQ_API_KEY=your-api-key
from praisonaiagents import Agent

def get_time() -> str:
    """Get current time."""
    from datetime import datetime
    return datetime.now().strftime("%H:%M:%S")

agent = Agent(
    instructions="You are a time assistant",
    llm="groq/llama-3.1-8b-instant",
    tools=[get_time]
)
agent.start("What time is it?")

Multi-Agent

# export GROQ_API_KEY=your-api-key
from praisonaiagents import Agent, Task, Agents

researcher = Agent(
    instructions="You research topics thoroughly",
    llm="groq/llama-3.3-70b-versatile"
)
writer = Agent(
    instructions="You write clear summaries",
    llm="groq/llama-3.1-8b-instant"
)

task1 = Task(description="Research AI safety", agent=researcher)
task2 = Task(description="Summarize findings", agent=writer)

agents = Agents(agents=[researcher, writer], tasks=[task1, task2])
agents.start()

CLI

export GROQ_API_KEY=your-api-key

# Basic prompt
python -m praisonai "Explain AI" --llm groq/llama-3.3-70b-versatile

# With temperature
python -m praisonai "Write a story" --llm groq/llama-3.1-8b-instant --temperature 0.8

# Run agents.yaml
python -m praisonai

YAML

framework: praisonai
topic: Research AI developments
agents:
  researcher:
    role: AI Researcher
    goal: Find latest AI developments
    instructions: You are an expert AI researcher
    llm:
      model: groq/llama-3.3-70b-versatile
    tasks:
      research_task:
        description: Research the latest developments in AI
        expected_output: Comprehensive AI research report

  writer:
    role: Technical Writer
    goal: Create clear documentation
    instructions: You write clear technical content
    llm:
      model: groq/llama-3.1-8b-instant
    tasks:
      write_task:
        description: Write a summary of the research
        expected_output: Well-written technical summary