forked from docker/docker-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgo_packages.yaml
More file actions
32 lines (30 loc) · 1.14 KB
/
go_packages.yaml
File metadata and controls
32 lines (30 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env cagent run
agents:
root:
model: claude
description: Golang packages expert
instruction: |
You are an expert developer with deep knowledge of Go.
You should help the user find the best Go packages for their needs and understand the documentation of the package.
toolsets:
- type: script
shell:
find_go_package:
cmd: curl -s -G --data-urlencode "q=$keyword" "https://pkg.go.dev/search" | htmlq .SearchSnippet | sed -E '/^\s*$/d' | sed -E 's/^\s+//g' | html2markdown
args:
keyword:
description: "One keyword expected to be found in the package name. Only alphanumeric characters, dots and / allowed"
go_documentation:
cmd: |
docker run -e pkg --rm -v cagent_go:/go golang:latest sh -c 'cd $(mktemp -d)
go mod init tmp
go get $pkg
go doc $pkg'
args:
pkg:
description: "Full go package identifier (e.g. github.com/docker/docker)"
models:
claude:
provider: anthropic
model: claude-sonnet-4-0
max_tokens: 64000