← Home · ↑ July 2025 · Bookmark #29435

sketch blog: The Unreasonable Effectiveness of an LLM Agent Loop with Tool Use

My co-workers and I have been working on an AI Programming Assistant called Sketch for the last few months. The thing I've been most surprised by is how shockingly simple the main loop of using an LLM with tool use is: def loop(llm): msg = user_input() while True: output, tool_calls = llm(msg) print("Agent: ", output) if tool_calls: msg = [ handle_tool_call(tc) for tc in tool_calls ] else: msg = user_input()
Saved on