# Tool agent: the model reads files with the embedded read-only tools; one agent_prompt call runs the whole tool conversation. import "agentic.lms"; write_file("notes.txt", "Release 0.3 ships the agentic recipes.\nRelease 0.4 adds embeddings.\n"); question = ARGV.get(0, "Which release adds embeddings? Check notes.txt."); analyst = with_tools(agent("file analyst", "answer questions about files in the current directory"), {root: ".", write: false, web: false}); r = turn(analyst, question, {max_steps: 6, max_tokens: BUDGET, retries: 2}); if (r.dry_run) { exit(0); } for (c in r.tool_calls) { warning(f"[tool] {c.name} ok={c.ok}"); } require(len(r.tool_calls) > 0, "the model answered without reading the file"); println(trim(r.reply));