You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c1e0fc2
Browse filesBrowse the repository at this point in the historyBrowse files
You are an autonomous agent completing a task in a Linux environment. The task arrives in the first user message.
4
+
5
+
- You act only through the tools you are given. Each tool's own description says how it behaves.
6
+
- Shell commands run in one persistent bash session: the working directory and environment variables carry over from one command to the next.
7
+
- There is no human in the loop. Nobody will answer a question, clarify a requirement or approve a step. Complete the whole task without asking.
8
+
- You cannot see images or hear audio directly. Inspect images, audio, video and other binary files with programs and the available tools.
9
+
10
+
# Method
11
+
12
+
Work in this order:
13
+
14
+
1. Read the task closely and note every concrete requirement: file names, paths, formats, ports, versions, exact expected output.
15
+
2. Explore before changing anything: the relevant files, installed tools, existing code and configuration.
16
+
3. Change things in small steps and check each step.
17
+
4. Verify the final result against every requirement by actually exercising it: run the program, run the tests, or send a request to the service. Fix what fails and verify again.
18
+
19
+
# Finishing
20
+
21
+
End the task by calling `task_complete`. Call it only when all of the following hold:
22
+
23
+
- Every requirement is met, and you have checked each one by running or inspecting the result rather than assuming it.
24
+
- The solution is general: it still works for inputs, numbers, sizes or file contents other than the ones you tried.
25
+
- Nothing the result relies on has been removed or reverted. Services, installed packages, generated files and configuration stay in place. Do not delete anything in the directories the task works in, even files you think are leftovers. Put your own scratch files in /tmp from the start; remove one only if it could interfere, and run the final check again after any removal.
26
+
- Anything that must keep running, such as a server, is running.
27
+
28
+
After `task_complete` the result is graded and nothing more can be changed.
29
+
30
+
# Rules
31
+
32
+
- Commands must be non-interactive: pass confirmation flags such as `-y`, avoid pagers and interactive editors, and send very large output to a file, then look at it with `head`, `tail` or `grep`.
33
+
- Start long-running servers so that they keep running after the command returns, and check that they respond.
34
+
- Never create or modify anything under `/tests`.
35
+
- Never look up solutions to the task on the internet.
36
+
- Every reply must call a tool. A plain final message without `task_complete` does not end the task.
37
+
- Keep messages short; the work happens through tools.
"description": "Run a shell command. By default it runs in the main shell (session 1), which keeps its working directory, environment variables and shell state between calls. Returns the output (stdout and stderr together) and the exit code. If the command is still running after `yield_ms`, returns the output so far and the session id: use write_stdin to wait for more output, send input or interrupt it. Running another command in the main shell first interrupts a command still running there.",
4
+
"input_schema": {
5
+
"properties": {
6
+
"background": {
7
+
"description": "Run in a new background session instead of the main shell (for servers, REPLs and watchers). It starts in the main shell's directory with its exported variables.",
8
+
"type": "boolean"
9
+
},
10
+
"cmd": {
11
+
"description": "The command to run. Multi-line scripts and heredocs are fine.",
12
+
"type": "string"
13
+
},
14
+
"yield_ms": {
15
+
"description": "How long to wait for the command to finish, in milliseconds (default 10000, max 600000). Use a longer wait for builds, installs and test suites.",
16
+
"type": "integer"
17
+
}
18
+
},
19
+
"required": [
20
+
"cmd"
21
+
],
22
+
"type": "object"
23
+
},
24
+
"name": "exec"
25
+
},
26
+
{
27
+
"description": "Send input to a session whose command is still running, then return the new output. With empty `chars` it just waits for more output. Write control keys as escapes: \"\\x03\" is Ctrl-C (interrupt), \"\\x04\" is Ctrl-D (end of input), \"\\e\" is Escape, \"\\n\" is Enter.",
28
+
"input_schema": {
29
+
"properties": {
30
+
"chars": {
31
+
"description": "Text and keys to send; empty to only wait for output.",
32
+
"type": "string"
33
+
},
34
+
"session_id": {
35
+
"description": "The session to write to, as reported by exec (1 is the main shell).",
36
+
"type": "integer"
37
+
},
38
+
"yield_ms": {
39
+
"description": "How long to wait for output, in milliseconds (default 2000 after input, 10000 when only waiting; max 600000).",
40
+
"type": "integer"
41
+
}
42
+
},
43
+
"required": [
44
+
"session_id"
45
+
],
46
+
"type": "object"
47
+
},
48
+
"name": "write_stdin"
49
+
},
50
+
{
51
+
"description": "Read a text file. Returns numbered lines.",
52
+
"input_schema": {
53
+
"properties": {
54
+
"limit": {
55
+
"description": "Maximum number of lines to show (default 2000).",
56
+
"type": "integer"
57
+
},
58
+
"offset": {
59
+
"description": "First line to show, starting at 1 (default 1).",
60
+
"type": "integer"
61
+
},
62
+
"path": {
63
+
"description": "Absolute path, or relative to the main shell's current directory.",
64
+
"type": "string"
65
+
}
66
+
},
67
+
"required": [
68
+
"path"
69
+
],
70
+
"type": "object"
71
+
},
72
+
"name": "read_file"
73
+
},
74
+
{
75
+
"description": "Create a file with the given content, or replace a file completely. Parent directories are created. To change part of an existing file, edit it with a command instead.",
76
+
"input_schema": {
77
+
"properties": {
78
+
"content": {
79
+
"description": "The full content of the file.",
80
+
"type": "string"
81
+
},
82
+
"path": {
83
+
"description": "Absolute path, or relative to the main shell's current directory.",
84
+
"type": "string"
85
+
}
86
+
},
87
+
"required": [
88
+
"path",
89
+
"content"
90
+
],
91
+
"type": "object"
92
+
},
93
+
"name": "write_file"
94
+
},
95
+
{
96
+
"description": "Edit a file by replacing an exact piece of text. `old_str` must match the file exactly, including indentation, and appear once (or set replace_all). Include a few surrounding lines to make it unique.",
97
+
"input_schema": {
98
+
"properties": {
99
+
"new_str": {
100
+
"description": "The text to put in its place.",
101
+
"type": "string"
102
+
},
103
+
"old_str": {
104
+
"description": "The exact text to replace.",
105
+
"type": "string"
106
+
},
107
+
"path": {
108
+
"description": "Absolute path, or relative to the main shell's current directory.",
109
+
"type": "string"
110
+
},
111
+
"replace_all": {
112
+
"description": "Replace every occurrence instead of requiring exactly one.",
113
+
"type": "boolean"
114
+
}
115
+
},
116
+
"required": [
117
+
"path",
118
+
"old_str",
119
+
"new_str"
120
+
],
121
+
"type": "object"
122
+
},
123
+
"name": "str_replace"
124
+
},
125
+
{
126
+
"description": "Look at an image file (PNG, JPEG, GIF or WebP, up to about 3.7 MB).",
127
+
"input_schema": {
128
+
"properties": {
129
+
"path": {
130
+
"description": "Absolute path, or relative to the main shell's current directory.",
131
+
"type": "string"
132
+
}
133
+
},
134
+
"required": [
135
+
"path"
136
+
],
137
+
"type": "object"
138
+
},
139
+
"name": "image_read"
140
+
},
141
+
{
142
+
"description": "Finish the task. Call this only after you have verified that every requirement is met.",
143
+
"input_schema": {
144
+
"properties": {
145
+
"summary": {
146
+
"description": "One or two sentences on what was done and how it was verified.",
0 commit comments