Skip to content

Commit 3a512b8

Browse files
authored
Merge pull request #1419 from 3clyp50/prompts
prompts: restore tool examples for better model guidance
2 parents 756654b + ef92a5e commit 3a512b8

7 files changed

Lines changed: 128 additions & 6 deletions

plugins/_code_execution/prompts/agent.system.tool.code_exe.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@ args:
66
- `session`: terminal session id; default `0`
77
- `reset`: kill a session before running; `true` or `false`
88
rules:
9+
- place the command or script in `code`
910
- use `runtime=output` to poll running work
1011
- use `input` for interactive terminal prompts
12+
- if a session is stuck, call again with the same `session` and `reset=true`
13+
- check dependencies before running code
14+
- replace placeholder or demo data with real values before execution
15+
- use `print()` or `console.log()` when you need explicit output
1116
- do not interleave other tools while waiting
1217
- ignore framework `[SYSTEM: ...]` info in output
13-
example:
18+
examples:
19+
1 terminal command
1420
~~~json
1521
{
1622
"thoughts": ["I should run a terminal command in the default session."],
@@ -24,3 +30,31 @@ example:
2430
}
2531
}
2632
~~~
33+
34+
2 python snippet
35+
~~~json
36+
{
37+
"thoughts": ["A short Python check is faster than using the shell."],
38+
"headline": "Running Python snippet",
39+
"tool_name": "code_execution_tool",
40+
"tool_args": {
41+
"runtime": "python",
42+
"session": 0,
43+
"reset": false,
44+
"code": "import os\nprint(os.getcwd())"
45+
}
46+
}
47+
~~~
48+
49+
3 wait for running output
50+
~~~json
51+
{
52+
"thoughts": ["The previous command is still running, so I should poll for output."],
53+
"headline": "Waiting for command output",
54+
"tool_name": "code_execution_tool",
55+
"tool_args": {
56+
"runtime": "output",
57+
"session": 0
58+
}
59+
}
60+
~~~

prompts/agent.system.tool.call_sub.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ example:
1818
}
1919
~~~
2020
reuse long subordinate output with `§§include(path)` instead of rewriting it
21+
{{if agent_profiles}}
22+
available profiles:
23+
{{agent_profiles}}
24+
{{endif}}

prompts/agent.system.tool.document_query.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,37 @@ args:
44
- `document`: url path or list of them
55
- `queries`: optional list of questions
66
- `query`: optional single-question alias
7-
without `query` or `queries` it returns document content
8-
for local files use full path; for web documents use full urls
7+
- without `query` or `queries` it returns document content
8+
- `document` accepts one path/url or a list for cross-document comparison
9+
- for local files use full paths; for web documents use full urls
10+
examples:
11+
1 read a document
12+
~~~json
13+
{
14+
"thoughts": ["I need the full contents of the report before answering."],
15+
"headline": "Loading report contents",
16+
"tool_name": "document_query",
17+
"tool_args": {
18+
"document": "https://example.com/report.pdf"
19+
}
20+
}
21+
~~~
22+
23+
2 compare documents with questions
24+
~~~json
25+
{
26+
"thoughts": ["I need targeted answers across two documents."],
27+
"headline": "Comparing two documents",
28+
"tool_name": "document_query",
29+
"tool_args": {
30+
"document": [
31+
"https://example.com/report-one.pdf",
32+
"/path/to/report-two.pdf"
33+
],
34+
"queries": [
35+
"Compare the main conclusions.",
36+
"What changed between the two versions?"
37+
]
38+
}
39+
}
40+
~~~

prompts/agent.system.tool.scheduler.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,14 @@ methods:
1414
- `scheduler:create_adhoc_task`: `name`, `system_prompt`, `prompt`, optional `attachments[]`, optional `dedicated_context`
1515
- `scheduler:create_planned_task`: `name`, `system_prompt`, `prompt`, optional `attachments[]`, `plan[]` iso datetimes like `2025-04-29T18:25:00`, optional `dedicated_context`
1616
- `scheduler:wait_for_task`: `uuid`; works for dedicated-context tasks
17+
example:
18+
~~~json
19+
{
20+
"thoughts": ["I should check for an existing task before I create or run anything."],
21+
"headline": "Looking up scheduled task",
22+
"tool_name": "scheduler:find_task_by_name",
23+
"tool_args": {
24+
"name": "daily backup"
25+
}
26+
}
27+
~~~

prompts/agent.system.tool.search_engine.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,14 @@
22
find live news, prices, and other real-time web data
33
arg: `query` (text search query)
44
returns urls, titles, and descriptions
5+
example:
6+
~~~json
7+
{
8+
"thoughts": ["I need current information rather than relying on memory."],
9+
"headline": "Searching the web",
10+
"tool_name": "search_engine",
11+
"tool_args": {
12+
"query": "latest LiteLLM release notes"
13+
}
14+
}
15+
~~~
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
### skills_tool
22
use skills only when relevant
3+
workflow:
34
- `skills_tool:list`: discover available skills
45
- `skills_tool:load`: load one skill by `skill_name`
56
after loading a skill, follow its instructions and use referenced files or scripts with other tools
67
reload a skill if its instructions are no longer in context
8+
example:
9+
~~~json
10+
{
11+
"thoughts": ["A skill may already encode the workflow I need."],
12+
"headline": "Loading relevant skill",
13+
"tool_name": "skills_tool:load",
14+
"tool_args": {
15+
"skill_name": "playwright"
16+
}
17+
}
18+
~~~
Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1+
## multimodal vision tools
2+
13
### vision_load
2-
load images into the model
3-
args: `paths` list of image paths
4-
use when visual inspection is needed
4+
load images into the model for visual reasoning
5+
args: `paths` list of absolute image paths
6+
rules:
7+
- load all relevant images in one call when comparing screenshots or pages
8+
- use when the task depends on screenshots, diagrams, scanned documents, charts, or photos
9+
- only bitmaps are supported; convert other formats first if needed
10+
example:
11+
```json
12+
{
13+
"thoughts": [
14+
"I need to inspect the screenshot before answering."
15+
],
16+
"headline": "Loading screenshot for visual analysis",
17+
"tool_name": "vision_load",
18+
"tool_args": {
19+
"paths": ["/path/to/screenshot.png"]
20+
}
21+
}
22+
```

0 commit comments

Comments
 (0)