* Tool Calls - give the LLM the tools and let it figure out the details
* Structured responses - ask the LLM to give you all the details in one shot
I can imagine that each approach has specific use cases (and "combination of both" is likely the correct answer).
Yet - what are people's experiences with building agents using the two approaches and which should be used when?
Any links to research on the topic would be appreciated (including pervious HN discussions on the topic if any).
One thing I've done is have some tool calls not return the result directly, but rather write them to a shared state, where they are put into the system context on the next turn. I did this because the LLM kept calling the `read_file` tool and blew up it's context. This "shared cache" fixes that by only allowing one copy of a file to ever be in the context/prompt. There was also emergent behavior of them using the cache for storing plans or thoughts, so I made that a first class principle and it "works" pretty great (making, following, updating the plan), but it is unclear if it actually results in better outcomes (insufficient evaluation capabilities, generally in the field)
I'm still unsure if the file-in-cache idea is a good one, but at least I can now find out with the deep access and customization of my agentic setup
One piece of advice I received just before starting this journey was...
"Give your agents great tools and then get out of the way"