mirror of
https://github.com/docker/docs.git
synced 2026-03-27 06:18:55 +07:00
cagent update builtins (#24053)
- **cagent: "script_shell" toolset should be "script"** - **cagent: add user_prompt toolset** --------- Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
@@ -43,7 +43,7 @@ MCP toolsets
|
||||
(stdio) or remote servers (HTTP/SSE). MCP enables access to a wide ecosystem
|
||||
of standardized tools.
|
||||
Custom toolsets
|
||||
: Shell scripts wrapped as tools with typed parameters (`script_shell`). This
|
||||
: Shell scripts wrapped as tools with typed parameters (`script`). This
|
||||
lets you define domain-specific tools for your use case.
|
||||
|
||||
## Configuration
|
||||
@@ -77,7 +77,7 @@ agents:
|
||||
Authorization: Bearer ${API_TOKEN}
|
||||
|
||||
# Custom shell tools
|
||||
- type: script_shell
|
||||
- type: script
|
||||
tools:
|
||||
build:
|
||||
cmd: npm run build
|
||||
@@ -313,10 +313,37 @@ toolsets:
|
||||
- type: fetch
|
||||
```
|
||||
|
||||
### User Prompt
|
||||
|
||||
The `user_prompt` toolset lets your agent ask you questions during task
|
||||
execution. When the agent needs clarification, decisions, or additional
|
||||
information it can't determine on its own, it displays a dialog and waits for
|
||||
your response.
|
||||
|
||||
You'll see a prompt with the agent's question. Depending on what the agent
|
||||
needs, you might provide free-form text, select from options, or fill out a
|
||||
form with multiple fields. You can accept and provide the information, decline
|
||||
to answer, or cancel the operation entirely.
|
||||
|
||||
#### Configuration
|
||||
|
||||
```yaml
|
||||
toolsets:
|
||||
- type: user_prompt
|
||||
```
|
||||
|
||||
No additional configuration is required. The tool becomes available to the
|
||||
agent once configured. When the agent calls this tool, the user sees a dialog
|
||||
with the prompt. The user can:
|
||||
|
||||
- **Accept**: Provide the requested information
|
||||
- **Decline**: Refuse to provide the information
|
||||
- **Cancel**: Cancel the operation
|
||||
|
||||
### API
|
||||
|
||||
The `api` toolset lets you define custom tools that call HTTP APIs. Similar to
|
||||
`script_shell` but for web services, this allows you to expose REST APIs,
|
||||
`script` but for web services, this allows you to expose REST APIs,
|
||||
webhooks, or any HTTP endpoint as a tool your agent can use. The agent sees
|
||||
these as typed tools with automatic parameter validation.
|
||||
|
||||
@@ -367,9 +394,9 @@ requests, parameters are sent as JSON in the request body.
|
||||
|
||||
Supported argument types: `string`, `number`, `boolean`, `array`, `object`.
|
||||
|
||||
### Script Shell
|
||||
### Script
|
||||
|
||||
The `script_shell` toolset lets you define custom tools by wrapping shell
|
||||
The `script` toolset lets you define custom tools by wrapping shell
|
||||
commands with typed parameters. This allows you to expose domain-specific
|
||||
operations to your agent as first-class tools. The agent sees these custom
|
||||
tools just like built-in tools, with parameter validation and type checking
|
||||
@@ -385,7 +412,7 @@ parameters:
|
||||
|
||||
```yaml
|
||||
toolsets:
|
||||
- type: script_shell
|
||||
- type: script
|
||||
tools:
|
||||
deploy:
|
||||
cmd: ./deploy.sh
|
||||
|
||||
Reference in New Issue
Block a user