agents/agents-core/ai.koog.agents.core.feature.handler.tool/-tool-call-event-handler/index.html (206 lines of code) (raw):
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<title>ToolCallEventHandler</title>
<link href="../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../../";</script>
<script>document.documentElement.classList.replace("no-js", "js");</script>
<script>const storage = localStorage.getItem("dokka-dark-mode")
if (storage == null) {
const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
if (osDarkSchemePreferred === true) {
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}
} else {
const savedDarkMode = JSON.parse(storage)
if (savedDarkMode === true) {
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}
}
</script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async></script>
<script type="text/javascript" src="../../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../../styles/style.css" rel="Stylesheet">
<link href="../../../../styles/main.css" rel="Stylesheet">
<link href="../../../../styles/prism.css" rel="Stylesheet">
<link href="../../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../../ui-kit/ui-kit.min.css" rel="Stylesheet">
<script type="text/javascript" src="../../../../scripts/safe-local-storage_blocking.js"></script>
<script type="text/javascript" src="../../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../../ui-kit/ui-kit.min.js" defer></script></head>
<body>
<div class="root">
<header class="navigation theme-dark" id="navigation-wrapper" role="banner">
<a class="library-name--link" href="../../../../index.html" tabindex="1">
koog
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">0.6.0-SNAPSHOT
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
<button class="platform-tag platform-selector common-like" data-active="" aria-pressed="true" data-filter=":agents:agents-core/commonMain">common</button>
<div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
<button class="button button_dropdown filter-section--dropdown-toggle" role="combobox" data-role="dropdown-toggle" aria-controls="platform-tags-listbox" aria-haspopup="listbox" aria-expanded="false" aria-label="Toggle source sets"></button>
<ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox" aria-label="Target filter">
<div class="dropdown--header"><span>Target filter</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close target filter">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<li role="option" class="dropdown--option platform-selector-option common-like" tabindex="0">
<label class="checkbox">
<input type="checkbox" class="checkbox--input" id=":agents:agents-core/commonMain" data-filter=":agents:agents-core/commonMain">
<span class="checkbox--icon"></span>
common
</label>
</li>
</ul>
<div class="dropdown--overlay"></div>
</div>
</ul>
<button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button" type="button">Switch theme
</button>
<div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
API
</div>
</div>
</header>
<div id="container">
<nav id="leftColumn" class="sidebar" data-item-type="SECTION" data-item-config="{"defaultSize": 280, "minSize": 200, "maxSize": 400}">
<a class="toc--skip-link" href="#main">Skip to content</a>
<div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
<ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list" data-role="dropdown-listbox" aria-label="Table of contents">
<div class="dropdown--header">
<span>
koog
</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<div class="sidebar--inner" id="sideMenu"></div>
</ul>
<div class="dropdown--overlay"></div>
</div>
</nav>
<div id="resizer" class="resizer" data-item-type="BAR"></div>
<div id="main" data-item-type="SECTION" role="main">
<div class="main-content" data-page-type="classlike" id="content" pageids="agents-core::ai.koog.agents.core.feature.handler.tool/ToolCallEventHandler///PointingToDeclaration//643085981">
<div class="breadcrumbs"><a href="../../index.html">agents-core</a><span class="delimiter">/</span><a href="../index.html">ai.koog.agents.core.feature.handler.tool</a><span class="delimiter">/</span><span class="current">ToolCallEventHandler</span></div>
<div class="cover ">
<h1 class="cover"><span>Tool</span><wbr><span>Call</span><wbr><span>Event</span><wbr><span><span>Handler</span></span></h1>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":agents:agents-core/commonMain"><div class="symbol monospace"><span class="token keyword">class </span><a href="index.html">ToolCallEventHandler</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/JetBrains/koog/tree/main/agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/feature/handler/tool/ToolCallEventHandler.kt#L10">source</a>)</span></span></div><p class="paragraph">Handler for executing tools with customizable behaviors for tool calls, validation errors, failures, and results.</p><p class="paragraph">This class provides properties that allow defining specific behavior during different stages of a tool's execution process.</p></div></div>
</div>
<div class="tabbedcontent">
<div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button></div>
<div class="tabs-section-body">
<div data-togglable="CONSTRUCTOR">
<h2 class="tableheader">Constructors</h2>
<div class="table"><a data-name="-2047720114%2FConstructors%2F643085981" anchor-label="ToolCallEventHandler" id="-2047720114%2FConstructors%2F643085981" data-filterable-set=":agents:agents-core/commonMain"></a>
<div class="table-row table-row_content" data-togglable="CONSTRUCTOR" data-filterable-current=":agents:agents-core/commonMain" data-filterable-set=":agents:agents-core/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="-tool-call-event-handler.html"><span>Tool</span><wbr><span>Call</span><wbr><span>Event</span><wbr><span><span>Handler</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-2047720114%2FConstructors%2F643085981"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":agents:agents-core/commonMain"><div class="symbol monospace"><span class="token keyword">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span></div></div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div data-togglable="PROPERTY">
<h2 class="tableheader">Properties</h2>
<div class="table"><a data-name="1591728158%2FProperties%2F643085981" anchor-label="toolCallFailureHandler" id="1591728158%2FProperties%2F643085981" data-filterable-set=":agents:agents-core/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":agents:agents-core/commonMain" data-filterable-set=":agents:agents-core/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="tool-call-failure-handler.html"><span>tool</span><wbr><span>Call</span><wbr><span>Failure</span><wbr><span><span>Handler</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1591728158%2FProperties%2F643085981"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":agents:agents-core/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="tool-call-failure-handler.html">toolCallFailureHandler</a><span class="token operator">: </span><a href="../-tool-call-failure-handler/index.html">ToolCallFailureHandler</a></div><div class="brief "><p class="paragraph">A customizable handler invoked when a tool call fails during execution. Defines the behavior for responding to a failure by providing access to the failed tool, its arguments, and the associated exception. This allows for logging, error handling, or recovery strategies to be applied.</p></div></div></div>
</div>
</div>
</div>
</div>
<a data-name="1501938706%2FProperties%2F643085981" anchor-label="toolCallHandler" id="1501938706%2FProperties%2F643085981" data-filterable-set=":agents:agents-core/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":agents:agents-core/commonMain" data-filterable-set=":agents:agents-core/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="tool-call-handler.html"><span>tool</span><wbr><span>Call</span><wbr><span><span>Handler</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1501938706%2FProperties%2F643085981"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":agents:agents-core/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="tool-call-handler.html">toolCallHandler</a><span class="token operator">: </span><a href="../-tool-call-handler/index.html">ToolCallHandler</a></div><div class="brief "><p class="paragraph">A variable of type <a href="../-tool-call-handler/index.html">ToolCallHandler</a> used to handle tool call operations. It provides a mechanism for executing specific logic when a tool is called with the given arguments.</p></div></div></div>
</div>
</div>
</div>
</div>
<a data-name="1436539151%2FProperties%2F643085981" anchor-label="toolCallResultHandler" id="1436539151%2FProperties%2F643085981" data-filterable-set=":agents:agents-core/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":agents:agents-core/commonMain" data-filterable-set=":agents:agents-core/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="tool-call-result-handler.html"><span>tool</span><wbr><span>Call</span><wbr><span>Result</span><wbr><span><span>Handler</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1436539151%2FProperties%2F643085981"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":agents:agents-core/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="tool-call-result-handler.html">toolCallResultHandler</a><span class="token operator">: </span><a href="../-tool-call-result-handler/index.html">ToolCallResultHandler</a></div><div class="brief "><p class="paragraph">A variable representing a handler for processing the result of a tool call. The handler is invoked with the tool instance, its arguments, and the result of the tool execution. The result of handling is determined by the specific implementation provided for the ToolCallResultHandler functional interface.</p></div></div></div>
</div>
</div>
</div>
</div>
<a data-name="-756488095%2FProperties%2F643085981" anchor-label="toolValidationErrorHandler" id="-756488095%2FProperties%2F643085981" data-filterable-set=":agents:agents-core/commonMain"></a>
<div class="table-row table-row_content" data-filterable-current=":agents:agents-core/commonMain" data-filterable-set=":agents:agents-core/commonMain">
<div class="main-subrow keyValue ">
<div class=""><span class="inline-flex">
<div><a href="tool-validation-error-handler.html"><span>tool</span><wbr><span>Validation</span><wbr><span>Error</span><wbr><span><span>Handler</span></span></a></div>
<span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-756488095%2FProperties%2F643085981"></span>
<div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":agents:agents-core/commonMain"><div class="symbol monospace"><span class="token keyword">var </span><a href="tool-validation-error-handler.html">toolValidationErrorHandler</a><span class="token operator">: </span><a href="../-tool-validation-error-handler/index.html">ToolValidationErrorHandler</a></div><div class="brief "><p class="paragraph">Defines the handler responsible for processing validation errors that occur when a tool's arguments are invalid. It allows customization of how validation errors are handled during the execution of a tool.</p></div></div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="footer--container">
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
<div class="footer--content">
<div>
<span>Generated by </span>
<a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
Dokka
</a>
<div>Copyright © 2000-2025 JetBrains s.r.o.</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>