Skip to main content

Groq Target adapter for Waken — routes waken Events to Groq's fast inference API.

Project description

waken-groq

CI License: MIT

A Groq Target adapter for Waken — "nginx for AI agents." Routes waken Events to Groq's chat completions API and returns the result as a waken Response.

Groq's API is shaped like OpenAI's Chat Completions API — its differentiator is inference speed (custom LPU hardware), not a different way of talking to it.

Install

pip install waken-groq

Usage

from waken import Runtime
from waken_groq import GroqAdapter

runtime = Runtime()
runtime.target("groq", GroqAdapter())
runtime.run()

GroqAdapter reads GROQ_API_KEY from the environment — that's the groq SDK's own convention (see AsyncGroq()), nothing waken-specific. Pass api_key=... (or any other AsyncGroq keyword) to override:

runtime.target("groq", GroqAdapter(model="llama-3.1-8b-instant", api_key="..."))

Sessions

Groq's chat completions API is stateless per call — there is no server-side session or thread, the caller resends the full conversation every time. So GroqAdapter maps a waken session_id to a plain list of chat messages that it grows and resends on every turn. This history lives only in the adapter's process memory — it is never persisted, and does not survive a process restart. An Event with no session_id sends a single one-off message and is never stored.

Development

git clone https://github.com/WakenHQ/waken-groq
cd waken-groq
pip install -e ".[dev]"
pytest

Tests mock groq.AsyncGroq entirely — no API key or network access needed to run the suite.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waken_groq-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waken_groq-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file waken_groq-0.1.0.tar.gz.

File metadata

  • Download URL: waken_groq-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for waken_groq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e9702729838d637b730d5f4be0d83b7cb261c2e174b9f45fb8187a331c82f9ab
MD5 912a9a6e07f4fd1e1a6f4e297cfb7682
BLAKE2b-256 64b1cd1a884b6f5cf4a162ed4d0a73e046d5124ca12c821b38b65fd5870b53ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for waken_groq-0.1.0.tar.gz:

Publisher: publish.yml on WakenHQ/waken-groq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file waken_groq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: waken_groq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for waken_groq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 faa4becffdcbecc7fa500211a27637758faccf7ddbc940dee32827581e4ef3fa
MD5 3076c4c03f4202e47621bba5cd2c6abe
BLAKE2b-256 58ee3855e9ce1c3f6c54bee9ded46035d561df4520bb93d88a340831ba201cf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for waken_groq-0.1.0-py3-none-any.whl:

Publisher: publish.yml on WakenHQ/waken-groq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page