You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf15f0b
Browse filesBrowse the repository at this point in the historyBrowse files
* Tool search with deferred execution
* Frontend implementation
* Fixes and error improvements
* Adapt tool_search to be a bit more maintainable
* PR feedback
Copy file name to clipboardExpand all lines: docs/agents/configuration.mdx
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,19 @@ Existing machine configs gain missing machine-tool defaults only when saved agai
131
131
132
132
Slack's `send_integration_message` remains contextual: it is available in Slack conversations without being added to the saved config, unless explicitly disabled. The builder only shows this tool when it is explicitly listed in the config.
133
133
134
+
### Deferred tools
135
+
136
+
Set `deferred: true` on any tool (built-in, custom, or MCP) to keep its definition out of the model's context until the model asks for it. Deferring a tool implicitly enables the built-in `tool_search` tool, which the model calls with a regular expression to load matching deferred tools by name, description, and argument names. Keep the tools the agent needs on almost every turn loaded; defer large or rarely used tool sets.
137
+
138
+
```yaml
139
+
tools:
140
+
web_search: {} # always loaded
141
+
web_fetch:
142
+
deferred: true # loaded only after a tool_search match
143
+
```
144
+
145
+
Deferred loading keeps the provider's prompt cache intact on Anthropic Messages and OpenAI Responses. On Chat Completions the model calls loaded tools through `call_deferred_tool` with the tool's name and arguments, so `call_deferred_tool` is a reserved tool name.
146
+
134
147
### Custom tools
135
148
136
149
A custom tool describes an operation that your system performs. Its `description` tells the model when to use it, and its `input_schema` defines the arguments.
A red <spanstyle={{ color: "#c97a7a", fontWeight: 700 }}>*</span> marks required inputs.
25
26
@@ -266,6 +267,17 @@ Lists the agent's subagents with their `agent_id`, name, key, state, and last ac
266
267
267
268
Loads an attached skill. Requires its [skill](/tools/skills)`name`. The tool returns the skill's instructions and, when the agent has machines, installs its supporting files there.
268
269
270
+
## Tool loading
271
+
272
+
### `tool_search`
273
+
274
+
Added automatically when any tool is [deferred](/agents/configuration#deferred-tools). Searches deferred tools by name, description, and argument names, and loads the matches so the model can call them.
275
+
276
+
| Input | Type | Notes |
277
+
| --- | --- | --- |
278
+
|`pattern`<spanstyle={{ color: "#c97a7a", fontWeight: 700 }}>*</span> | string | Case-insensitive regular expression, at most 200 characters |
279
+
|`max_results`| integer | 1–50; default 5 |
280
+
269
281
<Info>
270
282
Full inputs and defaults, live from your deployment: [Get tool catalog](/api-reference/endpoints/configs-and-profiles/get-tool-catalog).
| `default_enabled` | `false` disables tools by default. Set `enabled: true` for each tool you want to expose. |
51
+
| `deferred` | `true` keeps the server's tools out of the model's context until `tool_search` loads them; per-tool `deferred` overrides it. See [Deferred tools](/agents/configuration#deferred-tools). |
0 commit comments