Groq inference provider for the NucleusIQ AI agent framework (official groq Python SDK).
Project description
nucleusiq-groq
Groq inference provider for NucleusIQ: Chat Completions via Groq’s OpenAI-compatible API, using Groq’s official groq Python SDK (AsyncGroq / Groq).
Status: 0.1.0a1 (alpha / pre-release). Requires nucleusiq>=0.7.8.
Design, phased roadmap (Phase A vs B), and API caveats: docs/design/GROQ_PROVIDER.md (repo root).
Install
PyPI (when published):
pip install nucleusiq nucleusiq-groq
Monorepo (editable):
cd src/providers/inference/groq
uv sync --group dev
Core is pulled via [tool.uv.sources] as an editable path dependency; for pip-only local installs, install nucleusiq from src/nucleusiq first, then this package.
Configuration
| Variable | Purpose |
|---|---|
GROQ_API_KEY |
Required. Groq API key. |
GROQ_MODEL |
Optional. Default for chat/tool examples: llama-3.3-70b-versatile. |
GROQ_MODEL_STRUCTURED |
Optional. Model for json_schema structured output (example 05 defaults to openai/gpt-oss-20b if unset). |
Unsupported Chat Completions fields (e.g. logit_bias, messages[].name) are stripped or rejected at the wire layer; see the design doc.
Usage
import asyncio
from nucleusiq.agents import Agent
from nucleusiq.agents.config import AgentConfig, ExecutionMode
from nucleusiq.agents.task import Task
from nucleusiq.prompts.zero_shot import ZeroShotPrompt
from nucleusiq_groq import BaseGroq, GroqLLMParams
async def main() -> None:
llm = BaseGroq(model_name="llama-3.3-70b-versatile", async_mode=True)
agent = Agent(
name="demo",
prompt=ZeroShotPrompt(),
llm=llm,
config=AgentConfig(
execution_mode=ExecutionMode.DIRECT,
llm_params=GroqLLMParams(temperature=0.2),
),
)
await agent.initialize()
result = await agent.execute(Task(id="1", objective="Capital of France in one short phrase."))
print(result.output)
asyncio.run(main())
Phase A (this release)
BaseGroq—call/call_stream, tool calling, structured output (response_format/ Pydantic).GroqLLMParams— typed,extra="forbid"; merges into provider calls.- Local function tools — OpenAI-style tool JSON; assistant
tool_callsnormalized for Groq before each request. - Retries — rate-limit and transient errors with exponential backoff; errors mapped to NucleusIQ
LLMErrortypes.
Not in Phase A: Groq Responses API, built-in/hosted tools, remote MCP (see design doc Phase B).
Examples
Runnable agents (real API): examples/README.md.
cd src/providers/inference/groq
uv run python examples/agents/01_groq_direct.py
Development
From this directory:
uv sync --group dev
uvx ruff check nucleusiq_groq tests examples
uvx pyrefly check
uv run pytest
License
MIT — same as the NucleusIQ monorepo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nucleusiq_groq-0.1.0a1.tar.gz.
File metadata
- Download URL: nucleusiq_groq-0.1.0a1.tar.gz
- Upload date:
- Size: 73.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91fe224bd231c27b2235b8f1aa57a960112ae202338b837040b607cf7fd64d76
|
|
| MD5 |
b9a993df54f4c64ff92df816d4ef7b80
|
|
| BLAKE2b-256 |
3c307fdcc5d4d0fbb50e9049982a3121d7b46575702db1ca5ae5d7541f6337ed
|
Provenance
The following attestation bundles were made for nucleusiq_groq-0.1.0a1.tar.gz:
Publisher:
publish.yml on nucleusbox/NucleusIQ
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nucleusiq_groq-0.1.0a1.tar.gz -
Subject digest:
91fe224bd231c27b2235b8f1aa57a960112ae202338b837040b607cf7fd64d76 - Sigstore transparency entry: 1471956151
- Sigstore integration time:
-
Permalink:
nucleusbox/NucleusIQ@94ae32bafbaef44950519d2fa75e81216e6c7aed -
Branch / Tag:
refs/tags/nucleusiq-groq-v0.1.0a1 - Owner: https://github.com/nucleusbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@94ae32bafbaef44950519d2fa75e81216e6c7aed -
Trigger Event:
release
-
Statement type:
File details
Details for the file nucleusiq_groq-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: nucleusiq_groq-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a83d5a567f4ad55b5108a38780539f45540028f52053533be39d802b19934d
|
|
| MD5 |
e627ec986b788138e1d7ac6be2f11c3e
|
|
| BLAKE2b-256 |
95a82fe3fae5fef279b7e38d436dd0d43580d6026f388f9d9de91b52bbd635e1
|
Provenance
The following attestation bundles were made for nucleusiq_groq-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on nucleusbox/NucleusIQ
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nucleusiq_groq-0.1.0a1-py3-none-any.whl -
Subject digest:
51a83d5a567f4ad55b5108a38780539f45540028f52053533be39d802b19934d - Sigstore transparency entry: 1471956995
- Sigstore integration time:
-
Permalink:
nucleusbox/NucleusIQ@94ae32bafbaef44950519d2fa75e81216e6c7aed -
Branch / Tag:
refs/tags/nucleusiq-groq-v0.1.0a1 - Owner: https://github.com/nucleusbox
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@94ae32bafbaef44950519d2fa75e81216e6c7aed -
Trigger Event:
release
-
Statement type: