groq-core-workflow-a
Installation
SKILL.md
Groq Core Workflow A: Chat, Tools & Structured Output
Overview
Primary integration patterns for Groq: chat completions, tool/function calling, JSON mode, and structured outputs. Groq's LPU delivers sub-200ms time-to-first-token, making these patterns viable for real-time user-facing features. This skill walks through five workflow steps; the lean skeleton lives here, and the full copy-paste code lives in references/.
Prerequisites
- Install the SDK with
npm install groq-sdk. - Set
GROQ_API_KEYin the environment (see Authentication below). - Familiarity with the Groq model line-up and which model fits each task.
Authentication
Groq authenticates via an API key. Create one at console.groq.com/keys and
export it as GROQ_API_KEY; the SDK reads it automatically, so new Groq()
needs no explicit argument. Never hardcode the key — read it from the
environment (or a secrets manager) so it stays out of source control.