Skip to main content
Tool routing chooses which tool or function an agent should call for a request. Set task_type: "tool" on the question and describe each tool in its option.
Response

Why task_type: "tool"

task_type tells Krun One what kind of decision it is making. With "tool", the model uses its tool-routing instructions and the abstention policy for tools, and the answer is marked advisory. Without it, the question is treated as an intent. Always set task_type: "tool" when the options are tools or functions.

Writing tool options

  • Use the tool’s real name as the option id, like calendar_search. The returned choice is then the name your agent calls.
  • Describe what the tool does, in one short sentence. Descriptions matter most when tools are similar, such as search_contacts and search_calendar.
  • Offer only the tools available at this step. Fewer, relevant tools give more reliable choices.
Krun chooses the tool. It does not fill in the tool’s arguments: use your agent or LLM for that step.

Abstention is advisory for tools

Tool abstention is advisory. On real requests where none of the offered tools applies, Krun One v0 still picks a tool about 39% of the time at the current threshold. Do not treat abstain: false as proof that a tool call is appropriate.
Keep your own safeguards for tool calls:
  • validate the arguments before calling the tool,
  • ask for confirmation before actions with side effects, like sending an email or making a payment,
  • give your agent a path for “none of these tools”, for example answering directly with an LLM.
When the model does abstain on a tool question, treat it as a useful signal that the request may not need a tool.

Tools and intents in one request

A request can combine tool questions with other questions, for example a tool choice and a risk label for the same agent step. See Multiple questions.