-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathtools.toml.example
More file actions
161 lines (142 loc) · 4.4 KB
/
tools.toml.example
File metadata and controls
161 lines (142 loc) · 4.4 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# OpenCrabs Dynamic Tools
# Copy to ~/.opencrabs/tools.toml and customize.
#
# These are runtime-defined tools the agent can call autonomously.
# Unlike commands.toml (user-triggered slash commands), these appear
# in the LLM's tool list and the agent decides when to use them.
#
# Changes are hot-reloaded — no restart needed.
# The agent can also manage tools via the `tool_manage` meta-tool.
# --- HTTP Tools ---
[[tools]]
name = "health_check"
description = "Check if a service endpoint is healthy"
executor = "http"
method = "GET"
url = "https://{{host}}/health"
timeout_secs = 10
requires_approval = false
enabled = true
[[tools.params]]
name = "host"
type = "string"
description = "Hostname or IP to check (e.g. api.example.com)"
required = true
[[tools]]
name = "github_api"
description = "Query the GitHub REST API"
executor = "http"
method = "GET"
url = "https://api.github.com/{{endpoint}}"
headers = { "Authorization" = "Bearer {{token}}", "Accept" = "application/vnd.github+json" }
timeout_secs = 15
requires_approval = true
enabled = true
[[tools.params]]
name = "endpoint"
type = "string"
description = "API path (e.g. repos/owner/repo/issues)"
required = true
[[tools.params]]
name = "token"
type = "string"
description = "GitHub personal access token"
required = true
[[tools]]
name = "webhook_notify"
description = "Send a notification to a webhook URL"
executor = "http"
method = "POST"
url = "{{webhook_url}}"
headers = { "Content-Type" = "application/json" }
timeout_secs = 10
requires_approval = true
enabled = false
[[tools.params]]
name = "webhook_url"
type = "string"
description = "Full webhook URL"
required = true
# --- Shell Tools ---
[[tools]]
name = "disk_usage"
description = "Show disk usage for a directory"
executor = "shell"
command = "du -sh {{path}} 2>/dev/null || echo 'Path not found'"
timeout_secs = 10
requires_approval = false
enabled = true
[[tools.params]]
name = "path"
type = "string"
description = "Directory path to check"
required = true
[[tools]]
name = "docker_status"
description = "List running Docker containers"
executor = "shell"
command = "docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"
timeout_secs = 10
requires_approval = false
enabled = true
[[tools]]
name = "git_log_summary"
description = "Show recent git commits in a repository"
executor = "shell"
command = "cd {{repo_path}} && git log --oneline -{{count}}"
timeout_secs = 10
requires_approval = false
enabled = true
[[tools.params]]
name = "repo_path"
type = "string"
description = "Path to the git repository"
required = true
[[tools.params]]
name = "count"
type = "string"
description = "Number of commits to show"
required = false
[[tools]]
name = "deploy_staging"
description = "Deploy a branch to the staging environment"
executor = "shell"
command = "cd ~/project && ./deploy.sh {{branch}} staging"
timeout_secs = 120
requires_approval = true
enabled = false
[[tools.params]]
name = "branch"
type = "string"
description = "Git branch to deploy"
required = true
# --- Built-in RSI Tools (no config needed) ---
#
# OpenCrabs has 3 built-in Recursive Self-Improvement tools that work
# out of the box — no tools.toml entry needed:
#
# feedback_record — Log observations (tool outcomes, user corrections, patterns)
# feedback_analyze — Query the feedback ledger (summary, tool_stats, recent, failures)
# self_improve — Propose/apply brain file changes (requires human approval)
#
# These are compiled-in tools, not dynamic tools. They appear automatically
# in the LLM tool list. Tool executions are auto-recorded to the feedback
# ledger — the agent also calls feedback_record/feedback_analyze manually
# when it notices patterns worth tracking.
# --- Field Reference ---
#
# name (required) Tool name — used by the agent to call it
# description (required) What the tool does — shown to the LLM
# executor (required) "http" or "shell"
# enabled (optional) true/false, default: true
# requires_approval (optional) true/false, default: true
# timeout_secs (optional) Execution timeout, default: 30
# params (optional) Parameter definitions (name, type, description, required)
#
# HTTP-specific:
# method "GET", "POST", "PUT", "DELETE", etc.
# url URL with {{param}} template variables
# headers Key-value map, supports {{param}} substitution
#
# Shell-specific:
# command Shell command with {{param}} template variables