Skip to content
Night Owls.dev
Jump to a page

@nightowlsdev/provider-groq

Adapter/Model

Run Night Owls swarms on Groq's fast OpenAI-compatible inference, one API key.

What it does

Exposes `groqModels(opts?)`, a model factory for `defineSwarm({ modelFactory })`. It talks to Groq's OpenAI-compatible endpoint via the first-party AI SDK provider, mapping a Groq model id (e.g. `llama-3.3-70b-versatile`) to an AI SDK language model. Reads `GROQ_API_KEY` by default; `baseURL` defaults to `https://api.groq.com/openai/v1` and is overridable via `GROQ_BASE_URL`. Use a tool-calling-capable model so delegation and skills work; providers compose, so Groq can serve some agents while another `provider-*` adapter serves the rest, with `createModelFactory` doing the routing. Ships a `nightOwlsPlugin` manifest for CLI scaffolding. Imports only its AI SDK provider, zero `@mastra/*`.

Install

pnpm add @nightowlsdev/provider-groq

Key exports

  • groqModels
  • nightOwlsPlugin

Usage

provider-groq.ts
import { defineSwarm } from "@nightowlsdev/core";
import { groqModels } from "@nightowlsdev/provider-groq";

// Fast inference via Groq. Reads GROQ_API_KEY; MODEL_ID is a Groq model, e.g. llama-3.3-70b-versatile.
const swarm = defineSwarm({ agents, modelFactory: groqModels() });