Handoffs & Tool Calls
with Groq
No framework from Chapter 02. Just one API, one model, and the loop, built by hand so every step stays visible.
Why Groq for a first agent
Runs on Groq's own LPU chips. Responses feel instant, which matters a lot when you're live-debugging an agent loop in front of a room
Same client library and request shape as any OpenAI-style SDK, nothing new to learn
No credit card to get started experimenting today
Fast enough to feel it.
Smart enough to work.
Two reasonable defaults on Groq's free tier. Pick based on whether you want speed or headroom. Rate limits change often, so check console.groq.com/docs/rate-limits before you build on these numbers.
llama-3.1-8b-instant
~30 RPM · ~6K TPM on the free tier. Smallest, quickest, and reliable enough at straightforward tool calls. The model to reach for first.
llama-3.3-70b-versatile
~30 RPM · ~12K TPM on the free tier, double the token budget. Reach for this one if the 8B model starts fumbling a more involved tool call.
The model asks.
Only your code acts.
A tool call from the model is only a request, with arguments your code hasn't verified yet. Your application decides whether to actually run it.
One agent forwards.
Another finishes.
A handoff is just your code noticing the question is outside this agent's lane, and passing the conversation (plus context) to a different prompt or model built for that lane.
What we'll actually
wire up.
No code today. Just the shape of what we'll build together, live.
An agent that only
runs on your laptop isn't done.
Next: getting this thing off your machine and onto the internet, without waking up to a surprise bill or a silent failure.
← Chapter 02Chapter 04: Cloud & Deployment →