mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-04 10:02:15 +00:00
Remove the leading '#!/usr/bin/env docker agent run' shebang and following blank line from all example YAML and HCL files, as the config format is now self-documenting.
24 lines
942 B
YAML
24 lines
942 B
YAML
# Demonstrates the `headers` field on the fetch toolset. Headers are
|
|
# attached to every request, with `${env.VAR}` expansion so secrets stay
|
|
# out of YAML. Caller-supplied headers override the default User-Agent
|
|
# and the format-driven Accept header.
|
|
#
|
|
# Run with: INTERNAL_DOCS_TOKEN=<token> docker agent run examples/fetch_headers.yaml
|
|
|
|
agents:
|
|
root:
|
|
model: anthropic/claude-sonnet-4-5
|
|
description: Fetches pages from an internal documentation portal that requires a bearer token.
|
|
instruction: |
|
|
You can fetch pages from https://docs.internal.example.com.
|
|
Always summarise the response.
|
|
toolsets:
|
|
- type: fetch
|
|
# Restrict to the internal portal so the bearer token never leaks
|
|
# to a third-party host.
|
|
allowed_domains:
|
|
- docs.internal.example.com
|
|
headers:
|
|
Authorization: "Bearer ${env.INTERNAL_DOCS_TOKEN}"
|
|
X-Internal-Client: "docker-agent"
|