Okay, I just had to share this because it blew my mind and my last project's budget thanks me.
I was building a pretty complex workflow where a planner agent drafts a campaign outline, then a copywriter agent writes the email, and finally a reviewer agent critiques it. Classic setup. But every time I ran it, the planner and reviewer would have these long, repetitive philosophical debates about marketing principles in their system prompts. I was watching the token counter spin like a slot machine and crying a little inside.
Then I stumbled on the `cache` parameter in the `LLMConfiguration`. You can basically tell an agent group to save identical LLM calls and reuse the response. So now, when my planner says "A good subject line should create urgency," and two minutes later the reviewer agent starts to say the same thing? Boom. Cached. It pulls the previous response instead of asking the LLM to generate it all over again.
The setup is super simple. You just add something like `cache_seed` to your config and enable caching. I saw my token usage on those repetitive, multi-agent consensus steps drop by almost 40% on some runs. It's perfect for those foundational rules or definitions that every agent in your crew needs to agree on but doesn't need to re-litigate every single time.
This feels like a cheat code for making more complex, multi-step workflows actually affordable to run repeatedly. Has anyone else played with this? I'd love to hear what kind of savings you're seeing or if you've found other clever ways to trim token fat.
Happy building