Backup-bdg commited on
Commit
9678537
·
verified ·
1 Parent(s): bbdb7f0

Delete docs

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. docs/DOC_STYLE_GUIDE.md +0 -67
  2. docs/docs.json +0 -204
  3. docs/favicon.svg +0 -19
  4. docs/index.mdx +0 -16
  5. docs/logo-square.png +0 -3
  6. docs/logo/dark.svg +0 -29
  7. docs/logo/light.svg +0 -29
  8. docs/openapi.json +0 -2091
  9. docs/static/img/backend_architecture.png +0 -3
  10. docs/static/img/backend_architecture.puml +0 -201
  11. docs/static/img/backend_architecture.svg +0 -0
  12. docs/static/img/connect-repo.png +0 -0
  13. docs/static/img/docs/api-key-generation.png +0 -0
  14. docs/static/img/logo-square.png +0 -3
  15. docs/static/img/logo.png +0 -0
  16. docs/static/img/oh-features.png +0 -3
  17. docs/static/img/results.png +0 -3
  18. docs/static/img/screenshot.png +0 -3
  19. docs/static/img/system_architecture.png +0 -0
  20. docs/static/img/system_architecture.puml +0 -67
  21. docs/static/img/system_architecture.svg +0 -1
  22. docs/static/img/system_architecture_overview.png +0 -3
  23. docs/static/img/teaser.mp4 +0 -3
  24. docs/usage/about.mdx +0 -30
  25. docs/usage/agents.mdx +0 -26
  26. docs/usage/architecture/backend.mdx +0 -56
  27. docs/usage/architecture/runtime.mdx +0 -136
  28. docs/usage/cloud/cloud-api.mdx +0 -176
  29. docs/usage/cloud/cloud-ui.mdx +0 -36
  30. docs/usage/cloud/github-installation.mdx +0 -71
  31. docs/usage/cloud/gitlab-installation.mdx +0 -25
  32. docs/usage/cloud/openhands-cloud.mdx +0 -26
  33. docs/usage/configuration-options.mdx +0 -413
  34. docs/usage/feedback.mdx +0 -50
  35. docs/usage/getting-started.mdx +0 -100
  36. docs/usage/how-to/cli-mode.mdx +0 -105
  37. docs/usage/how-to/custom-sandbox-guide.mdx +0 -100
  38. docs/usage/how-to/debugging.mdx +0 -73
  39. docs/usage/how-to/development-overview.mdx +0 -71
  40. docs/usage/how-to/evaluation-harness.mdx +0 -280
  41. docs/usage/how-to/github-action.mdx +0 -53
  42. docs/usage/how-to/gui-mode.mdx +0 -143
  43. docs/usage/how-to/headless-mode.mdx +0 -57
  44. docs/usage/how-to/websocket-connection.mdx +0 -179
  45. docs/usage/installation.mdx +0 -19
  46. docs/usage/key-features.mdx +0 -32
  47. docs/usage/llms/azure-llms.mdx +0 -42
  48. docs/usage/llms/custom-llm-configs.mdx +0 -137
  49. docs/usage/llms/google-llms.mdx +0 -30
  50. docs/usage/llms/groq.mdx +0 -23
docs/DOC_STYLE_GUIDE.md DELETED
@@ -1,67 +0,0 @@
1
- # Documentation Style Guide
2
-
3
- ## General Writing Principles
4
-
5
- - **Clarity & Conciseness**: Always prioritize clarity and brevity. Avoid unnecessary jargon or overly complex explanations.
6
- Keep sentences short and to the point.
7
- - **Gradual Complexity**: Start with the simplest, most basic setup, and then gradually introduce more advanced
8
- concepts and configurations.
9
-
10
- ## Formatting Guidelines
11
-
12
- ### Headers
13
-
14
- Use **Title Case** for the first and second level headers.
15
-
16
- Example:
17
- - **Basic Usage**
18
- - **Advanced Configuration Options**
19
-
20
- ### Lists
21
-
22
- When listing items or options, use bullet points to enhance readability.
23
-
24
- Example:
25
- - Option A
26
- - Option B
27
- - Option C
28
-
29
- ### Procedures
30
-
31
- For instructions or processes that need to be followed in a specific order, use numbered steps.
32
-
33
- Example:
34
- 1. Step one: Do this.
35
- - First this sub step.
36
- - Then this sub step.
37
- 2. Step two: Complete this action.
38
- 3. Step three: Verify the result.
39
-
40
- ### Code Blocks
41
-
42
- * Use code blocks for multi-line inputs, outputs, commands and code samples.
43
-
44
- Example:
45
- ```bash
46
- docker run -it \
47
- -e THIS=this \
48
- -e THAT=that
49
- ...
50
- ```
51
-
52
- ### Use of Note and Warning
53
-
54
- When adding a note or warning, use the built-in note and warning syntax.
55
-
56
- Example:
57
- <Note>
58
- This section is for advanced users only.
59
- </Note>
60
-
61
- ### Referring to UI Elements
62
-
63
- When referencing UI elements, use ``.
64
-
65
- Example:
66
- 1. Toggle the `Advanced` option
67
- 2. Enter your model in the `Custom Model` textbox.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/docs.json DELETED
@@ -1,204 +0,0 @@
1
- {
2
- "$schema": "https://mintlify.com/docs.json",
3
- "theme": "mint",
4
- "name": "All Hands Docs",
5
- "colors": {
6
- "primary": "#99873c",
7
- "light": "#ffe165",
8
- "dark": "#ffe165"
9
- },
10
- "background": {
11
- "color": {
12
- "light": "#f7f3ee",
13
- "dark": "#0B0D0E"
14
- }
15
- },
16
- "appearance": {
17
- "default": "light"
18
- },
19
- "favicon": "/logo-square.png",
20
- "navigation": {
21
- "tabs": [
22
- {
23
- "tab": "Docs",
24
- "pages": [
25
- "index",
26
- "usage/installation",
27
- "usage/getting-started",
28
- "usage/key-features",
29
- {
30
- "group": "OpenHands Cloud",
31
- "pages": [
32
- "usage/cloud/openhands-cloud",
33
- {
34
- "group": "Integrations",
35
- "pages": [
36
- "usage/cloud/github-installation",
37
- "usage/cloud/gitlab-installation"
38
- ]
39
- },
40
- "usage/cloud/cloud-ui",
41
- "usage/cloud/cloud-api"
42
- ]
43
- },
44
- {
45
- "group": "Running OpenHands Locally",
46
- "pages": [
47
- "usage/local-setup",
48
- "usage/how-to/gui-mode",
49
- "usage/how-to/cli-mode",
50
- "usage/how-to/headless-mode",
51
- "usage/how-to/github-action"
52
- ]
53
- },
54
- {
55
- "group": "Customization",
56
- "pages": [
57
- "usage/prompting/prompting-best-practices",
58
- "usage/prompting/repository",
59
- {
60
- "group": "Microagents",
61
- "pages": [
62
- "usage/prompting/microagents-overview",
63
- "usage/prompting/microagents-repo",
64
- "usage/prompting/microagents-keyword",
65
- "usage/prompting/microagents-org",
66
- "usage/prompting/microagents-public"
67
- ]
68
- }
69
- ]
70
- },
71
- {
72
- "group": "Advanced Configuration",
73
- "pages": [
74
- {
75
- "group": "LLM Configuration",
76
- "pages": [
77
- "usage/llms/llms",
78
- {
79
- "group": "Providers",
80
- "pages": [
81
- "usage/llms/azure-llms",
82
- "usage/llms/google-llms",
83
- "usage/llms/groq",
84
- "usage/llms/local-llms",
85
- "usage/llms/litellm-proxy",
86
- "usage/llms/openai-llms",
87
- "usage/llms/openrouter"
88
- ]
89
- }
90
- ]
91
- },
92
- {
93
- "group": "Runtime Configuration",
94
- "pages": [
95
- "usage/runtimes/overview",
96
- {
97
- "group": "Providers",
98
- "pages": [
99
- "usage/runtimes/docker",
100
- "usage/runtimes/remote",
101
- "usage/runtimes/local",
102
- {
103
- "group": "Third-Party Providers",
104
- "pages": [
105
- "usage/runtimes/modal",
106
- "usage/runtimes/daytona",
107
- "usage/runtimes/runloop",
108
- "usage/runtimes/e2b"
109
- ]
110
- }
111
- ]
112
- }
113
- ]
114
- },
115
- "usage/configuration-options",
116
- "usage/how-to/custom-sandbox-guide",
117
- "usage/search-engine-setup",
118
- "usage/mcp"
119
- ]
120
- },
121
- {
122
- "group": "Troubleshooting & Feedback",
123
- "pages": [
124
- "usage/troubleshooting/troubleshooting",
125
- "usage/feedback"
126
- ]
127
- },
128
- {
129
- "group": "OpenHands Developers",
130
- "pages": [
131
- "usage/how-to/development-overview",
132
- {
133
- "group": "Architecture",
134
- "pages": [
135
- "usage/architecture/backend",
136
- "usage/architecture/runtime"
137
- ]
138
- },
139
- "usage/how-to/debugging",
140
- "usage/how-to/evaluation-harness",
141
- "usage/how-to/websocket-connection"
142
- ]
143
- }
144
- ]
145
- },
146
- {
147
- "tab": "API Reference",
148
- "openapi": "/openapi.json"
149
- }
150
- ],
151
- "global": {
152
- "anchors": [
153
- {
154
- "anchor": "Company",
155
- "href": "https://www.all-hands.dev/",
156
- "icon": "house"
157
- },
158
- {
159
- "anchor": "Blog",
160
- "href": "https://www.all-hands.dev/blog",
161
- "icon": "newspaper"
162
- },
163
- {
164
- "anchor": "OpenHands Cloud",
165
- "href": "https://app.all-hands.dev",
166
- "icon": "cloud"
167
- }
168
- ]
169
- }
170
- },
171
- "logo": {
172
- "light": "/logo/light.svg",
173
- "dark": "/logo/dark.svg"
174
- },
175
- "navbar": {
176
- "links": [
177
- ],
178
- "primary": {
179
- "type": "github",
180
- "href": "https://github.com/All-Hands-AI/OpenHands"
181
- }
182
- },
183
- "footer": {
184
- "socials": {
185
- "slack": "https://join.slack.com/t/openhands-ai/shared_invite/zt-34zm4j0gj-Qz5kRHoca8DFCbqXPS~f_A",
186
- "github": "https://github.com/All-Hands-AI/OpenHands",
187
- "discord": "https://discord.gg/ESHStjSjD4"
188
- }
189
- },
190
- "contextual": {
191
- "options": [
192
- "copy",
193
- "view",
194
- "chatgpt",
195
- "claude"
196
- ]
197
- },
198
- "redirects": [
199
- {
200
- "source": "/modules/:slug*",
201
- "destination": "/:slug*"
202
- }
203
- ]
204
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/favicon.svg DELETED
docs/index.mdx DELETED
@@ -1,16 +0,0 @@
1
- ---
2
- title: Introduction
3
- description: OpenHands - Code Less, Make More
4
- icon: book-open
5
- mode: wide
6
- ---
7
- Use AI to tackle the toil in your backlog. Our agents have all the same tools as a human developer: they can modify code, run commands, browse the web, call APIs, and yes-even copy code snippets from StackOverflow.
8
-
9
- <iframe
10
- className="w-full aspect-video"
11
- src="https://www.youtube.com/embed/oB4JR98KRAA"
12
- title="YouTube video player"
13
- frameborder="0"
14
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
15
- allowfullscreen
16
- ></iframe>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/logo-square.png DELETED

Git LFS Details

  • SHA256: de58ad6132a9afb7d4924612c5e013695658af993a81a7611a6564f6a8063d59
  • Pointer size: 132 Bytes
  • Size of remote file: 1.19 MB
docs/logo/dark.svg DELETED
docs/logo/light.svg DELETED
docs/openapi.json DELETED
@@ -1,2091 +0,0 @@
1
- {
2
- "openapi": "3.0.3",
3
- "info": {
4
- "title": "OpenHands API",
5
- "description": "OpenHands: Code Less, Make More",
6
- "version": "1.0.0"
7
- },
8
- "servers": [
9
- {
10
- "url": "https://app.all-hands.dev",
11
- "description": "Production server"
12
- },
13
- {
14
- "url": "http://localhost:3000",
15
- "description": "Local development server"
16
- }
17
- ],
18
- "paths": {
19
- "/health": {
20
- "get": {
21
- "summary": "Health check",
22
- "description": "Check if the API is running",
23
- "operationId": "health",
24
- "responses": {
25
- "200": {
26
- "description": "API is running",
27
- "content": {
28
- "text/plain": {
29
- "schema": {
30
- "type": "string",
31
- "example": "OK"
32
- }
33
- }
34
- }
35
- }
36
- }
37
- }
38
- },
39
- "/api/conversations/{conversation_id}/config": {
40
- "get": {
41
- "summary": "Get runtime configuration",
42
- "description": "Retrieve the runtime configuration (session ID and runtime ID)",
43
- "operationId": "getRemoteRuntimeConfig",
44
- "parameters": [
45
- {
46
- "name": "conversation_id",
47
- "in": "path",
48
- "required": true,
49
- "schema": {
50
- "type": "string"
51
- },
52
- "description": "Conversation ID"
53
- }
54
- ],
55
- "responses": {
56
- "200": {
57
- "description": "Runtime configuration",
58
- "content": {
59
- "application/json": {
60
- "schema": {
61
- "type": "object",
62
- "properties": {
63
- "runtime_id": {
64
- "type": "string",
65
- "nullable": true
66
- },
67
- "session_id": {
68
- "type": "string",
69
- "nullable": true
70
- }
71
- }
72
- }
73
- }
74
- }
75
- }
76
- }
77
- }
78
- },
79
- "/api/conversations/{conversation_id}/vscode-url": {
80
- "get": {
81
- "summary": "Get VSCode URL",
82
- "description": "Get the VSCode URL for the conversation",
83
- "operationId": "getVscodeUrl",
84
- "parameters": [
85
- {
86
- "name": "conversation_id",
87
- "in": "path",
88
- "required": true,
89
- "schema": {
90
- "type": "string"
91
- },
92
- "description": "Conversation ID"
93
- }
94
- ],
95
- "responses": {
96
- "200": {
97
- "description": "VSCode URL",
98
- "content": {
99
- "application/json": {
100
- "schema": {
101
- "type": "object",
102
- "properties": {
103
- "vscode_url": {
104
- "type": "string",
105
- "nullable": true
106
- }
107
- }
108
- }
109
- }
110
- }
111
- },
112
- "500": {
113
- "description": "Error getting VSCode URL",
114
- "content": {
115
- "application/json": {
116
- "schema": {
117
- "type": "object",
118
- "properties": {
119
- "vscode_url": {
120
- "type": "string",
121
- "nullable": true
122
- },
123
- "error": {
124
- "type": "string"
125
- }
126
- }
127
- }
128
- }
129
- }
130
- }
131
- }
132
- }
133
- },
134
- "/api/conversations/{conversation_id}/web-hosts": {
135
- "get": {
136
- "summary": "Get runtime hosts",
137
- "description": "Get the hosts used by the runtime",
138
- "operationId": "getHosts",
139
- "parameters": [
140
- {
141
- "name": "conversation_id",
142
- "in": "path",
143
- "required": true,
144
- "schema": {
145
- "type": "string"
146
- },
147
- "description": "Conversation ID"
148
- }
149
- ],
150
- "responses": {
151
- "200": {
152
- "description": "Runtime hosts",
153
- "content": {
154
- "application/json": {
155
- "schema": {
156
- "type": "object",
157
- "properties": {
158
- "hosts": {
159
- "type": "array",
160
- "items": {
161
- "type": "string"
162
- }
163
- }
164
- }
165
- }
166
- }
167
- }
168
- },
169
- "500": {
170
- "description": "Error getting runtime hosts",
171
- "content": {
172
- "application/json": {
173
- "schema": {
174
- "type": "object",
175
- "properties": {
176
- "hosts": {
177
- "type": "array",
178
- "items": {
179
- "type": "string"
180
- },
181
- "nullable": true
182
- },
183
- "error": {
184
- "type": "string"
185
- }
186
- }
187
- }
188
- }
189
- }
190
- }
191
- }
192
- }
193
- },
194
- "/api/conversations/{conversation_id}/submit-feedback": {
195
- "post": {
196
- "summary": "Submit feedback",
197
- "description": "Submit user feedback for a conversation",
198
- "operationId": "submitFeedback",
199
- "parameters": [
200
- {
201
- "name": "conversation_id",
202
- "in": "path",
203
- "required": true,
204
- "schema": {
205
- "type": "string"
206
- },
207
- "description": "Conversation ID"
208
- }
209
- ],
210
- "requestBody": {
211
- "required": true,
212
- "content": {
213
- "application/json": {
214
- "schema": {
215
- "type": "object",
216
- "properties": {
217
- "email": {
218
- "type": "string",
219
- "format": "email"
220
- },
221
- "version": {
222
- "type": "string"
223
- },
224
- "permissions": {
225
- "type": "string",
226
- "default": "private"
227
- },
228
- "polarity": {
229
- "type": "string"
230
- },
231
- "feedback": {
232
- "type": "string"
233
- }
234
- }
235
- }
236
- }
237
- }
238
- },
239
- "responses": {
240
- "200": {
241
- "description": "Feedback submitted successfully",
242
- "content": {
243
- "application/json": {
244
- "schema": {
245
- "type": "object"
246
- }
247
- }
248
- }
249
- },
250
- "500": {
251
- "description": "Error submitting feedback",
252
- "content": {
253
- "application/json": {
254
- "schema": {
255
- "type": "object",
256
- "properties": {
257
- "error": {
258
- "type": "string"
259
- }
260
- }
261
- }
262
- }
263
- }
264
- }
265
- }
266
- }
267
- },
268
- "/api/conversations/{conversation_id}/list-files": {
269
- "get": {
270
- "summary": "List files",
271
- "description": "List files in the specified path",
272
- "operationId": "listFiles",
273
- "parameters": [
274
- {
275
- "name": "conversation_id",
276
- "in": "path",
277
- "required": true,
278
- "schema": {
279
- "type": "string"
280
- },
281
- "description": "Conversation ID"
282
- },
283
- {
284
- "name": "path",
285
- "in": "query",
286
- "required": false,
287
- "schema": {
288
- "type": "string"
289
- },
290
- "description": "Path to list files from"
291
- }
292
- ],
293
- "responses": {
294
- "200": {
295
- "description": "List of files",
296
- "content": {
297
- "application/json": {
298
- "schema": {
299
- "type": "array",
300
- "items": {
301
- "type": "string"
302
- }
303
- }
304
- }
305
- }
306
- },
307
- "404": {
308
- "description": "Runtime not initialized",
309
- "content": {
310
- "application/json": {
311
- "schema": {
312
- "type": "object",
313
- "properties": {
314
- "error": {
315
- "type": "string"
316
- }
317
- }
318
- }
319
- }
320
- }
321
- },
322
- "500": {
323
- "description": "Error listing files",
324
- "content": {
325
- "application/json": {
326
- "schema": {
327
- "type": "object",
328
- "properties": {
329
- "error": {
330
- "type": "string"
331
- }
332
- }
333
- }
334
- }
335
- }
336
- }
337
- }
338
- }
339
- },
340
- "/api/conversations/{conversation_id}/select-file": {
341
- "get": {
342
- "summary": "Get file content",
343
- "description": "Retrieve the content of a specified file",
344
- "operationId": "selectFile",
345
- "parameters": [
346
- {
347
- "name": "conversation_id",
348
- "in": "path",
349
- "required": true,
350
- "schema": {
351
- "type": "string"
352
- },
353
- "description": "Conversation ID"
354
- },
355
- {
356
- "name": "file",
357
- "in": "query",
358
- "required": true,
359
- "schema": {
360
- "type": "string"
361
- },
362
- "description": "Path of the file to be retrieved"
363
- }
364
- ],
365
- "responses": {
366
- "200": {
367
- "description": "File content",
368
- "content": {
369
- "application/json": {
370
- "schema": {
371
- "type": "object",
372
- "properties": {
373
- "code": {
374
- "type": "string"
375
- }
376
- }
377
- }
378
- }
379
- }
380
- },
381
- "415": {
382
- "description": "Unable to open binary file",
383
- "content": {
384
- "application/json": {
385
- "schema": {
386
- "type": "object",
387
- "properties": {
388
- "error": {
389
- "type": "string"
390
- }
391
- }
392
- }
393
- }
394
- }
395
- },
396
- "500": {
397
- "description": "Error opening file",
398
- "content": {
399
- "application/json": {
400
- "schema": {
401
- "type": "object",
402
- "properties": {
403
- "error": {
404
- "type": "string"
405
- }
406
- }
407
- }
408
- }
409
- }
410
- }
411
- }
412
- }
413
- },
414
- "/api/conversations/{conversation_id}/zip-directory": {
415
- "get": {
416
- "summary": "Download workspace as zip",
417
- "description": "Download the current workspace as a zip file",
418
- "operationId": "zipCurrentWorkspace",
419
- "parameters": [
420
- {
421
- "name": "conversation_id",
422
- "in": "path",
423
- "required": true,
424
- "schema": {
425
- "type": "string"
426
- },
427
- "description": "Conversation ID"
428
- }
429
- ],
430
- "responses": {
431
- "200": {
432
- "description": "Workspace zip file",
433
- "content": {
434
- "application/zip": {
435
- "schema": {
436
- "type": "string",
437
- "format": "binary"
438
- }
439
- }
440
- }
441
- },
442
- "500": {
443
- "description": "Error zipping workspace",
444
- "content": {
445
- "application/json": {
446
- "schema": {
447
- "type": "object",
448
- "properties": {
449
- "error": {
450
- "type": "string"
451
- }
452
- }
453
- }
454
- }
455
- }
456
- }
457
- }
458
- }
459
- },
460
- "/api/conversations/{conversation_id}/git/changes": {
461
- "get": {
462
- "summary": "Get git changes",
463
- "description": "Get git changes in the workspace",
464
- "operationId": "gitChanges",
465
- "parameters": [
466
- {
467
- "name": "conversation_id",
468
- "in": "path",
469
- "required": true,
470
- "schema": {
471
- "type": "string"
472
- },
473
- "description": "Conversation ID"
474
- }
475
- ],
476
- "responses": {
477
- "200": {
478
- "description": "Git changes",
479
- "content": {
480
- "application/json": {
481
- "schema": {
482
- "type": "object"
483
- }
484
- }
485
- }
486
- },
487
- "500": {
488
- "description": "Error getting git changes",
489
- "content": {
490
- "application/json": {
491
- "schema": {
492
- "type": "object",
493
- "properties": {
494
- "error": {
495
- "type": "string"
496
- }
497
- }
498
- }
499
- }
500
- }
501
- }
502
- }
503
- }
504
- },
505
- "/api/conversations/{conversation_id}/git/diff": {
506
- "get": {
507
- "summary": "Get git diff",
508
- "description": "Get git diff for a specific file",
509
- "operationId": "gitDiff",
510
- "parameters": [
511
- {
512
- "name": "conversation_id",
513
- "in": "path",
514
- "required": true,
515
- "schema": {
516
- "type": "string"
517
- },
518
- "description": "Conversation ID"
519
- },
520
- {
521
- "name": "path",
522
- "in": "query",
523
- "required": true,
524
- "schema": {
525
- "type": "string"
526
- },
527
- "description": "Path of the file to get diff for"
528
- }
529
- ],
530
- "responses": {
531
- "200": {
532
- "description": "Git diff",
533
- "content": {
534
- "application/json": {
535
- "schema": {
536
- "type": "string"
537
- }
538
- }
539
- }
540
- },
541
- "500": {
542
- "description": "Error getting git diff",
543
- "content": {
544
- "application/json": {
545
- "schema": {
546
- "type": "object",
547
- "properties": {
548
- "error": {
549
- "type": "string"
550
- }
551
- }
552
- }
553
- }
554
- }
555
- }
556
- }
557
- }
558
- },
559
- "/api/conversations/{conversation_id}/trajectory": {
560
- "get": {
561
- "summary": "Get trajectory",
562
- "description": "Get the conversation trajectory",
563
- "operationId": "getTrajectory",
564
- "parameters": [
565
- {
566
- "name": "conversation_id",
567
- "in": "path",
568
- "required": true,
569
- "schema": {
570
- "type": "string"
571
- },
572
- "description": "Conversation ID"
573
- }
574
- ],
575
- "responses": {
576
- "200": {
577
- "description": "Conversation trajectory",
578
- "content": {
579
- "application/json": {
580
- "schema": {
581
- "type": "object",
582
- "properties": {
583
- "trajectory": {
584
- "type": "array",
585
- "items": {
586
- "type": "object"
587
- }
588
- }
589
- }
590
- }
591
- }
592
- }
593
- },
594
- "500": {
595
- "description": "Error getting trajectory",
596
- "content": {
597
- "application/json": {
598
- "schema": {
599
- "type": "object",
600
- "properties": {
601
- "trajectory": {
602
- "type": "array",
603
- "items": {
604
- "type": "object"
605
- },
606
- "nullable": true
607
- },
608
- "error": {
609
- "type": "string"
610
- }
611
- }
612
- }
613
- }
614
- }
615
- }
616
- }
617
- }
618
- },
619
- "/api/conversations/{conversation_id}/security/{path}": {
620
- "get": {
621
- "summary": "Security analyzer API (GET)",
622
- "description": "Catch-all route for security analyzer API GET requests",
623
- "operationId": "securityApiGet",
624
- "parameters": [
625
- {
626
- "name": "conversation_id",
627
- "in": "path",
628
- "required": true,
629
- "schema": {
630
- "type": "string"
631
- },
632
- "description": "Conversation ID"
633
- },
634
- {
635
- "name": "path",
636
- "in": "path",
637
- "required": true,
638
- "schema": {
639
- "type": "string"
640
- },
641
- "description": "Security analyzer API path"
642
- }
643
- ],
644
- "responses": {
645
- "200": {
646
- "description": "Security analyzer response",
647
- "content": {
648
- "application/json": {
649
- "schema": {
650
- "type": "object"
651
- }
652
- }
653
- }
654
- },
655
- "404": {
656
- "description": "Security analyzer not initialized",
657
- "content": {
658
- "application/json": {
659
- "schema": {
660
- "type": "object",
661
- "properties": {
662
- "detail": {
663
- "type": "string"
664
- }
665
- }
666
- }
667
- }
668
- }
669
- }
670
- }
671
- },
672
- "post": {
673
- "summary": "Security analyzer API (POST)",
674
- "description": "Catch-all route for security analyzer API POST requests",
675
- "operationId": "securityApiPost",
676
- "parameters": [
677
- {
678
- "name": "conversation_id",
679
- "in": "path",
680
- "required": true,
681
- "schema": {
682
- "type": "string"
683
- },
684
- "description": "Conversation ID"
685
- },
686
- {
687
- "name": "path",
688
- "in": "path",
689
- "required": true,
690
- "schema": {
691
- "type": "string"
692
- },
693
- "description": "Security analyzer API path"
694
- }
695
- ],
696
- "requestBody": {
697
- "required": false,
698
- "content": {
699
- "application/json": {
700
- "schema": {
701
- "type": "object"
702
- }
703
- }
704
- }
705
- },
706
- "responses": {
707
- "200": {
708
- "description": "Security analyzer response",
709
- "content": {
710
- "application/json": {
711
- "schema": {
712
- "type": "object"
713
- }
714
- }
715
- }
716
- },
717
- "404": {
718
- "description": "Security analyzer not initialized",
719
- "content": {
720
- "application/json": {
721
- "schema": {
722
- "type": "object",
723
- "properties": {
724
- "detail": {
725
- "type": "string"
726
- }
727
- }
728
- }
729
- }
730
- }
731
- }
732
- }
733
- },
734
- "put": {
735
- "summary": "Security analyzer API (PUT)",
736
- "description": "Catch-all route for security analyzer API PUT requests",
737
- "operationId": "securityApiPut",
738
- "parameters": [
739
- {
740
- "name": "conversation_id",
741
- "in": "path",
742
- "required": true,
743
- "schema": {
744
- "type": "string"
745
- },
746
- "description": "Conversation ID"
747
- },
748
- {
749
- "name": "path",
750
- "in": "path",
751
- "required": true,
752
- "schema": {
753
- "type": "string"
754
- },
755
- "description": "Security analyzer API path"
756
- }
757
- ],
758
- "requestBody": {
759
- "required": false,
760
- "content": {
761
- "application/json": {
762
- "schema": {
763
- "type": "object"
764
- }
765
- }
766
- }
767
- },
768
- "responses": {
769
- "200": {
770
- "description": "Security analyzer response",
771
- "content": {
772
- "application/json": {
773
- "schema": {
774
- "type": "object"
775
- }
776
- }
777
- }
778
- },
779
- "404": {
780
- "description": "Security analyzer not initialized",
781
- "content": {
782
- "application/json": {
783
- "schema": {
784
- "type": "object",
785
- "properties": {
786
- "detail": {
787
- "type": "string"
788
- }
789
- }
790
- }
791
- }
792
- }
793
- }
794
- }
795
- },
796
- "delete": {
797
- "summary": "Security analyzer API (DELETE)",
798
- "description": "Catch-all route for security analyzer API DELETE requests",
799
- "operationId": "securityApiDelete",
800
- "parameters": [
801
- {
802
- "name": "conversation_id",
803
- "in": "path",
804
- "required": true,
805
- "schema": {
806
- "type": "string"
807
- },
808
- "description": "Conversation ID"
809
- },
810
- {
811
- "name": "path",
812
- "in": "path",
813
- "required": true,
814
- "schema": {
815
- "type": "string"
816
- },
817
- "description": "Security analyzer API path"
818
- }
819
- ],
820
- "responses": {
821
- "200": {
822
- "description": "Security analyzer response",
823
- "content": {
824
- "application/json": {
825
- "schema": {
826
- "type": "object"
827
- }
828
- }
829
- }
830
- },
831
- "404": {
832
- "description": "Security analyzer not initialized",
833
- "content": {
834
- "application/json": {
835
- "schema": {
836
- "type": "object",
837
- "properties": {
838
- "detail": {
839
- "type": "string"
840
- }
841
- }
842
- }
843
- }
844
- }
845
- }
846
- }
847
- }
848
- },
849
- "/api/conversations": {
850
- "post": {
851
- "summary": "Create new conversation",
852
- "description": "Initialize a new conversation",
853
- "operationId": "newConversation",
854
- "requestBody": {
855
- "required": true,
856
- "content": {
857
- "application/json": {
858
- "schema": {
859
- "type": "object",
860
- "properties": {
861
- "repository": {
862
- "type": "string",
863
- "nullable": true,
864
- "description": "Full name of the repository (e.g., owner/repo)"
865
- },
866
- "git_provider": {
867
- "type": "string",
868
- "nullable": true,
869
- "description": "The Git provider (e.g., github or gitlab). If omitted, all configured providers are checked for the repository."
870
- },
871
- "selected_branch": {
872
- "type": "string",
873
- "nullable": true
874
- },
875
- "initial_user_msg": {
876
- "type": "string",
877
- "nullable": true
878
- },
879
- "conversation_instructions": {
880
- "type": "string",
881
- "nullable": true,
882
- "description": "Optional instructions the agent must follow throughout the conversation while addressing the user's initial task"
883
- },
884
- "image_urls": {
885
- "type": "array",
886
- "items": {
887
- "type": "string"
888
- },
889
- "nullable": true
890
- },
891
- "replay_json": {
892
- "type": "string",
893
- "nullable": true
894
- }
895
- }
896
- }
897
- }
898
- }
899
- },
900
- "responses": {
901
- "200": {
902
- "description": "Conversation created successfully",
903
- "content": {
904
- "application/json": {
905
- "schema": {
906
- "type": "object",
907
- "properties": {
908
- "status": {
909
- "type": "string",
910
- "example": "ok"
911
- },
912
- "conversation_id": {
913
- "type": "string"
914
- }
915
- }
916
- }
917
- }
918
- }
919
- },
920
- "400": {
921
- "description": "Error creating conversation",
922
- "content": {
923
- "application/json": {
924
- "schema": {
925
- "type": "object",
926
- "properties": {
927
- "status": {
928
- "type": "string",
929
- "example": "error"
930
- },
931
- "message": {
932
- "type": "string"
933
- },
934
- "msg_id": {
935
- "type": "string"
936
- }
937
- }
938
- }
939
- }
940
- }
941
- }
942
- }
943
- },
944
- "get": {
945
- "summary": "Search conversations",
946
- "description": "Search for conversations",
947
- "operationId": "searchConversations",
948
- "parameters": [
949
- {
950
- "name": "page_id",
951
- "in": "query",
952
- "required": false,
953
- "schema": {
954
- "type": "string"
955
- },
956
- "description": "Page ID for pagination"
957
- },
958
- {
959
- "name": "limit",
960
- "in": "query",
961
- "required": false,
962
- "schema": {
963
- "type": "integer",
964
- "default": 20
965
- },
966
- "description": "Number of conversations to return"
967
- }
968
- ],
969
- "responses": {
970
- "200": {
971
- "description": "Conversations",
972
- "content": {
973
- "application/json": {
974
- "schema": {
975
- "type": "object",
976
- "properties": {
977
- "results": {
978
- "type": "array",
979
- "items": {
980
- "type": "object",
981
- "properties": {
982
- "conversation_id": {
983
- "type": "string"
984
- },
985
- "title": {
986
- "type": "string"
987
- },
988
- "last_updated_at": {
989
- "type": "string",
990
- "format": "date-time"
991
- },
992
- "created_at": {
993
- "type": "string",
994
- "format": "date-time"
995
- },
996
- "selected_repository": {
997
- "type": "string",
998
- "nullable": true
999
- },
1000
- "status": {
1001
- "type": "string",
1002
- "enum": ["RUNNING", "STOPPED"]
1003
- },
1004
- "trigger": {
1005
- "type": "string",
1006
- "enum": ["GUI", "API"]
1007
- }
1008
- }
1009
- }
1010
- },
1011
- "next_page_id": {
1012
- "type": "string",
1013
- "nullable": true
1014
- }
1015
- }
1016
- }
1017
- }
1018
- }
1019
- }
1020
- }
1021
- }
1022
- },
1023
- "/api/conversations/{conversation_id}": {
1024
- "get": {
1025
- "summary": "Get conversation",
1026
- "description": "Get conversation details",
1027
- "operationId": "getConversation",
1028
- "parameters": [
1029
- {
1030
- "name": "conversation_id",
1031
- "in": "path",
1032
- "required": true,
1033
- "schema": {
1034
- "type": "string"
1035
- },
1036
- "description": "Conversation ID"
1037
- }
1038
- ],
1039
- "responses": {
1040
- "200": {
1041
- "description": "Conversation details",
1042
- "content": {
1043
- "application/json": {
1044
- "schema": {
1045
- "type": "object",
1046
- "properties": {
1047
- "conversation_id": {
1048
- "type": "string"
1049
- },
1050
- "title": {
1051
- "type": "string"
1052
- },
1053
- "last_updated_at": {
1054
- "type": "string",
1055
- "format": "date-time"
1056
- },
1057
- "created_at": {
1058
- "type": "string",
1059
- "format": "date-time"
1060
- },
1061
- "selected_repository": {
1062
- "type": "string",
1063
- "nullable": true
1064
- },
1065
- "status": {
1066
- "type": "string",
1067
- "enum": ["RUNNING", "STOPPED"]
1068
- },
1069
- "trigger": {
1070
- "type": "string",
1071
- "enum": ["GUI", "API"]
1072
- }
1073
- }
1074
- }
1075
- }
1076
- }
1077
- },
1078
- "404": {
1079
- "description": "Conversation not found",
1080
- "content": {
1081
- "application/json": {
1082
- "schema": {
1083
- "type": "object",
1084
- "nullable": true
1085
- }
1086
- }
1087
- }
1088
- }
1089
- }
1090
- },
1091
- "patch": {
1092
- "summary": "Update conversation",
1093
- "description": "Update conversation details",
1094
- "operationId": "updateConversation",
1095
- "parameters": [
1096
- {
1097
- "name": "conversation_id",
1098
- "in": "path",
1099
- "required": true,
1100
- "schema": {
1101
- "type": "string"
1102
- },
1103
- "description": "Conversation ID"
1104
- }
1105
- ],
1106
- "requestBody": {
1107
- "required": true,
1108
- "content": {
1109
- "application/json": {
1110
- "schema": {
1111
- "type": "object",
1112
- "properties": {
1113
- "title": {
1114
- "type": "string"
1115
- }
1116
- }
1117
- }
1118
- }
1119
- }
1120
- },
1121
- "responses": {
1122
- "200": {
1123
- "description": "Conversation updated successfully",
1124
- "content": {
1125
- "application/json": {
1126
- "schema": {
1127
- "type": "boolean"
1128
- }
1129
- }
1130
- }
1131
- }
1132
- }
1133
- },
1134
- "delete": {
1135
- "summary": "Delete conversation",
1136
- "description": "Delete a conversation",
1137
- "operationId": "deleteConversation",
1138
- "parameters": [
1139
- {
1140
- "name": "conversation_id",
1141
- "in": "path",
1142
- "required": true,
1143
- "schema": {
1144
- "type": "string"
1145
- },
1146
- "description": "Conversation ID"
1147
- }
1148
- ],
1149
- "responses": {
1150
- "200": {
1151
- "description": "Conversation deleted successfully",
1152
- "content": {
1153
- "application/json": {
1154
- "schema": {
1155
- "type": "boolean"
1156
- }
1157
- }
1158
- }
1159
- }
1160
- }
1161
- }
1162
- },
1163
- "/api/user/repositories": {
1164
- "get": {
1165
- "summary": "Get user repositories",
1166
- "description": "Get repositories for the authenticated user",
1167
- "operationId": "getUserRepositories",
1168
- "parameters": [
1169
- {
1170
- "name": "sort",
1171
- "in": "query",
1172
- "required": false,
1173
- "schema": {
1174
- "type": "string",
1175
- "default": "pushed"
1176
- },
1177
- "description": "Sort order for repositories"
1178
- }
1179
- ],
1180
- "responses": {
1181
- "200": {
1182
- "description": "User repositories",
1183
- "content": {
1184
- "application/json": {
1185
- "schema": {
1186
- "type": "array",
1187
- "items": {
1188
- "type": "object",
1189
- "properties": {
1190
- "full_name": {
1191
- "type": "string"
1192
- },
1193
- "description": {
1194
- "type": "string",
1195
- "nullable": true
1196
- },
1197
- "html_url": {
1198
- "type": "string"
1199
- },
1200
- "private": {
1201
- "type": "boolean"
1202
- },
1203
- "fork": {
1204
- "type": "boolean"
1205
- },
1206
- "updated_at": {
1207
- "type": "string",
1208
- "format": "date-time"
1209
- }
1210
- }
1211
- }
1212
- }
1213
- }
1214
- }
1215
- },
1216
- "401": {
1217
- "description": "Authentication error",
1218
- "content": {
1219
- "application/json": {
1220
- "schema": {
1221
- "type": "string"
1222
- }
1223
- }
1224
- }
1225
- },
1226
- "500": {
1227
- "description": "Unknown error",
1228
- "content": {
1229
- "application/json": {
1230
- "schema": {
1231
- "type": "string"
1232
- }
1233
- }
1234
- }
1235
- }
1236
- }
1237
- }
1238
- },
1239
- "/api/user/info": {
1240
- "get": {
1241
- "summary": "Get user info",
1242
- "description": "Get information about the authenticated user",
1243
- "operationId": "getUser",
1244
- "responses": {
1245
- "200": {
1246
- "description": "User information",
1247
- "content": {
1248
- "application/json": {
1249
- "schema": {
1250
- "type": "object",
1251
- "properties": {
1252
- "login": {
1253
- "type": "string"
1254
- },
1255
- "name": {
1256
- "type": "string",
1257
- "nullable": true
1258
- },
1259
- "email": {
1260
- "type": "string",
1261
- "nullable": true
1262
- },
1263
- "avatar_url": {
1264
- "type": "string",
1265
- "nullable": true
1266
- }
1267
- }
1268
- }
1269
- }
1270
- }
1271
- },
1272
- "401": {
1273
- "description": "Authentication error",
1274
- "content": {
1275
- "application/json": {
1276
- "schema": {
1277
- "type": "string"
1278
- }
1279
- }
1280
- }
1281
- },
1282
- "500": {
1283
- "description": "Unknown error",
1284
- "content": {
1285
- "application/json": {
1286
- "schema": {
1287
- "type": "string"
1288
- }
1289
- }
1290
- }
1291
- }
1292
- }
1293
- }
1294
- },
1295
- "/api/user/search/repositories": {
1296
- "get": {
1297
- "summary": "Search repositories",
1298
- "description": "Search for repositories",
1299
- "operationId": "searchRepositories",
1300
- "parameters": [
1301
- {
1302
- "name": "query",
1303
- "in": "query",
1304
- "required": true,
1305
- "schema": {
1306
- "type": "string"
1307
- },
1308
- "description": "Search query"
1309
- },
1310
- {
1311
- "name": "per_page",
1312
- "in": "query",
1313
- "required": false,
1314
- "schema": {
1315
- "type": "integer",
1316
- "default": 5
1317
- },
1318
- "description": "Number of repositories to return per page"
1319
- },
1320
- {
1321
- "name": "sort",
1322
- "in": "query",
1323
- "required": false,
1324
- "schema": {
1325
- "type": "string",
1326
- "default": "stars"
1327
- },
1328
- "description": "Sort order for repositories"
1329
- },
1330
- {
1331
- "name": "order",
1332
- "in": "query",
1333
- "required": false,
1334
- "schema": {
1335
- "type": "string",
1336
- "default": "desc"
1337
- },
1338
- "description": "Sort direction"
1339
- }
1340
- ],
1341
- "responses": {
1342
- "200": {
1343
- "description": "Search results",
1344
- "content": {
1345
- "application/json": {
1346
- "schema": {
1347
- "type": "array",
1348
- "items": {
1349
- "type": "object",
1350
- "properties": {
1351
- "full_name": {
1352
- "type": "string"
1353
- },
1354
- "description": {
1355
- "type": "string",
1356
- "nullable": true
1357
- },
1358
- "html_url": {
1359
- "type": "string"
1360
- },
1361
- "private": {
1362
- "type": "boolean"
1363
- },
1364
- "fork": {
1365
- "type": "boolean"
1366
- },
1367
- "updated_at": {
1368
- "type": "string",
1369
- "format": "date-time"
1370
- }
1371
- }
1372
- }
1373
- }
1374
- }
1375
- }
1376
- },
1377
- "401": {
1378
- "description": "Authentication error",
1379
- "content": {
1380
- "application/json": {
1381
- "schema": {
1382
- "type": "string"
1383
- }
1384
- }
1385
- }
1386
- },
1387
- "500": {
1388
- "description": "Unknown error",
1389
- "content": {
1390
- "application/json": {
1391
- "schema": {
1392
- "type": "string"
1393
- }
1394
- }
1395
- }
1396
- }
1397
- }
1398
- }
1399
- },
1400
- "/api/user/suggested-tasks": {
1401
- "get": {
1402
- "summary": "Get suggested tasks",
1403
- "description": "Get suggested tasks for the authenticated user across their most recently pushed repositories",
1404
- "operationId": "getSuggestedTasks",
1405
- "responses": {
1406
- "200": {
1407
- "description": "Suggested tasks",
1408
- "content": {
1409
- "application/json": {
1410
- "schema": {
1411
- "type": "array",
1412
- "items": {
1413
- "type": "object",
1414
- "properties": {
1415
- "title": {
1416
- "type": "string"
1417
- },
1418
- "url": {
1419
- "type": "string"
1420
- },
1421
- "repository": {
1422
- "type": "string"
1423
- },
1424
- "type": {
1425
- "type": "string"
1426
- },
1427
- "created_at": {
1428
- "type": "string",
1429
- "format": "date-time"
1430
- }
1431
- }
1432
- }
1433
- }
1434
- }
1435
- }
1436
- },
1437
- "401": {
1438
- "description": "Authentication error",
1439
- "content": {
1440
- "application/json": {
1441
- "schema": {
1442
- "type": "string"
1443
- }
1444
- }
1445
- }
1446
- },
1447
- "500": {
1448
- "description": "Unknown error",
1449
- "content": {
1450
- "application/json": {
1451
- "schema": {
1452
- "type": "string"
1453
- }
1454
- }
1455
- }
1456
- }
1457
- }
1458
- }
1459
- },
1460
- "/api/settings": {
1461
- "get": {
1462
- "summary": "Get settings",
1463
- "description": "Get user settings",
1464
- "operationId": "loadSettings",
1465
- "responses": {
1466
- "200": {
1467
- "description": "User settings",
1468
- "content": {
1469
- "application/json": {
1470
- "schema": {
1471
- "type": "object",
1472
- "properties": {
1473
- "language": {
1474
- "type": "string"
1475
- },
1476
- "agent": {
1477
- "type": "string"
1478
- },
1479
- "security_analyzer": {
1480
- "type": "string"
1481
- },
1482
- "confirmation_mode": {
1483
- "type": "boolean"
1484
- },
1485
- "llm_model": {
1486
- "type": "string"
1487
- },
1488
- "llm_api_key_set": {
1489
- "type": "boolean"
1490
- },
1491
- "llm_base_url": {
1492
- "type": "string",
1493
- "nullable": true
1494
- },
1495
- "remote_runtime_resource_factor": {
1496
- "type": "number"
1497
- },
1498
- "enable_default_condenser": {
1499
- "type": "boolean"
1500
- },
1501
- "enable_sound_notifications": {
1502
- "type": "boolean"
1503
- },
1504
- "user_consents_to_analytics": {
1505
- "type": "boolean"
1506
- },
1507
- "provider_tokens_set": {
1508
- "type": "object",
1509
- "additionalProperties": {
1510
- "type": "boolean"
1511
- }
1512
- }
1513
- }
1514
- }
1515
- }
1516
- }
1517
- },
1518
- "401": {
1519
- "description": "Invalid token",
1520
- "content": {
1521
- "application/json": {
1522
- "schema": {
1523
- "type": "object",
1524
- "properties": {
1525
- "error": {
1526
- "type": "string"
1527
- }
1528
- }
1529
- }
1530
- }
1531
- }
1532
- },
1533
- "404": {
1534
- "description": "Settings not found",
1535
- "content": {
1536
- "application/json": {
1537
- "schema": {
1538
- "type": "object",
1539
- "properties": {
1540
- "error": {
1541
- "type": "string"
1542
- }
1543
- }
1544
- }
1545
- }
1546
- }
1547
- }
1548
- }
1549
- },
1550
- "post": {
1551
- "summary": "Store settings",
1552
- "description": "Store user settings",
1553
- "operationId": "storeSettings",
1554
- "requestBody": {
1555
- "required": true,
1556
- "content": {
1557
- "application/json": {
1558
- "schema": {
1559
- "type": "object",
1560
- "properties": {
1561
- "language": {
1562
- "type": "string"
1563
- },
1564
- "agent": {
1565
- "type": "string"
1566
- },
1567
- "security_analyzer": {
1568
- "type": "string"
1569
- },
1570
- "confirmation_mode": {
1571
- "type": "boolean"
1572
- },
1573
- "llm_model": {
1574
- "type": "string"
1575
- },
1576
- "llm_api_key": {
1577
- "type": "string"
1578
- },
1579
- "llm_base_url": {
1580
- "type": "string",
1581
- "nullable": true
1582
- },
1583
- "remote_runtime_resource_factor": {
1584
- "type": "number"
1585
- },
1586
- "enable_default_condenser": {
1587
- "type": "boolean"
1588
- },
1589
- "enable_sound_notifications": {
1590
- "type": "boolean"
1591
- },
1592
- "user_consents_to_analytics": {
1593
- "type": "boolean"
1594
- },
1595
- "provider_tokens": {
1596
- "type": "object",
1597
- "additionalProperties": {
1598
- "type": "string"
1599
- }
1600
- }
1601
- }
1602
- }
1603
- }
1604
- }
1605
- },
1606
- "responses": {
1607
- "200": {
1608
- "description": "Settings stored successfully",
1609
- "content": {
1610
- "application/json": {
1611
- "schema": {
1612
- "type": "object",
1613
- "properties": {
1614
- "message": {
1615
- "type": "string"
1616
- }
1617
- }
1618
- }
1619
- }
1620
- }
1621
- },
1622
- "401": {
1623
- "description": "Invalid token",
1624
- "content": {
1625
- "application/json": {
1626
- "schema": {
1627
- "type": "object",
1628
- "properties": {
1629
- "error": {
1630
- "type": "string"
1631
- }
1632
- }
1633
- }
1634
- }
1635
- }
1636
- },
1637
- "500": {
1638
- "description": "Error storing settings",
1639
- "content": {
1640
- "application/json": {
1641
- "schema": {
1642
- "type": "object",
1643
- "properties": {
1644
- "error": {
1645
- "type": "string"
1646
- }
1647
- }
1648
- }
1649
- }
1650
- }
1651
- }
1652
- }
1653
- }
1654
- },
1655
- "/api/reset-settings": {
1656
- "post": {
1657
- "summary": "Reset settings (Deprecated)",
1658
- "description": "This endpoint is deprecated and will return a 410 Gone error. Reset functionality has been removed.",
1659
- "operationId": "resetSettings",
1660
- "deprecated": true,
1661
- "responses": {
1662
- "410": {
1663
- "description": "Feature removed",
1664
- "content": {
1665
- "application/json": {
1666
- "schema": {
1667
- "type": "object",
1668
- "properties": {
1669
- "error": {
1670
- "type": "string",
1671
- "example": "Reset settings functionality has been removed."
1672
- }
1673
- }
1674
- }
1675
- }
1676
- }
1677
- }
1678
- }
1679
- }
1680
- },
1681
- "/api/unset-settings-tokens": {
1682
- "post": {
1683
- "summary": "Unset settings tokens",
1684
- "description": "Unset provider tokens in settings",
1685
- "operationId": "unsetSettingsTokens",
1686
- "responses": {
1687
- "200": {
1688
- "description": "Tokens unset successfully",
1689
- "content": {
1690
- "application/json": {
1691
- "schema": {
1692
- "type": "object",
1693
- "properties": {
1694
- "message": {
1695
- "type": "string"
1696
- }
1697
- }
1698
- }
1699
- }
1700
- }
1701
- },
1702
- "500": {
1703
- "description": "Error unsetting tokens",
1704
- "content": {
1705
- "application/json": {
1706
- "schema": {
1707
- "type": "object",
1708
- "properties": {
1709
- "error": {
1710
- "type": "string"
1711
- }
1712
- }
1713
- }
1714
- }
1715
- }
1716
- }
1717
- }
1718
- }
1719
- },
1720
- "/api/options/models": {
1721
- "get": {
1722
- "summary": "Get models",
1723
- "description": "Get all models supported by LiteLLM",
1724
- "operationId": "getLitellmModels",
1725
- "responses": {
1726
- "200": {
1727
- "description": "List of models",
1728
- "content": {
1729
- "application/json": {
1730
- "schema": {
1731
- "type": "array",
1732
- "items": {
1733
- "type": "string"
1734
- }
1735
- }
1736
- }
1737
- }
1738
- }
1739
- }
1740
- }
1741
- },
1742
- "/api/options/agents": {
1743
- "get": {
1744
- "summary": "Get agents",
1745
- "description": "Get all agents supported by OpenHands",
1746
- "operationId": "getAgents",
1747
- "responses": {
1748
- "200": {
1749
- "description": "List of agents",
1750
- "content": {
1751
- "application/json": {
1752
- "schema": {
1753
- "type": "array",
1754
- "items": {
1755
- "type": "string"
1756
- }
1757
- }
1758
- }
1759
- }
1760
- }
1761
- }
1762
- }
1763
- },
1764
- "/api/options/security-analyzers": {
1765
- "get": {
1766
- "summary": "Get security analyzers",
1767
- "description": "Get all supported security analyzers",
1768
- "operationId": "getSecurityAnalyzers",
1769
- "responses": {
1770
- "200": {
1771
- "description": "List of security analyzers",
1772
- "content": {
1773
- "application/json": {
1774
- "schema": {
1775
- "type": "array",
1776
- "items": {
1777
- "type": "string"
1778
- }
1779
- }
1780
- }
1781
- }
1782
- }
1783
- }
1784
- }
1785
- },
1786
- "/api/options/config": {
1787
- "get": {
1788
- "summary": "Get config",
1789
- "description": "Get current server configuration",
1790
- "operationId": "getConfig",
1791
- "responses": {
1792
- "200": {
1793
- "description": "Server configuration",
1794
- "content": {
1795
- "application/json": {
1796
- "schema": {
1797
- "type": "object"
1798
- }
1799
- }
1800
- }
1801
- }
1802
- }
1803
- }
1804
- }
1805
- },
1806
- "components": {
1807
- "schemas": {
1808
- "Repository": {
1809
- "type": "object",
1810
- "properties": {
1811
- "full_name": {
1812
- "type": "string"
1813
- },
1814
- "description": {
1815
- "type": "string",
1816
- "nullable": true
1817
- },
1818
- "html_url": {
1819
- "type": "string"
1820
- },
1821
- "private": {
1822
- "type": "boolean"
1823
- },
1824
- "fork": {
1825
- "type": "boolean"
1826
- },
1827
- "updated_at": {
1828
- "type": "string",
1829
- "format": "date-time"
1830
- }
1831
- }
1832
- },
1833
- "User": {
1834
- "type": "object",
1835
- "properties": {
1836
- "login": {
1837
- "type": "string"
1838
- },
1839
- "name": {
1840
- "type": "string",
1841
- "nullable": true
1842
- },
1843
- "email": {
1844
- "type": "string",
1845
- "nullable": true
1846
- },
1847
- "avatar_url": {
1848
- "type": "string",
1849
- "nullable": true
1850
- }
1851
- }
1852
- },
1853
- "SuggestedTask": {
1854
- "type": "object",
1855
- "properties": {
1856
- "title": {
1857
- "type": "string"
1858
- },
1859
- "url": {
1860
- "type": "string"
1861
- },
1862
- "repository": {
1863
- "type": "string"
1864
- },
1865
- "type": {
1866
- "type": "string"
1867
- },
1868
- "created_at": {
1869
- "type": "string",
1870
- "format": "date-time"
1871
- }
1872
- }
1873
- },
1874
- "ConversationInfo": {
1875
- "type": "object",
1876
- "properties": {
1877
- "conversation_id": {
1878
- "type": "string"
1879
- },
1880
- "title": {
1881
- "type": "string"
1882
- },
1883
- "last_updated_at": {
1884
- "type": "string",
1885
- "format": "date-time"
1886
- },
1887
- "created_at": {
1888
- "type": "string",
1889
- "format": "date-time"
1890
- },
1891
- "selected_repository": {
1892
- "type": "string",
1893
- "nullable": true
1894
- },
1895
- "status": {
1896
- "type": "string",
1897
- "enum": ["RUNNING", "STOPPED"]
1898
- },
1899
- "trigger": {
1900
- "type": "string",
1901
- "enum": ["GUI", "API"]
1902
- }
1903
- }
1904
- },
1905
- "ConversationInfoResultSet": {
1906
- "type": "object",
1907
- "properties": {
1908
- "results": {
1909
- "type": "array",
1910
- "items": {
1911
- "$ref": "#/components/schemas/ConversationInfo"
1912
- }
1913
- },
1914
- "next_page_id": {
1915
- "type": "string",
1916
- "nullable": true
1917
- }
1918
- }
1919
- },
1920
- "FeedbackDataModel": {
1921
- "type": "object",
1922
- "properties": {
1923
- "email": {
1924
- "type": "string",
1925
- "format": "email"
1926
- },
1927
- "version": {
1928
- "type": "string"
1929
- },
1930
- "permissions": {
1931
- "type": "string",
1932
- "default": "private"
1933
- },
1934
- "polarity": {
1935
- "type": "string"
1936
- },
1937
- "feedback": {
1938
- "type": "string"
1939
- },
1940
- "trajectory": {
1941
- "type": "array",
1942
- "items": {
1943
- "type": "object"
1944
- }
1945
- }
1946
- }
1947
- },
1948
- "Settings": {
1949
- "type": "object",
1950
- "properties": {
1951
- "language": {
1952
- "type": "string"
1953
- },
1954
- "agent": {
1955
- "type": "string"
1956
- },
1957
- "security_analyzer": {
1958
- "type": "string"
1959
- },
1960
- "confirmation_mode": {
1961
- "type": "boolean"
1962
- },
1963
- "llm_model": {
1964
- "type": "string"
1965
- },
1966
- "llm_api_key": {
1967
- "type": "string"
1968
- },
1969
- "llm_base_url": {
1970
- "type": "string",
1971
- "nullable": true
1972
- },
1973
- "remote_runtime_resource_factor": {
1974
- "type": "number"
1975
- },
1976
- "enable_default_condenser": {
1977
- "type": "boolean"
1978
- },
1979
- "enable_sound_notifications": {
1980
- "type": "boolean"
1981
- },
1982
- "user_consents_to_analytics": {
1983
- "type": "boolean"
1984
- }
1985
- }
1986
- },
1987
- "GETSettingsModel": {
1988
- "type": "object",
1989
- "properties": {
1990
- "language": {
1991
- "type": "string"
1992
- },
1993
- "agent": {
1994
- "type": "string"
1995
- },
1996
- "security_analyzer": {
1997
- "type": "string"
1998
- },
1999
- "confirmation_mode": {
2000
- "type": "boolean"
2001
- },
2002
- "llm_model": {
2003
- "type": "string"
2004
- },
2005
- "llm_api_key_set": {
2006
- "type": "boolean"
2007
- },
2008
- "llm_base_url": {
2009
- "type": "string",
2010
- "nullable": true
2011
- },
2012
- "remote_runtime_resource_factor": {
2013
- "type": "number"
2014
- },
2015
- "enable_default_condenser": {
2016
- "type": "boolean"
2017
- },
2018
- "enable_sound_notifications": {
2019
- "type": "boolean"
2020
- },
2021
- "user_consents_to_analytics": {
2022
- "type": "boolean"
2023
- },
2024
- "provider_tokens_set": {
2025
- "type": "object",
2026
- "additionalProperties": {
2027
- "type": "boolean"
2028
- }
2029
- }
2030
- }
2031
- },
2032
- "POSTSettingsModel": {
2033
- "type": "object",
2034
- "properties": {
2035
- "language": {
2036
- "type": "string"
2037
- },
2038
- "agent": {
2039
- "type": "string"
2040
- },
2041
- "security_analyzer": {
2042
- "type": "string"
2043
- },
2044
- "confirmation_mode": {
2045
- "type": "boolean"
2046
- },
2047
- "llm_model": {
2048
- "type": "string"
2049
- },
2050
- "llm_api_key": {
2051
- "type": "string"
2052
- },
2053
- "llm_base_url": {
2054
- "type": "string",
2055
- "nullable": true
2056
- },
2057
- "remote_runtime_resource_factor": {
2058
- "type": "number"
2059
- },
2060
- "enable_default_condenser": {
2061
- "type": "boolean"
2062
- },
2063
- "enable_sound_notifications": {
2064
- "type": "boolean"
2065
- },
2066
- "user_consents_to_analytics": {
2067
- "type": "boolean"
2068
- },
2069
- "provider_tokens": {
2070
- "type": "object",
2071
- "additionalProperties": {
2072
- "type": "string"
2073
- }
2074
- }
2075
- }
2076
- }
2077
- },
2078
- "securitySchemes": {
2079
- "bearerAuth": {
2080
- "type": "http",
2081
- "scheme": "bearer",
2082
- "bearerFormat": "JWT"
2083
- }
2084
- }
2085
- },
2086
- "security": [
2087
- {
2088
- "bearerAuth": []
2089
- }
2090
- ]
2091
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/static/img/backend_architecture.png DELETED

Git LFS Details

  • SHA256: ec7d7be3dc2240b7beefd169d9aadeb261a885ba036d48ee1c869f2f72c93cfe
  • Pointer size: 131 Bytes
  • Size of remote file: 273 kB
docs/static/img/backend_architecture.puml DELETED
@@ -1,201 +0,0 @@
1
- @startuml openhands
2
- !pragma useIntermediatePackages false
3
-
4
- class openhands.action.agent.AgentEchoAction {
5
- content: str
6
- runnable: bool
7
- action: str
8
- }
9
- class openhands.action.agent.AgentFinishAction {
10
- runnable: bool
11
- action: str
12
- }
13
- class openhands.observation.AgentMessageObservation {
14
- role: str
15
- observation: str
16
- }
17
- class openhands.action.agent.AgentSummarizeAction {
18
- summary: str
19
- action: str
20
- }
21
- class openhands.action.agent.AgentThinkAction {
22
- thought: str
23
- runnable: bool
24
- action: str
25
- }
26
- class openhands.action.base.ExecutableAction {
27
- }
28
- class openhands.action.base.NotExecutableAction {
29
- }
30
- class openhands.observation.Observation {
31
- content: str
32
- }
33
- class openhands.action.base.Action {
34
- }
35
- class openhands.action.base.NullAction {
36
- action: str
37
- }
38
- class openhands.action.bash.CmdRunAction {
39
- command: str
40
- action: str
41
- }
42
- class openhands.action.browse.BrowseURLAction {
43
- url: str
44
- action: str
45
- }
46
- class openhands.observation.BrowserOutputObservation {
47
- url: str
48
- status_code: int
49
- error: bool
50
- observation: str
51
- }
52
- class openhands.action.fileop.FileReadAction {
53
- path: str
54
- action: str
55
- }
56
- class openhands.observation.FileReadObservation {
57
- path: str
58
- observation: str
59
- }
60
- class openhands.action.fileop.FileWriteAction {
61
- path: str
62
- contents: str
63
- action: str
64
- }
65
- class openhands.observation.FileWriteObservation {
66
- path: str
67
- observation: str
68
- }
69
- class openhands.action.tasks.AddTaskAction {
70
- parent: str
71
- goal: str
72
- subtasks: list
73
- action: str
74
- }
75
- class openhands.action.tasks.ModifyTaskAction {
76
- id: str
77
- state: str
78
- action: str
79
- }
80
- abstract class openhands.agent.Agent {
81
- _registry: Dict[str, Type[Agent]] {static}
82
- llm: LLM
83
- _complete: None
84
- }
85
- class openhands.llm.llm.LLM {
86
- model: None
87
- api_key: None
88
- base_url: None
89
- _debug_dir: None
90
- _debug_idx: None
91
- _debug_id: None
92
- _completion: None
93
- }
94
- class openhands.controller.agent_controller.AgentController {
95
- agent: Agent
96
- max_iterations: int
97
- workdir: str
98
- command_manager: CommandManager
99
- state: State
100
- plan: Plan
101
- callbacks: List[Callable]
102
- }
103
- class openhands.observation.AgentErrorObservation {
104
- observation: str
105
- }
106
- class openhands.controller.command_manager.CommandManager {
107
- directory: None
108
- shell: None
109
- }
110
- class openhands.observation.NullObservation {
111
- observation: str
112
- }
113
- class openhands.plan.Plan {
114
- main_goal: str {static}
115
- task: Task {static}
116
- main_goal: str
117
- task: None
118
- }
119
- class openhands.state.State {
120
- plan: Plan
121
- iteration: int
122
- history: List[Tuple[Action, Observation]]
123
- updated_info: List[Tuple[Action, Observation]]
124
- }
125
- class openhands.observation.CmdOutputObservation {
126
- command: str
127
- exit_code: int
128
- observation: str
129
- }
130
- class openhands.sandbox.sandbox.DockerInteractive {
131
- instance_id: None
132
- instance_id: None
133
- workspace_dir: None
134
- workspace_dir: None
135
- workspace_dir: None
136
- timeout: int
137
- base_container_image: None
138
- container_name: None
139
- }
140
- class openhands.observation.UserMessageObservation {
141
- role: str
142
- observation: str
143
- }
144
- class openhands.plan.Task {
145
- id: str {static}
146
- goal: str {static}
147
- parent: Task | None {static}
148
- subtasks: List[Task] {static}
149
- id: None
150
- id: None
151
- parent: None
152
- goal: str
153
- subtasks: None
154
- }
155
-
156
- class openhands.server.session.Session {
157
- websocket: None
158
- controller: Optional[AgentController]
159
- agent: Optional[Agent]
160
- agent_task: None
161
- }
162
-
163
- openhands.action.base.ExecutableAction <|-- openhands.action.agent.AgentEchoAction
164
- openhands.action.base.NotExecutableAction <|-- openhands.action.agent.AgentFinishAction
165
- openhands.observation.Observation <|-- openhands.observation.AgentMessageObservation
166
- openhands.action.base.NotExecutableAction <|-- openhands.action.agent.AgentSummarizeAction
167
- openhands.action.base.NotExecutableAction <|-- openhands.action.agent.AgentThinkAction
168
- openhands.action.base.Action <|-- openhands.action.base.ExecutableAction
169
- openhands.action.base.Action <|-- openhands.action.base.NotExecutableAction
170
- openhands.action.base.NotExecutableAction <|-- openhands.action.base.NullAction
171
- openhands.action.base.ExecutableAction <|-- openhands.action.bash.CmdRunAction
172
- openhands.action.base.ExecutableAction <|-- openhands.action.browse.BrowseURLAction
173
- openhands.observation.Observation <|-- openhands.observation.BrowserOutputObservation
174
- openhands.action.base.ExecutableAction <|-- openhands.action.fileop.FileReadAction
175
- openhands.observation.Observation <|-- openhands.observation.FileReadObservation
176
- openhands.action.base.ExecutableAction <|-- openhands.action.fileop.FileWriteAction
177
- openhands.observation.Observation <|-- openhands.observation.FileWriteObservation
178
- openhands.action.base.NotExecutableAction <|-- openhands.action.tasks.AddTaskAction
179
- openhands.action.base.NotExecutableAction <|-- openhands.action.tasks.ModifyTaskAction
180
- openhands.agent.Agent *-- openhands.agent.Agent
181
- openhands.agent.Agent *-- openhands.llm.llm.LLM
182
- openhands.controller.agent_controller.AgentController *-- openhands.agent.Agent
183
- openhands.observation.Observation <|-- openhands.observation.AgentErrorObservation
184
- openhands.observation.Observation <|-- openhands.observation.NullObservation
185
- openhands.plan.Plan *-- openhands.plan.Task
186
- openhands.state.State *-- openhands.plan.Plan
187
- openhands.state.State *-- openhands.observation.CmdOutputObservation
188
- openhands.state.State *-- openhands.action.base.Action
189
- openhands.state.State *-- openhands.observation.Observation
190
- openhands.observation.Observation <|-- openhands.observation.CmdOutputObservation
191
- openhands.observation.Observation <|-- openhands.observation.UserMessageObservation
192
- openhands.plan.Task *-- openhands.plan.Task
193
- openhands.server.session.Session *-- openhands.controller.agent_controller.AgentController
194
- openhands.server.session.Session *-- openhands.agent.Agent
195
- openhands.controller.agent_controller.AgentController -> openhands.state.State
196
- openhands.controller.agent_controller.AgentController -> openhands.plan.Plan
197
- openhands.controller.agent_controller.AgentController -> openhands.controller.command_manager.CommandManager
198
- openhands.controller.command_manager.CommandManager -> openhands.sandbox.sandbox.DockerInteractive
199
-
200
- footer Based on f3fda42; Generated by //py2puml//
201
- @enduml
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/static/img/backend_architecture.svg DELETED
docs/static/img/connect-repo.png DELETED
Binary file (18.9 kB)
 
docs/static/img/docs/api-key-generation.png DELETED
Binary file (26.8 kB)
 
docs/static/img/logo-square.png DELETED

Git LFS Details

  • SHA256: de58ad6132a9afb7d4924612c5e013695658af993a81a7611a6564f6a8063d59
  • Pointer size: 132 Bytes
  • Size of remote file: 1.19 MB
docs/static/img/logo.png DELETED
Binary file (21.2 kB)
 
docs/static/img/oh-features.png DELETED

Git LFS Details

  • SHA256: 0e5022b7839f81b08e06b7b4f2f6e624259aa68ed6bfd95b47026cb940bacacb
  • Pointer size: 131 Bytes
  • Size of remote file: 148 kB
docs/static/img/results.png DELETED

Git LFS Details

  • SHA256: 920040c9ef19e8bed163da4b2ba337f8108e8636f55ce0a1b6388d5cd9ab32c2
  • Pointer size: 131 Bytes
  • Size of remote file: 323 kB
docs/static/img/screenshot.png DELETED

Git LFS Details

  • SHA256: 4bb621a61826a12dc8eea4fb2b8d270e8b6a12dcb77ac84665982452a48cb6c4
  • Pointer size: 131 Bytes
  • Size of remote file: 679 kB
docs/static/img/system_architecture.png DELETED
Binary file (42.6 kB)
 
docs/static/img/system_architecture.puml DELETED
@@ -1,67 +0,0 @@
1
- @startuml "System Architecture"
2
-
3
-
4
- node frontend as frontend{
5
-
6
- component App
7
-
8
- package components{
9
-
10
- component Terminal
11
-
12
- component ChatInterface
13
-
14
- component BannerSettings
15
-
16
- }
17
-
18
- package services{
19
- component chatService
20
-
21
- component settingsService
22
-
23
- chatService -[hidden]u-> settingsService
24
- }
25
-
26
- package socket
27
-
28
- App -> Terminal
29
- App -> ChatInterface
30
- App -> BannerSettings
31
- ChatInterface -> chatService
32
- BannerSettings -> settingsService
33
- Terminal -> socket
34
- chatService -d-> socket
35
- settingsService -d-> socket
36
- services -[hidden]d-> socket
37
-
38
- Terminal -[hidden]u-> ChatInterface
39
- ChatInterface -[hidden]u-> BannerSettings
40
-
41
-
42
-
43
- interface "HTTP (:3001)" as HTTP
44
- HTTP - App
45
-
46
- }
47
-
48
- node backend{
49
- package server as serverpackage{
50
- component Server
51
-
52
- 'defined in server/server.py, port is defined at startup with uvicorn
53
- interface "Client WS\n(:3000/ws)" as client_socket
54
- client_socket - Server
55
-
56
-
57
- }
58
- node AgentController{
59
-
60
- }
61
- Server -d-> AgentController
62
- }
63
-
64
-
65
- socket -d-> client_socket: connects to \n VITE_TERMINAL_WS_URL
66
-
67
- @enduml
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/static/img/system_architecture.svg DELETED
docs/static/img/system_architecture_overview.png DELETED

Git LFS Details

  • SHA256: 8059e09a3a6cadda2f0e19eb6d16dc05b2179c56b6604998be70076bd6bd70a6
  • Pointer size: 131 Bytes
  • Size of remote file: 175 kB
docs/static/img/teaser.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a2b9dfd699226a4e6d3e2bb0926941f954cc11c68024e011c861215bb81ff381
3
- size 36187951
 
 
 
 
docs/usage/about.mdx DELETED
@@ -1,30 +0,0 @@
1
- ---
2
- title: About OpenHands
3
- ---
4
-
5
- ## Research Strategy
6
-
7
- Achieving full replication of production-grade applications with LLMs is a complex endeavor. Our strategy involves:
8
-
9
- - **Core Technical Research:** Focusing on foundational research to understand and improve the technical aspects of code generation and handling.
10
- - **Task Planning:** Developing capabilities for bug detection, codebase management, and optimization.
11
- - **Evaluation:** Establishing comprehensive evaluation metrics to better understand and improve our agents.
12
-
13
- ## Default Agent
14
-
15
- Our default Agent is currently the [CodeActAgent](./agents), which is capable of generating code and handling files.
16
-
17
- ## Built With
18
-
19
- OpenHands is built using a combination of powerful frameworks and libraries, providing a robust foundation for its
20
- development. Here are the key technologies used in the project:
21
-
22
- ![FastAPI](https://img.shields.io/badge/FastAPI-black?style=for-the-badge) ![uvicorn](https://img.shields.io/badge/uvicorn-black?style=for-the-badge) ![LiteLLM](https://img.shields.io/badge/LiteLLM-black?style=for-the-badge) ![Docker](https://img.shields.io/badge/Docker-black?style=for-the-badge) ![Ruff](https://img.shields.io/badge/Ruff-black?style=for-the-badge) ![MyPy](https://img.shields.io/badge/MyPy-black?style=for-the-badge) ![LlamaIndex](https://img.shields.io/badge/LlamaIndex-black?style=for-the-badge) ![React](https://img.shields.io/badge/React-black?style=for-the-badge)
23
-
24
- Please note that the selection of these technologies is in progress, and additional technologies may be added or
25
- existing ones may be removed as the project evolves. We strive to adopt the most suitable and efficient tools to
26
- enhance the capabilities of OpenHands.
27
-
28
- ## License
29
-
30
- Distributed under MIT [License](https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/agents.mdx DELETED
@@ -1,26 +0,0 @@
1
- ---
2
- title: Main Agent and Capabilities
3
- ---
4
-
5
- ## CodeActAgent
6
-
7
- ### Description
8
-
9
- This agent implements the CodeAct idea ([paper](https://arxiv.org/abs/2402.01030), [tweet](https://twitter.com/xingyaow_/status/1754556835703751087)) that consolidates LLM agents’ **act**ions into a
10
- unified **code** action space for both _simplicity_ and _performance_.
11
-
12
- The conceptual idea is illustrated below. At each turn, the agent can:
13
-
14
- 1. **Converse**: Communicate with humans in natural language to ask for clarification, confirmation, etc.
15
- 2. **CodeAct**: Choose to perform the task by executing code
16
-
17
- - Execute any valid Linux `bash` command
18
- - Execute any valid `Python` code with [an interactive Python interpreter](https://ipython.org/). This is simulated through `bash` command, see plugin system below for more details.
19
-
20
- ![image](https://github.com/All-Hands-AI/OpenHands/assets/38853559/92b622e3-72ad-4a61-8f41-8c040b6d5fb3)
21
-
22
- ### Demo
23
-
24
- https://github.com/All-Hands-AI/OpenHands/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
25
-
26
- _Example of CodeActAgent with `gpt-4-turbo-2024-04-09` performing a data science task (linear regression)_.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/architecture/backend.mdx DELETED
@@ -1,56 +0,0 @@
1
- ---
2
- title: Backend Architecture
3
- ---
4
-
5
- <div style={{ textAlign: 'center' }}>
6
- <img src="https://github.com/All-Hands-AI/OpenHands/assets/16201837/97d747e3-29d8-4ccb-8d34-6ad1adb17f38" alt="OpenHands System Architecture Diagram Jul 4 2024" />
7
- <p><em>OpenHands System Architecture Diagram (July 4, 2024)</em></p>
8
- </div>
9
-
10
- This is a high-level overview of the system architecture. The system is divided into two main components: the frontend and the backend. The frontend is responsible for handling user interactions and displaying the results. The backend is responsible for handling the business logic and executing the agents.
11
-
12
- # Frontend architecture
13
-
14
- ![system_architecture.svg](/static/img/system_architecture.svg)
15
-
16
- This Overview is simplified to show the main components and their interactions. For a more detailed view of the backend architecture, see the Backend Architecture section below.
17
-
18
- # Backend Architecture
19
-
20
- _**Disclaimer**: The backend architecture is a work in progress and is subject to change. The following diagram shows the current architecture of the backend based on the commit that is shown in the footer of the diagram._
21
-
22
- ![backend_architecture.svg](/static/img/backend_architecture.svg)
23
-
24
- <details>
25
- <summary>Updating this Diagram</summary>
26
- <div>
27
- The generation of the backend architecture diagram is partially automated.
28
- The diagram is generated from the type hints in the code using the py2puml
29
- tool. The diagram is then manually reviewed, adjusted and exported to PNG
30
- and SVG.
31
-
32
- ## Prerequisites
33
-
34
- - Running python environment in which openhands is executable
35
- (according to the instructions in the README.md file in the root of the repository)
36
- - [py2puml](https://github.com/lucsorel/py2puml) installed
37
-
38
- ## Steps
39
-
40
- 1. Autogenerate the diagram by running the following command from the root of the repository:
41
- `py2puml openhands openhands > docs/architecture/backend_architecture.puml`
42
-
43
- 2. Open the generated file in a PlantUML editor, e.g. Visual Studio Code with the PlantUML extension or [PlantText](https://www.planttext.com/)
44
-
45
- 3. Review the generated PUML and make all necessary adjustments to the diagram (add missing parts, fix mistakes, improve positioning).
46
- _py2puml creates the diagram based on the type hints in the code, so missing or incorrect type hints may result in an incomplete or incorrect diagram._
47
-
48
- 4. Review the diff between the new and the previous diagram and manually check if the changes are correct.
49
- _Make sure not to remove parts that were manually added to the diagram in the past and are still relevant._
50
-
51
- 5. Add the commit hash of the commit that was used to generate the diagram to the diagram footer.
52
-
53
- 6. Export the diagram as PNG and SVG files and replace the existing diagrams in the `docs/architecture` directory. This can be done with (e.g. [PlantText](https://www.planttext.com/))
54
-
55
- </div>
56
- </details>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/architecture/runtime.mdx DELETED
@@ -1,136 +0,0 @@
1
- ---
2
- title: Runtime Architecture
3
- ---
4
-
5
- The OpenHands Docker Runtime is the core component that enables secure and flexible execution of AI agent's action.
6
- It creates a sandboxed environment using Docker, where arbitrary code can be run safely without risking the host system.
7
-
8
- ## Why do we need a sandboxed runtime?
9
-
10
- OpenHands needs to execute arbitrary code in a secure, isolated environment for several reasons:
11
-
12
- 1. Security: Executing untrusted code can pose significant risks to the host system. A sandboxed environment prevents malicious code from accessing or modifying the host system's resources
13
- 2. Consistency: A sandboxed environment ensures that code execution is consistent across different machines and setups, eliminating "it works on my machine" issues
14
- 3. Resource Control: Sandboxing allows for better control over resource allocation and usage, preventing runaway processes from affecting the host system
15
- 4. Isolation: Different projects or users can work in isolated environments without interfering with each other or the host system
16
- 5. Reproducibility: Sandboxed environments make it easier to reproduce bugs and issues, as the execution environment is consistent and controllable
17
-
18
- ## How does the Runtime work?
19
-
20
- The OpenHands Runtime system uses a client-server architecture implemented with Docker containers. Here's an overview of how it works:
21
-
22
- ```mermaid
23
- graph TD
24
- A[User-provided Custom Docker Image] --> B[OpenHands Backend]
25
- B -->|Builds| C[OH Runtime Image]
26
- C -->|Launches| D[Action Executor]
27
- D -->|Initializes| E[Browser]
28
- D -->|Initializes| F[Bash Shell]
29
- D -->|Initializes| G[Plugins]
30
- G -->|Initializes| L[Jupyter Server]
31
-
32
- B -->|Spawn| H[Agent]
33
- B -->|Spawn| I[EventStream]
34
- I <--->|Execute Action to
35
- Get Observation
36
- via REST API
37
- | D
38
-
39
- H -->|Generate Action| I
40
- I -->|Obtain Observation| H
41
-
42
- subgraph "Docker Container"
43
- D
44
- E
45
- F
46
- G
47
- L
48
- end
49
- ```
50
-
51
- 1. User Input: The user provides a custom base Docker image
52
- 2. Image Building: OpenHands builds a new Docker image (the "OH runtime image") based on the user-provided image. This new image includes OpenHands-specific code, primarily the "runtime client"
53
- 3. Container Launch: When OpenHands starts, it launches a Docker container using the OH runtime image
54
- 4. Action Execution Server Initialization: The action execution server initializes an `ActionExecutor` inside the container, setting up necessary components like a bash shell and loading any specified plugins
55
- 5. Communication: The OpenHands backend (`openhands/runtime/impl/eventstream/eventstream_runtime.py`) communicates with the action execution server over RESTful API, sending actions and receiving observations
56
- 6. Action Execution: The runtime client receives actions from the backend, executes them in the sandboxed environment, and sends back observations
57
- 7. Observation Return: The action execution server sends execution results back to the OpenHands backend as observations
58
-
59
- The role of the client:
60
-
61
- - It acts as an intermediary between the OpenHands backend and the sandboxed environment
62
- - It executes various types of actions (shell commands, file operations, Python code, etc.) safely within the container
63
- - It manages the state of the sandboxed environment, including the current working directory and loaded plugins
64
- - It formats and returns observations to the backend, ensuring a consistent interface for processing results
65
-
66
- ## How OpenHands builds and maintains OH Runtime images
67
-
68
- OpenHands' approach to building and managing runtime images ensures efficiency, consistency, and flexibility in creating and maintaining Docker images for both production and development environments.
69
-
70
- Check out the [relevant code](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/utils/runtime_build.py) if you are interested in more details.
71
-
72
- ### Image Tagging System
73
-
74
- OpenHands uses a three-tag system for its runtime images to balance reproducibility with flexibility.
75
- Tags may be in one of 2 formats:
76
-
77
- - **Versioned Tag**: `oh_v{openhands_version}_{base_image}` (e.g.: `oh_v0.9.9_nikolaik_s_python-nodejs_t_python3.12-nodejs22`)
78
- - **Lock Tag**: `oh_v{openhands_version}_{16_digit_lock_hash}` (e.g.: `oh_v0.9.9_1234567890abcdef`)
79
- - **Source Tag**: `oh_v{openhands_version}_{16_digit_lock_hash}_{16_digit_source_hash}`
80
- (e.g.: `oh_v0.9.9_1234567890abcdef_1234567890abcdef`)
81
-
82
- #### Source Tag - Most Specific
83
-
84
- This is the first 16 digits of the MD5 of the directory hash for the source directory. This gives a hash
85
- for only the openhands source
86
-
87
- #### Lock Tag
88
-
89
- This hash is built from the first 16 digits of the MD5 of:
90
-
91
- - The name of the base image upon which the image was built (e.g.: `nikolaik/python-nodejs:python3.12-nodejs22`)
92
- - The content of the `pyproject.toml` included in the image.
93
- - The content of the `poetry.lock` included in the image.
94
-
95
- This effectively gives a hash for the dependencies of Openhands independent of the source code.
96
-
97
- #### Versioned Tag - Most Generic
98
-
99
- This tag is a concatenation of openhands version and the base image name (transformed to fit in tag standard).
100
-
101
- #### Build Process
102
-
103
- When generating an image...
104
-
105
- - **No re-build**: OpenHands first checks whether an image with the same **most specific source tag** exists. If there is such an image,
106
- no build is performed - the existing image is used.
107
- - **Fastest re-build**: OpenHands next checks whether an image with the **generic lock tag** exists. If there is such an image,
108
- OpenHands builds a new image based upon it, bypassing all installation steps (like `poetry install` and
109
- `apt-get`) except a final operation to copy the current source code. The new image is tagged with a
110
- **source** tag only.
111
- - **Ok-ish re-build**: If neither a **source** nor **lock** tag exists, an image will be built based upon the **versioned** tag image.
112
- In versioned tag image, most dependencies should already been installed hence saving time.
113
- - **Slowest re-build**: If all of the three tags don't exists, a brand new image is built based upon the base
114
- image (Which is a slower operation). This new image is tagged with all the **source**, **lock**, and **versioned** tags.
115
-
116
- This tagging approach allows OpenHands to efficiently manage both development and production environments.
117
-
118
- 1. Identical source code and Dockerfile always produce the same image (via hash-based tags)
119
- 2. The system can quickly rebuild images when minor changes occur (by leveraging recent compatible images)
120
- 3. The **lock** tag (e.g., `runtime:oh_v0.9.3_1234567890abcdef`) always points to the latest build for a particular base image, dependency, and OpenHands version combination
121
-
122
- ## Runtime Plugin System
123
-
124
- The OpenHands Runtime supports a plugin system that allows for extending functionality and customizing the runtime environment. Plugins are initialized when the runtime client starts up.
125
-
126
- Check [an example of Jupyter plugin here](https://github.com/All-Hands-AI/OpenHands/blob/ecf4aed28b0cf7c18d4d8ff554883ba182fc6bdd/openhands/runtime/plugins/jupyter/__init__.py#L21-L55) if you want to implement your own plugin.
127
-
128
- *More details about the Plugin system are still under construction - contributions are welcomed!*
129
-
130
- Key aspects of the plugin system:
131
-
132
- 1. Plugin Definition: Plugins are defined as Python classes that inherit from a base `Plugin` class
133
- 2. Plugin Registration: Available plugins are registered in an `ALL_PLUGINS` dictionary
134
- 3. Plugin Specification: Plugins are associated with `Agent.sandbox_plugins: list[PluginRequirement]`. Users can specify which plugins to load when initializing the runtime
135
- 4. Initialization: Plugins are initialized asynchronously when the runtime client starts
136
- 5. Usage: The runtime client can use initialized plugins to extend its capabilities (e.g., the JupyterPlugin for running IPython cells)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/cloud/cloud-api.mdx DELETED
@@ -1,176 +0,0 @@
1
- ---
2
- title: Cloud API
3
- description: OpenHands Cloud provides a REST API that allows you to programmatically interact with the service. This guide explains how to obtain an API key and use the API to start conversations.
4
- ---
5
-
6
- For more detailed information about the API, refer to the [OpenHands API Reference](https://docs.all-hands.dev/swagger-ui/).
7
-
8
- ## Obtaining an API Key
9
-
10
- To use the OpenHands Cloud API, you'll need to generate an API key:
11
-
12
- 1. Log in to your [OpenHands Cloud](https://app.all-hands.dev) account.
13
- 2. Navigate to the [Settings page](https://app.all-hands.dev/settings).
14
- 3. Select the `API Keys` tab.
15
- 4. Click `Create API Key`.
16
- 5. Give your key a descriptive name (Example: "Development" or "Production") and select `Create`.
17
- 6. Copy the generated API key and store it securely. It will only be shown once.
18
-
19
- ![API Key Generation](/static/img/docs/api-key-generation.png)
20
-
21
- ## API Usage
22
-
23
- ### Starting a New Conversation
24
-
25
- To start a new conversation with OpenHands to perform a task, you'll need to make a POST request to the conversation endpoint.
26
-
27
- #### Request Parameters
28
-
29
- | Parameter | Type | Required | Description |
30
- |--------------------|----------|----------|------------------------------------------------------------------------------------------------------|
31
- | `initial_user_msg` | string | Yes | The initial message to start the conversation. |
32
- | `repository` | string | No | Git repository name to provide context in the format `owner/repo`. You must have access to the repo. |
33
-
34
- #### Examples
35
-
36
- <details>
37
- <summary>cURL</summary>
38
-
39
- ```bash
40
- curl -X POST "https://app.all-hands.dev/api/conversations" \
41
- -H "Authorization: Bearer YOUR_API_KEY" \
42
- -H "Content-Type: application/json" \
43
- -d '{
44
- "initial_user_msg": "Check whether there is any incorrect information in the README.md file and send a PR to fix it if so.",
45
- "repository": "yourusername/your-repo"
46
- }'
47
- ```
48
- </details>
49
-
50
- <details>
51
- <summary>Python (with requests)</summary>
52
-
53
- ```python
54
- import requests
55
-
56
- api_key = "YOUR_API_KEY"
57
- url = "https://app.all-hands.dev/api/conversations"
58
-
59
- headers = {
60
- "Authorization": f"Bearer {api_key}",
61
- "Content-Type": "application/json"
62
- }
63
-
64
- data = {
65
- "initial_user_msg": "Check whether there is any incorrect information in the README.md file and send a PR to fix it if so.",
66
- "repository": "yourusername/your-repo"
67
- }
68
-
69
- response = requests.post(url, headers=headers, json=data)
70
- conversation = response.json()
71
-
72
- print(f"Conversation Link: https://app.all-hands.dev/conversations/{conversation['conversation_id']}")
73
- print(f"Status: {conversation['status']}")
74
- ```
75
- </details>
76
-
77
- <details>
78
- <summary>TypeScript/JavaScript (with fetch)</summary>
79
-
80
- ```typescript
81
- const apiKey = "YOUR_API_KEY";
82
- const url = "https://app.all-hands.dev/api/conversations";
83
-
84
- const headers = {
85
- "Authorization": `Bearer ${apiKey}`,
86
- "Content-Type": "application/json"
87
- };
88
-
89
- const data = {
90
- initial_user_msg: "Check whether there is any incorrect information in the README.md file and send a PR to fix it if so.",
91
- repository: "yourusername/your-repo"
92
- };
93
-
94
- async function startConversation() {
95
- try {
96
- const response = await fetch(url, {
97
- method: "POST",
98
- headers: headers,
99
- body: JSON.stringify(data)
100
- });
101
-
102
- const conversation = await response.json();
103
-
104
- console.log(`Conversation Link: https://app.all-hands.dev/conversations/${conversation.id}`);
105
- console.log(`Status: ${conversation.status}`);
106
-
107
- return conversation;
108
- } catch (error) {
109
- console.error("Error starting conversation:", error);
110
- }
111
- }
112
-
113
- startConversation();
114
- ```
115
-
116
- </details>
117
-
118
- #### Response
119
-
120
- The API will return a JSON object with details about the created conversation:
121
-
122
- ```json
123
- {
124
- "status": "ok",
125
- "conversation_id": "abc1234",
126
- }
127
- ```
128
-
129
- You may receive an `AuthenticationError` if:
130
-
131
- - You provided an invalid API key.
132
- - You provided the wrong repository name.
133
- - You don't have access to the repository.
134
-
135
-
136
- ### Retrieving Conversation Status
137
-
138
- You can check the status of a conversation by making a GET request to the conversation endpoint.
139
-
140
- #### Endpoint
141
-
142
- ```
143
- GET https://app.all-hands.dev/api/conversations/{conversation_id}
144
- ```
145
-
146
- #### Example
147
-
148
- <details>
149
- <summary>cURL</summary>
150
-
151
- ```bash
152
- curl -X GET "https://app.all-hands.dev/api/conversations/{conversation_id}" \
153
- -H "Authorization: Bearer YOUR_API_KEY"
154
- ```
155
- </details>
156
-
157
- #### Response
158
-
159
- The response is formatted as follows:
160
-
161
- ```json
162
- {
163
- "conversation_id":"abc1234",
164
- "title":"Update README.md",
165
- "created_at":"2025-04-29T15:13:51.370706Z",
166
- "last_updated_at":"2025-04-29T15:13:57.199210Z",
167
- "status":"RUNNING",
168
- "selected_repository":"yourusername/your-repo",
169
- "trigger":"gui"
170
- }
171
- ```
172
-
173
- ## Rate Limits
174
-
175
- If you have too many conversations running at once, older conversations will be paused to limit the number of concurrent conversations.
176
- If you're running into issues and need a higher limit for your use case, please contact us at [[email protected]](mailto:[email protected]).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/cloud/cloud-ui.mdx DELETED
@@ -1,36 +0,0 @@
1
- ---
2
- title: Cloud UI
3
- description: The Cloud UI provides a web interface for interacting with OpenHands. This page explains how to use the
4
- OpenHands Cloud UI.
5
- ---
6
-
7
- ## Landing Page
8
-
9
- The landing page is where you can:
10
-
11
- - [Add GitHub repository access](/usage/cloud/github-installation#adding-github-repository-access) to OpenHands.
12
- - [Select a GitHub repo](/usage/cloud/github-installation#working-with-github-repos-in-openhands-cloud) or
13
- [a GitLab repo](/usage/cloud/gitlab-installation#working-with-gitlab-repos-in-openhands-cloud) to start working on.
14
- - See `Suggested Tasks` for repositories that OpenHands has access to.
15
- - Launch an empty conversation using `Launch from Scratch`.
16
-
17
- ## Settings
18
-
19
- The Settings page allows you to:
20
-
21
- - [Configure GitHub repository access](/usage/cloud/github-installation#modifying-repository-access) for OpenHands.
22
- - Set application settings like your preferred language, notifications and other preferences.
23
- - Add credits to your account.
24
- - Generate custom secrets.
25
- - Create API keys to work with OpenHands programmatically.
26
-
27
- ## Key Features
28
-
29
- For an overview of the key features available inside a conversation, please refer to the [Key Features](../key-features)
30
- section of the documentation.
31
-
32
- ## Next Steps
33
-
34
- - [Install GitHub Integration](/usage/cloud/github-installation) to use OpenHands with your GitHub repositories.
35
- - [Install GitLab Integration](/usage/cloud/gitlab-installation) to use OpenHands with your GitLab repositories.
36
- - [Use the Cloud API](/usage/cloud/cloud-api) to programmatically interact with OpenHands.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/cloud/github-installation.mdx DELETED
@@ -1,71 +0,0 @@
1
- ---
2
- title: GitHub Integration
3
- description: This guide walks you through the process of installing OpenHands Cloud for your GitHub repositories. Once
4
- set up, it will allow OpenHands to work with your GitHub repository through the Cloud UI or straight from GitHub!
5
- ---
6
-
7
- ## Prerequisites
8
-
9
- - Signed in to [OpenHands Cloud](https://app.all-hands.dev) with [a GitHub account](/usage/cloud/openhands-cloud).
10
-
11
- ## Adding GitHub Repository Access
12
-
13
- You can grant OpenHands access to specific GitHub repositories:
14
-
15
- 1. Click on `Add GitHub repos` on the landing page.
16
- 2. Select your organization and choose the specific repositories to grant OpenHands access to.
17
- <Accordion title="OpenHands permissions">
18
- - OpenHands requests short-lived tokens (8-hour expiration) with these permissions:
19
- - Actions: Read and write
20
- - Commit statuses: Read and write
21
- - Contents: Read and write
22
- - Issues: Read and write
23
- - Metadata: Read-only
24
- - Pull requests: Read and write
25
- - Webhooks: Read and write
26
- - Workflows: Read and write
27
- - Repository access for a user is granted based on:
28
- - Permission granted for the repository
29
- - User's GitHub permissions (owner/collaborator)
30
- </Accordion>
31
-
32
- 3. Click `Install & Authorize`.
33
-
34
- ## Modifying Repository Access
35
-
36
- You can modify GitHub repository access at any time by:
37
- - Selecting `Add GitHub repos` on the landing page or
38
- - Visiting the Settings page and selecting `Configure GitHub Repositories` under the `Git` tab
39
-
40
- ## Working With GitHub Repos in Openhands Cloud
41
-
42
- Once you've granted GitHub repository access, you can start working with your GitHub repository. Use the `select a repo`
43
- and `select a branch` dropdowns to select the appropriate repository and branch you'd like OpenHands to work on. Then
44
- click on `Launch` to start the conversation!
45
-
46
- ![Connect Repo](/static/img/connect-repo.png)
47
-
48
- ## Working on Github Issues and Pull Requests Using Openhands
49
-
50
- Giving GitHub repository access to OpenHands also allows you to work on GitHub issues and pull requests directly.
51
-
52
- ### Working with Issues
53
-
54
- On your repository, label an issue with `openhands` or add a message starting with
55
- `@openhands`. OpenHands will:
56
- 1. Comment on the issue to let you know it is working on it.
57
- - You can click on the link to track the progress on OpenHands Cloud.
58
- 2. Open a pull request if it determines that the issue has been successfully resolved.
59
- 3. Comment on the issue with a summary of the performed tasks and a link to the PR.
60
-
61
- ### Working with Pull Requests
62
-
63
- To get OpenHands to work on pull requests, mention `@openhands` in the comments to:
64
- - Ask questions
65
- - Request updates
66
- - Get code explanations
67
-
68
- ## Next Steps
69
-
70
- - [Learn about the Cloud UI](/usage/cloud/cloud-ui).
71
- - [Use the Cloud API](/usage/cloud/cloud-api) to programmatically interact with OpenHands.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/cloud/gitlab-installation.mdx DELETED
@@ -1,25 +0,0 @@
1
- ---
2
- title: GitLab Integration
3
- description: This guide walks you through the process of installing OpenHands Cloud for your GitLab repositories. Once
4
- set up, it will allow OpenHands to work with your GitLab repository.
5
- ---
6
-
7
- ## Prerequisites
8
-
9
- - Signed in to [OpenHands Cloud](https://app.all-hands.dev) with [a GitLab account](/usage/cloud/openhands-cloud).
10
-
11
- ## Adding GitLab Repository Access
12
-
13
- Upon signing into OpenHands Cloud with a GitLab account, OpenHands will have access to your repositories.
14
-
15
- ## Working With GitLab Repos in Openhands Cloud
16
-
17
- After signing in with a Gitlab account, use the `select a repo` and `select a branch` dropdowns to select the
18
- appropriate repository and branch you'd like OpenHands to work on. Then click on `Launch` to start the conversation!
19
-
20
- ![Connect Repo](/static/img/connect-repo.png)
21
-
22
- ## Next Steps
23
-
24
- - [Learn about the Cloud UI](/usage/cloud/cloud-ui).
25
- - [Use the Cloud API](/usage/cloud/cloud-api) to programmatically interact with OpenHands.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/cloud/openhands-cloud.mdx DELETED
@@ -1,26 +0,0 @@
1
- ---
2
- title: Getting Started
3
- description: Getting started with OpenHands Cloud.
4
- ---
5
-
6
- ## Accessing OpenHands Cloud
7
-
8
- OpenHands Cloud is the hosted cloud version of All Hands AI's OpenHands. To get started with OpenHands Cloud,
9
- visit [app.all-hands.dev](https://app.all-hands.dev).
10
-
11
- You'll be prompted to connect with your GitHub or GitLab account:
12
-
13
- 1. Click `Log in with GitHub` or `Log in with GitLab`.
14
- 2. Review the permissions requested by OpenHands and authorize the application.
15
- - OpenHands will require certain permissions from your account. To read more about these permissions,
16
- you can click the `Learn more` link on the authorization page.
17
- 3. Review and accept the `terms of service` and select `Continue`.
18
-
19
- ## Next Steps
20
-
21
- Once you've connected your account, you can:
22
-
23
- - [Install GitHub Integration](/usage/cloud/github-installation) to use OpenHands with your GitHub repositories.
24
- - [Install GitLab Integration](/usage/cloud/gitlab-installation) to use OpenHands with your GitLab repositories.
25
- - [Learn about the Cloud UI](/usage/cloud/cloud-ui).
26
- - [Use the Cloud API](/usage/cloud/cloud-api) to programmatically interact with OpenHands.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/configuration-options.mdx DELETED
@@ -1,413 +0,0 @@
1
- ---
2
- title: Configuration Options
3
- description: This page outlines all available configuration options for OpenHands, allowing you to customize its behavior and integrate it with other services. In GUI Mode, any settings applied through the Settings UI will take precedence.
4
- ---
5
-
6
- ## Core Configuration
7
-
8
- The core configuration options are defined in the `[core]` section of the `config.toml` file.
9
-
10
- ### API Keys
11
- - `e2b_api_key`
12
- - Type: `str`
13
- - Default: `""`
14
- - Description: API key for E2B
15
-
16
- - `modal_api_token_id`
17
- - Type: `str`
18
- - Default: `""`
19
- - Description: API token ID for Modal
20
-
21
- - `modal_api_token_secret`
22
- - Type: `str`
23
- - Default: `""`
24
- - Description: API token secret for Modal
25
-
26
- ### Workspace
27
- - `workspace_base` **(Deprecated)**
28
- - Type: `str`
29
- - Default: `"./workspace"`
30
- - Description: Base path for the workspace. **Deprecated: Use `SANDBOX_VOLUMES` instead.**
31
-
32
- - `cache_dir`
33
- - Type: `str`
34
- - Default: `"/tmp/cache"`
35
- - Description: Cache directory path
36
-
37
- ### Debugging and Logging
38
- - `debug`
39
- - Type: `bool`
40
- - Default: `false`
41
- - Description: Enable debugging
42
-
43
- - `disable_color`
44
- - Type: `bool`
45
- - Default: `false`
46
- - Description: Disable color in terminal output
47
-
48
- ### Trajectories
49
- - `save_trajectory_path`
50
- - Type: `str`
51
- - Default: `"./trajectories"`
52
- - Description: Path to store trajectories (can be a folder or a file). If it's a folder, the trajectories will be saved in a file named with the session id name and .json extension, in that folder.
53
-
54
- - `replay_trajectory_path`
55
- - Type: `str`
56
- - Default: `""`
57
- - Description: Path to load a trajectory and replay. If given, must be a path to the trajectory file in JSON format. The actions in the trajectory file would be replayed first before any user instruction is executed.
58
-
59
- ### File Store
60
- - `file_store_path`
61
- - Type: `str`
62
- - Default: `"/tmp/file_store"`
63
- - Description: File store path
64
-
65
- - `file_store`
66
- - Type: `str`
67
- - Default: `"memory"`
68
- - Description: File store type
69
-
70
- - `file_uploads_allowed_extensions`
71
- - Type: `list of str`
72
- - Default: `[".*"]`
73
- - Description: List of allowed file extensions for uploads
74
-
75
- - `file_uploads_max_file_size_mb`
76
- - Type: `int`
77
- - Default: `0`
78
- - Description: Maximum file size for uploads, in megabytes
79
-
80
- - `file_uploads_restrict_file_types`
81
- - Type: `bool`
82
- - Default: `false`
83
- - Description: Restrict file types for file uploads
84
-
85
- - `file_uploads_allowed_extensions`
86
- - Type: `list of str`
87
- - Default: `[".*"]`
88
- - Description: List of allowed file extensions for uploads
89
-
90
- ### Task Management
91
- - `max_budget_per_task`
92
- - Type: `float`
93
- - Default: `0.0`
94
- - Description: Maximum budget per task (0.0 means no limit)
95
-
96
- - `max_iterations`
97
- - Type: `int`
98
- - Default: `100`
99
- - Description: Maximum number of iterations
100
-
101
- ### Sandbox Configuration
102
- - `volumes`
103
- - Type: `str`
104
- - Default: `None`
105
- - Description: Volume mounts in the format 'host_path:container_path[:mode]', e.g. '/my/host/dir:/workspace:rw'. Multiple mounts can be specified using commas, e.g. '/path1:/workspace/path1,/path2:/workspace/path2:ro'
106
-
107
- - `workspace_mount_path_in_sandbox` **(Deprecated)**
108
- - Type: `str`
109
- - Default: `"/workspace"`
110
- - Description: Path to mount the workspace in the sandbox. **Deprecated: Use `SANDBOX_VOLUMES` instead.**
111
-
112
- - `workspace_mount_path` **(Deprecated)**
113
- - Type: `str`
114
- - Default: `""`
115
- - Description: Path to mount the workspace. **Deprecated: Use `SANDBOX_VOLUMES` instead.**
116
-
117
- - `workspace_mount_rewrite` **(Deprecated)**
118
- - Type: `str`
119
- - Default: `""`
120
- - Description: Path to rewrite the workspace mount path to. You can usually ignore this, it refers to special cases of running inside another container. **Deprecated: Use `SANDBOX_VOLUMES` instead.**
121
-
122
- ### Miscellaneous
123
- - `run_as_openhands`
124
- - Type: `bool`
125
- - Default: `true`
126
- - Description: Run as OpenHands
127
-
128
- - `runtime`
129
- - Type: `str`
130
- - Default: `"docker"`
131
- - Description: Runtime environment
132
-
133
- - `default_agent`
134
- - Type: `str`
135
- - Default: `"CodeActAgent"`
136
- - Description: Name of the default agent
137
-
138
- - `jwt_secret`
139
- - Type: `str`
140
- - Default: `uuid.uuid4().hex`
141
- - Description: JWT secret for authentication. Please set it to your own value.
142
-
143
- ## LLM Configuration
144
-
145
- The LLM (Large Language Model) configuration options are defined in the `[llm]` section of the `config.toml` file.
146
-
147
- To use these with the docker command, pass in `-e LLM_<option>`. Example: `-e LLM_NUM_RETRIES`.
148
-
149
- <Note>
150
- For development setups, you can also define custom named LLM configurations. See [Custom LLM Configurations](./llms/custom-llm-configs) for details.
151
- </Note>
152
-
153
- **AWS Credentials**
154
- - `aws_access_key_id`
155
- - Type: `str`
156
- - Default: `""`
157
- - Description: AWS access key ID
158
-
159
- - `aws_region_name`
160
- - Type: `str`
161
- - Default: `""`
162
- - Description: AWS region name
163
-
164
- - `aws_secret_access_key`
165
- - Type: `str`
166
- - Default: `""`
167
- - Description: AWS secret access key
168
-
169
- ### API Configuration
170
- - `api_key`
171
- - Type: `str`
172
- - Default: `None`
173
- - Description: API key to use
174
-
175
- - `base_url`
176
- - Type: `str`
177
- - Default: `""`
178
- - Description: API base URL
179
-
180
- - `api_version`
181
- - Type: `str`
182
- - Default: `""`
183
- - Description: API version
184
-
185
- - `input_cost_per_token`
186
- - Type: `float`
187
- - Default: `0.0`
188
- - Description: Cost per input token
189
-
190
- - `output_cost_per_token`
191
- - Type: `float`
192
- - Default: `0.0`
193
- - Description: Cost per output token
194
-
195
- ### Custom LLM Provider
196
- - `custom_llm_provider`
197
- - Type: `str`
198
- - Default: `""`
199
- - Description: Custom LLM provider
200
-
201
-
202
- ### Message Handling
203
- - `max_message_chars`
204
- - Type: `int`
205
- - Default: `30000`
206
- - Description: The approximate maximum number of characters in the content of an event included in the prompt to the LLM. Larger observations are truncated.
207
-
208
- - `max_input_tokens`
209
- - Type: `int`
210
- - Default: `0`
211
- - Description: Maximum number of input tokens
212
-
213
- - `max_output_tokens`
214
- - Type: `int`
215
- - Default: `0`
216
- - Description: Maximum number of output tokens
217
-
218
- ### Model Selection
219
- - `model`
220
- - Type: `str`
221
- - Default: `"claude-3-5-sonnet-20241022"`
222
- - Description: Model to use
223
-
224
- ### Retrying
225
- - `num_retries`
226
- - Type: `int`
227
- - Default: `8`
228
- - Description: Number of retries to attempt
229
-
230
- - `retry_max_wait`
231
- - Type: `int`
232
- - Default: `120`
233
- - Description: Maximum wait time (in seconds) between retry attempts
234
-
235
- - `retry_min_wait`
236
- - Type: `int`
237
- - Default: `15`
238
- - Description: Minimum wait time (in seconds) between retry attempts
239
-
240
- - `retry_multiplier`
241
- - Type: `float`
242
- - Default: `2.0`
243
- - Description: Multiplier for exponential backoff calculation
244
-
245
- ### Advanced Options
246
- - `drop_params`
247
- - Type: `bool`
248
- - Default: `false`
249
- - Description: Drop any unmapped (unsupported) params without causing an exception
250
-
251
- - `caching_prompt`
252
- - Type: `bool`
253
- - Default: `true`
254
- - Description: Using the prompt caching feature if provided by the LLM and supported
255
-
256
- - `ollama_base_url`
257
- - Type: `str`
258
- - Default: `""`
259
- - Description: Base URL for the OLLAMA API
260
-
261
- - `temperature`
262
- - Type: `float`
263
- - Default: `0.0`
264
- - Description: Temperature for the API
265
-
266
- - `timeout`
267
- - Type: `int`
268
- - Default: `0`
269
- - Description: Timeout for the API
270
-
271
- - `top_p`
272
- - Type: `float`
273
- - Default: `1.0`
274
- - Description: Top p for the API
275
-
276
- - `disable_vision`
277
- - Type: `bool`
278
- - Default: `None`
279
- - Description: If model is vision capable, this option allows to disable image processing (useful for cost reduction)
280
-
281
- ## Agent Configuration
282
-
283
- The agent configuration options are defined in the `[agent]` and `[agent.<agent_name>]` sections of the `config.toml` file.
284
-
285
- ### LLM Configuration
286
- - `llm_config`
287
- - Type: `str`
288
- - Default: `'your-llm-config-group'`
289
- - Description: The name of the LLM config to use
290
-
291
- ### ActionSpace Configuration
292
- - `function_calling`
293
- - Type: `bool`
294
- - Default: `true`
295
- - Description: Whether function calling is enabled
296
-
297
- - `enable_browsing`
298
- - Type: `bool`
299
- - Default: `false`
300
- - Description: Whether browsing delegate is enabled in the action space (only works with function calling)
301
-
302
- - `enable_llm_editor`
303
- - Type: `bool`
304
- - Default: `false`
305
- - Description: Whether LLM editor is enabled in the action space (only works with function calling)
306
-
307
- - `enable_jupyter`
308
- - Type: `bool`
309
- - Default: `false`
310
- - Description: Whether Jupyter is enabled in the action space
311
-
312
- - `enable_history_truncation`
313
- - Type: `bool`
314
- - Default: `true`
315
- - Description: Whether history should be truncated to continue the session when hitting LLM context length limit
316
-
317
- ### Microagent Usage
318
- - `enable_prompt_extensions`
319
- - Type: `bool`
320
- - Default: `true`
321
- - Description: Whether to use microagents at all
322
-
323
- - `disabled_microagents`
324
- - Type: `list of str`
325
- - Default: `None`
326
- - Description: A list of microagents to disable
327
-
328
- ## Sandbox Configuration
329
-
330
- The sandbox configuration options are defined in the `[sandbox]` section of the `config.toml` file.
331
-
332
-
333
-
334
- To use these with the docker command, pass in `-e SANDBOX_<option>`. Example: `-e SANDBOX_TIMEOUT`.
335
-
336
- ### Execution
337
- - `timeout`
338
- - Type: `int`
339
- - Default: `120`
340
- - Description: Sandbox timeout in seconds
341
-
342
- - `user_id`
343
- - Type: `int`
344
- - Default: `1000`
345
- - Description: Sandbox user ID
346
-
347
- ### Container Image
348
- - `base_container_image`
349
- - Type: `str`
350
- - Default: `"nikolaik/python-nodejs:python3.12-nodejs22"`
351
- - Description: Container image to use for the sandbox
352
-
353
- ### Networking
354
- - `use_host_network`
355
- - Type: `bool`
356
- - Default: `false`
357
- - Description: Use host network
358
-
359
- - `runtime_binding_address`
360
- - Type: `str`
361
- - Default: `0.0.0.0`
362
- - Description: The binding address for the runtime ports. It specifies which network interface on the host machine Docker should bind the runtime ports to.
363
-
364
- ### Linting and Plugins
365
- - `enable_auto_lint`
366
- - Type: `bool`
367
- - Default: `false`
368
- - Description: Enable auto linting after editing
369
-
370
- - `initialize_plugins`
371
- - Type: `bool`
372
- - Default: `true`
373
- - Description: Whether to initialize plugins
374
-
375
- ### Dependencies and Environment
376
- - `runtime_extra_deps`
377
- - Type: `str`
378
- - Default: `""`
379
- - Description: Extra dependencies to install in the runtime image
380
-
381
- - `runtime_startup_env_vars`
382
- - Type: `dict`
383
- - Default: `{}`
384
- - Description: Environment variables to set at the launch of the runtime
385
-
386
- ### Evaluation
387
- - `browsergym_eval_env`
388
- - Type: `str`
389
- - Default: `""`
390
- - Description: BrowserGym environment to use for evaluation
391
-
392
- ## Security Configuration
393
-
394
- The security configuration options are defined in the `[security]` section of the `config.toml` file.
395
-
396
- To use these with the docker command, pass in `-e SECURITY_<option>`. Example: `-e SECURITY_CONFIRMATION_MODE`.
397
-
398
- ### Confirmation Mode
399
- - `confirmation_mode`
400
- - Type: `bool`
401
- - Default: `false`
402
- - Description: Enable confirmation mode
403
-
404
- ### Security Analyzer
405
- - `security_analyzer`
406
- - Type: `str`
407
- - Default: `""`
408
- - Description: The security analyzer to use
409
-
410
- ---
411
-
412
- > **Note**: Adjust configurations carefully, especially for memory, security, and network-related settings to ensure optimal performance and security.
413
- Please note that the configuration options may be subject to change in future versions of OpenHands. It's recommended to refer to the official documentation for the most up-to-date information.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/feedback.mdx DELETED
@@ -1,50 +0,0 @@
1
- # ✅ Providing Feedback
2
-
3
- When using OpenHands, you will encounter cases where things work well, and others where they don't. We encourage you to
4
- provide feedback when you use OpenHands to help give feedback to the development team, and perhaps more importantly,
5
- create an open corpus of coding agent training examples -- Share-OpenHands!
6
-
7
- ## 📝 How to Provide Feedback
8
-
9
- Providing feedback is easy! When you are using OpenHands, you can press the thumbs-up or thumbs-down button at any point
10
- during your interaction. You will be prompted to provide your email address
11
- (e.g. so we can contact you if we want to ask any follow-up questions), and you can choose whether you want to provide feedback publicly or privately.
12
-
13
- <iframe width="560" height="315" src="https://www.youtube.com/embed/5rFx-StMVV0?si=svo7xzp6LhGK_GXr" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
14
-
15
- ## 📜 Data Use and Privacy
16
-
17
- ### Data sharing settings
18
-
19
- When you submit data, you can submit it either publicly or privately.
20
-
21
- - **Public** data will be distributed under the MIT License, like OpenHands itself, and can be used by the community to
22
- train and test models. Obviously, feedback that you can make public will be more valuable for the community as a whole,
23
- so when you are not dealing with sensitive information, we would encourage you to choose this option!
24
- - **Private** data will be made available to the OpenHands team for the purpose of improving OpenHands.
25
- However, a link with a unique ID will still be created that you can share publicly with others.
26
-
27
- ### Who collects and stores the data?
28
-
29
- The data is collected and stored by [All Hands AI](https://all-hands.dev), a company founded by OpenHands maintainers to support and improve OpenHands.
30
-
31
- ### How will public data be released?
32
-
33
- The public data will be released when we hit fixed milestones, such as 1,000 public examples, 10,000 public examples, etc.
34
- At this time, we will follow the following release process:
35
-
36
- 1. All people who contributed public feedback will receive an email describing the data release and being given an opportunity to opt out.
37
- 2. The person or people in charge of the data release will perform quality control of the data, removing low-quality feedback,
38
- removing email submitter email addresses, and attempting to remove any sensitive information.
39
- 3. The data will be released publicly under the MIT license through commonly used sites such as GitHub or Hugging Face.
40
-
41
- ### What if I want my data deleted?
42
-
43
- For data on the All Hands AI servers, we are happy to delete it at request:
44
-
45
- **One Piece of Data:** If you want one piece of data deleted, we will shortly be adding a mechanism to delete pieces of
46
- data using the link and password that is displayed on the interface when you submit data.
47
-
48
- **All Data:** If you would like all pieces of your data deleted, or you do not have the ID and password that you
49
- received when submitting the data, please contact `[email protected]` from the email address that you registered
50
- when you originally submitted the data.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/getting-started.mdx DELETED
@@ -1,100 +0,0 @@
1
- ---
2
- title: Start Building
3
- description: So you've [run OpenHands](./installation) and have [set up your LLM](./installation#setup). Now what?
4
- icon: code
5
- ---
6
-
7
- OpenHands can assist with a range of engineering tasks. However, the technology is still new, and we’re far from having
8
- agents that can handle complex tasks independently. It’s important to understand what the agent does well and where it
9
- needs support.
10
-
11
- ## Hello World
12
-
13
- Start with a simple "hello world" example. It might be trickier than it seems!
14
-
15
- Prompt the agent with:
16
- > Write a bash script hello.sh that prints "hello world!"
17
-
18
- The agent will write the script, set the correct permissions, and run it to check the output.
19
-
20
- You can continue prompting the agent to refine your code. This is a great way to
21
- work with agents. Start simple, and iterate.
22
-
23
- > Modify hello.sh so that it accepts a name as the first argument, but defaults to "world"
24
-
25
- You can also use any language you need. The agent may need time to set up the environment.
26
-
27
- > Please convert hello.sh to a Ruby script, and run it
28
-
29
- ## Building From Scratch
30
-
31
- Agents excel at "greenfield" tasks, where they don’t need context about existing code and
32
- they can start from scratch.
33
- Begin with a simple task and iterate from there. Be specific about what you want and the tech stack.
34
-
35
- For example, we might build a TODO app:
36
-
37
- > Build a frontend-only TODO app in React. All state should be stored in localStorage.
38
-
39
- Once the basic structure is in place, continue refining:
40
-
41
- > Allow adding an optional due date to each task.
42
-
43
- Just like normal development, commit and push your code often.
44
- This way you can always revert back to an old state if the agent goes off track.
45
- You can ask the agent to commit and push for you:
46
-
47
- > Commit the changes and push them to a new branch called "feature/due-dates"
48
-
49
- ## Adding New Code
50
-
51
- OpenHands is great at adding new code to an existing codebase.
52
-
53
- For instance, you can ask OpenHands to add a GitHub action that lints your code. It might check your codebase to
54
- determine the language, then create a new file in `./github/workflows/lint.yml`.
55
-
56
- > Add a GitHub action that lints the code in this repository.
57
-
58
- Some tasks need more context. While OpenHands can use commands like ls and grep to search, providing context upfront
59
- speeds things up and reduces token usage.
60
-
61
- > Modify ./backend/api/routes.js to add a new route that returns a list of all tasks.
62
-
63
- > Add a new React component to the ./frontend/components directory to display a list of Widgets.
64
- > It should use the existing Widget component.
65
-
66
- ## Refactoring
67
-
68
- OpenHands does great at refactoring code in small chunks. Rather than rearchitecting the entire codebase,
69
- it's more effective to break up long files and functions or rename variables.
70
-
71
- > Rename all the single-letter variables in ./app.go.
72
-
73
- > Split the `build_and_deploy_widgets` function into two functions, `build_widgets` and `deploy_widgets` in widget.php.
74
-
75
- > Break ./api/routes.js into separate files for each route.
76
-
77
- ## Bug Fixes
78
-
79
- OpenHands can help track down and fix bugs, but bug fixing can be tricky and often requires more context.
80
- It’s helpful if you’ve already diagnosed the issue and just need OpenHands to handle the logic.
81
-
82
- > The email field in the `/subscribe` endpoint is rejecting .io domains. Fix this.
83
-
84
- > The `search_widgets` function in ./app.py is doing a case-sensitive search. Make it case-insensitive.
85
-
86
- For bug fixing, test-driven development can be really useful. You can ask the agent to write a new test and iterate
87
- until the bug is fixed:
88
-
89
- > The `hello` function crashes on the empty string. Write a test that reproduces this bug, then fix the code so it passes.
90
-
91
- ## More
92
-
93
- OpenHands can assist with nearly any coding task, but it takes some practice to get the best results.
94
- Keep these tips in mind:
95
- * Keep your tasks small.
96
- * Be specific.
97
- * Provide plenty of context.
98
- * Commit and push frequently.
99
-
100
- See [Prompting Best Practices](./prompting/prompting-best-practices) for more tips on how to get the most out of OpenHands.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/cli-mode.mdx DELETED
@@ -1,105 +0,0 @@
1
- ---
2
- title: CLI Mode
3
- description: CLI mode provides a powerful interactive Command-Line Interface (CLI) that lets you engage with OpenHands directly from your terminal.
4
- ---
5
-
6
- This mode is different from the [headless mode](./headless-mode), which is non-interactive and better for scripting.
7
-
8
- ## Getting Started
9
-
10
- ### Running with Python
11
-
12
- 1. Ensure you have followed the [Development setup instructions](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
13
- 2. Set your model, API key, and other preferences using environment variables or with the [`config.toml`](https://github.com/All-Hands-AI/OpenHands/blob/main/config.template.toml) file.
14
- 3. Launch an interactive OpenHands conversation from the command line:
15
-
16
- ```bash
17
- poetry run python -m openhands.cli.main
18
- ```
19
-
20
- This command opens an interactive prompt where you can type tasks or commands and get responses from OpenHands.
21
-
22
- ### Running with Docker
23
-
24
- 1. Set the following environment variables in your terminal:
25
- - `SANDBOX_VOLUMES` to specify the directory you want OpenHands to access ([See using SANDBOX_VOLUMES for more info](../runtimes/docker#using-sandbox_volumes))
26
- - `LLM_MODEL` - the LLM model to use (e.g. `export LLM_MODEL="anthropic/claude-sonnet-4-20250514"`)
27
- - `LLM_API_KEY` - your API key (e.g. `export LLM_API_KEY="sk_test_12345"`)
28
-
29
- 2. Run the following command:
30
-
31
- ```bash
32
- docker run -it \
33
- --pull=always \
34
- -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.41-nikolaik \
35
- -e SANDBOX_USER_ID=$(id -u) \
36
- -e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
37
- -e LLM_API_KEY=$LLM_API_KEY \
38
- -e LLM_MODEL=$LLM_MODEL \
39
- -v /var/run/docker.sock:/var/run/docker.sock \
40
- -v ~/.openhands-state:/.openhands-state \
41
- --add-host host.docker.internal:host-gateway \
42
- --name openhands-app-$(date +%Y%m%d%H%M%S) \
43
- docker.all-hands.dev/all-hands-ai/openhands:0.41 \
44
- python -m openhands.cli.main --override-cli-mode true
45
- ```
46
-
47
- This launches the CLI in Docker, allowing you to interact with OpenHands as described above.
48
-
49
- The `-e SANDBOX_USER_ID=$(id -u)` ensures files created by the agent in your workspace have the correct permissions.
50
-
51
- ## Interactive CLI Overview
52
-
53
- ### What is CLI Mode?
54
-
55
- CLI mode enables real-time interaction with OpenHands agents. You can type natural language tasks, use interactive
56
- commands, and receive instant feedback—all inside your terminal.
57
-
58
- ### Starting a Conversation
59
-
60
- When you start the CLI, you'll see a welcome message and a prompt (`>`). Enter your first task or type a command to
61
- begin your conversation.
62
-
63
- ### Available Commands
64
-
65
- You can use the following commands whenever the prompt (`>`) is displayed:
66
-
67
- | Command | Description |
68
- |--------------|----------------------------------------------------------------|
69
- | `/help` | Show all available interactive commands and their descriptions |
70
- | `/exit` | Exit the application |
71
- | `/init` | Initialize a new repository for agent exploration |
72
- | `/status` | Show conversation details and usage metrics |
73
- | `/new` | Start a new conversation |
74
- | `/settings` | View and modify current LLM/agent settings |
75
- | `/resume` | Resume the agent if paused |
76
-
77
- #### Settings and Configuration
78
-
79
- You can update your model, API key, agent, and other preferences interactively using the `/settings` command. Just
80
- follow the prompts:
81
-
82
- - **Basic settings**: Choose a model/provider and enter your API key.
83
- - **Advanced settings**: Set custom endpoints, enable or disable confirmation mode, and configure memory condensation.
84
-
85
- Settings can also be managed via the `config.toml` file.
86
-
87
- #### Repository Initialization
88
-
89
- The `/init` command helps the agent understand your project by creating a `.openhands/microagents/repo.md` file with
90
- project details and structure. Use this when onboarding the agent to a new codebase.
91
-
92
- #### Agent Pause/Resume Feature
93
-
94
- You can pause the agent while it is running by pressing `Ctrl-P`. To continue the conversation after pausing, simply
95
- type `/resume` at the prompt.
96
-
97
- ## Tips and Troubleshooting
98
-
99
- - Use `/help` at any time to see the list of available commands.
100
- - If you encounter permission issues, make sure your workspace directory is trusted and all required environment variables are set correctly.
101
- - For advanced LLM configuration, use the advanced options in `/settings`.
102
- - When confirmation mode is enabled, the CLI will prompt before sensitive operations. You can type `a` or `always` at the first confirmation prompt to automatically confirm subsequent actions for the current conversation.
103
- - If you want to start over, use `/new` to begin a fresh conversation without restarting the CLI.
104
-
105
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/custom-sandbox-guide.mdx DELETED
@@ -1,100 +0,0 @@
1
- ---
2
- title: Custom Sandbox
3
- description: This guide is for users that would like to use their own custom Docker image for the runtime. For example, with certain tools or programming languages pre-installed.
4
- ---
5
-
6
- The sandbox is where the agent performs its tasks. Instead of running commands directly on your computer
7
- (which could be risky), the agent runs them inside a Docker container.
8
-
9
- The default OpenHands sandbox (`python-nodejs:python3.12-nodejs22`
10
- from [nikolaik/python-nodejs](https://hub.docker.com/r/nikolaik/python-nodejs)) comes with some packages installed such
11
- as python and Node.js but may need other software installed by default.
12
-
13
- You have two options for customization:
14
-
15
- - Use an existing image with the required software.
16
- - Create your own custom Docker image.
17
-
18
- If you choose the first option, you can skip the `Create Your Docker Image` section.
19
-
20
- ## Create Your Docker Image
21
-
22
- To create a custom Docker image, it must be Debian based.
23
-
24
- For example, if you want OpenHands to have `ruby` installed, you could create a `Dockerfile` with the following content:
25
-
26
- ```dockerfile
27
- FROM nikolaik/python-nodejs:python3.12-nodejs22
28
-
29
- # Install required packages
30
- RUN apt-get update && apt-get install -y ruby
31
- ```
32
-
33
- Or you could use a Ruby-specific base image:
34
-
35
- ```dockerfile
36
- FROM ruby:latest
37
- ```
38
-
39
- Save this file in a folder. Then, build your Docker image (e.g., named custom-image) by navigating to the folder in
40
- the terminal and running::
41
- ```bash
42
- docker build -t custom-image .
43
- ```
44
-
45
- This will produce a new image called `custom-image`, which will be available in Docker.
46
-
47
- ## Using the Docker Command
48
-
49
- When running OpenHands using [the docker command](/usage/installation#start-the-app), replace
50
- `-e SANDBOX_RUNTIME_CONTAINER_IMAGE=...` with `-e SANDBOX_BASE_CONTAINER_IMAGE=<custom image name>`:
51
-
52
- ```commandline
53
- docker run -it --rm --pull=always \
54
- -e SANDBOX_BASE_CONTAINER_IMAGE=custom-image \
55
- ...
56
- ```
57
-
58
- ## Using the Development Workflow
59
-
60
- ### Setup
61
-
62
- First, ensure you can run OpenHands by following the instructions in [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
63
-
64
- ### Specify the Base Sandbox Image
65
-
66
- In the `config.toml` file within the OpenHands directory, set the `base_container_image` to the image you want to use.
67
- This can be an image you’ve already pulled or one you’ve built:
68
-
69
- ```bash
70
- [core]
71
- ...
72
- [sandbox]
73
- base_container_image="custom-image"
74
- ```
75
-
76
- ### Additional Configuration Options
77
-
78
- The `config.toml` file supports several other options for customizing your sandbox:
79
-
80
- ```toml
81
- [core]
82
- # Install additional dependencies when the runtime is built
83
- # Can contain any valid shell commands
84
- # If you need the path to the Python interpreter in any of these commands, you can use the $OH_INTERPRETER_PATH variable
85
- runtime_extra_deps = """
86
- pip install numpy pandas
87
- apt-get update && apt-get install -y ffmpeg
88
- """
89
-
90
- # Set environment variables for the runtime
91
- # Useful for configuration that needs to be available at runtime
92
- runtime_startup_env_vars = { DATABASE_URL = "postgresql://user:pass@localhost/db" }
93
-
94
- # Specify platform for multi-architecture builds (e.g., "linux/amd64" or "linux/arm64")
95
- platform = "linux/amd64"
96
- ```
97
-
98
- ### Run
99
-
100
- Run OpenHands by running ```make run``` in the top level directory.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/debugging.mdx DELETED
@@ -1,73 +0,0 @@
1
- ---
2
- title: Debugging
3
- ---
4
-
5
- The following is intended as a primer on debugging OpenHands for Development purposes.
6
-
7
- ## Server / VSCode
8
-
9
- The following `launch.json` will allow debugging the agent, controller and server elements, but not the sandbox (Which runs inside docker). It will ignore any changes inside the `workspace/` directory:
10
-
11
- ```
12
- {
13
- "version": "0.2.0",
14
- "configurations": [
15
- {
16
- "name": "OpenHands CLI",
17
- "type": "debugpy",
18
- "request": "launch",
19
- "module": "openhands.cli.main",
20
- "justMyCode": false
21
- },
22
- {
23
- "name": "OpenHands WebApp",
24
- "type": "debugpy",
25
- "request": "launch",
26
- "module": "uvicorn",
27
- "args": [
28
- "openhands.server.listen:app",
29
- "--reload",
30
- "--reload-exclude",
31
- "${workspaceFolder}/workspace",
32
- "--port",
33
- "3000"
34
- ],
35
- "justMyCode": false
36
- }
37
- ]
38
- }
39
- ```
40
-
41
- More specific debugging configurations which include more parameters may be specified:
42
-
43
- ```
44
- ...
45
- {
46
- "name": "Debug CodeAct",
47
- "type": "debugpy",
48
- "request": "launch",
49
- "module": "openhands.core.main",
50
- "args": [
51
- "-t",
52
- "Ask me what your task is.",
53
- "-d",
54
- "${workspaceFolder}/workspace",
55
- "-c",
56
- "CodeActAgent",
57
- "-l",
58
- "llm.o1",
59
- "-n",
60
- "prompts"
61
- ],
62
- "justMyCode": false
63
- }
64
- ...
65
- ```
66
-
67
- Values in the snippet above can be updated such that:
68
-
69
- * *t*: the task
70
- * *d*: the openhands workspace directory
71
- * *c*: the agent
72
- * *l*: the LLM config (pre-defined in config.toml)
73
- * *n*: session name (e.g. eventstream name)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/development-overview.mdx DELETED
@@ -1,71 +0,0 @@
1
- ---
2
- title: Development Overview
3
- description: This guide provides an overview of the key documentation resources available in the OpenHands repository. Whether you're looking to contribute, understand the architecture, or work on specific components, these resources will help you navigate the codebase effectively.
4
- ---
5
-
6
- ## Core Documentation
7
-
8
- ### Project Fundamentals
9
- - **Main Project Overview** (`/README.md`)
10
- The primary entry point for understanding OpenHands, including features and basic setup instructions.
11
-
12
- - **Development Guide** (`/Development.md`)
13
- Comprehensive guide for developers working on OpenHands, including setup, requirements, and development workflows.
14
-
15
- - **Contributing Guidelines** (`/CONTRIBUTING.md`)
16
- Essential information for contributors, covering code style, PR process, and contribution workflows.
17
-
18
- ### Component Documentation
19
-
20
- #### Frontend
21
- - **Frontend Application** (`/frontend/README.md`)
22
- Complete guide for setting up and developing the React-based frontend application.
23
-
24
- #### Backend
25
- - **Backend Implementation** (`/openhands/README.md`)
26
- Detailed documentation of the Python backend implementation and architecture.
27
-
28
- - **Server Documentation** (`/openhands/server/README.md`)
29
- Server implementation details, API documentation, and service architecture.
30
-
31
- - **Runtime Environment** (`/openhands/runtime/README.md`)
32
- Documentation covering the runtime environment, execution model, and runtime configurations.
33
-
34
- #### Infrastructure
35
- - **Container Documentation** (`/containers/README.md`)
36
- Comprehensive information about Docker containers, deployment strategies, and container management.
37
-
38
- ### Testing and Evaluation
39
- - **Unit Testing Guide** (`/tests/unit/README.md`)
40
- Instructions for writing, running, and maintaining unit tests.
41
-
42
- - **Evaluation Framework** (`/evaluation/README.md`)
43
- Documentation for the evaluation framework, benchmarks, and performance testing.
44
-
45
- ### Advanced Features
46
- - **Microagents Architecture** (`/microagents/README.md`)
47
- Detailed information about the microagents architecture, implementation, and usage.
48
-
49
- ### Documentation Standards
50
- - **Documentation Style Guide** (`/docs/DOC_STYLE_GUIDE.md`)
51
- Standards and guidelines for writing and maintaining project documentation.
52
-
53
- ## Getting Started with Development
54
-
55
- If you're new to developing with OpenHands, we recommend following this sequence:
56
-
57
- 1. Start with the main `README.md` to understand the project's purpose and features
58
- 2. Review the `CONTRIBUTING.md` guidelines if you plan to contribute
59
- 3. Follow the setup instructions in `Development.md`
60
- 4. Dive into specific component documentation based on your area of interest:
61
- - Frontend developers should focus on `/frontend/README.md`
62
- - Backend developers should start with `/openhands/README.md`
63
- - Infrastructure work should begin with `/containers/README.md`
64
-
65
- ## Documentation Updates
66
-
67
- When making changes to the codebase, please ensure that:
68
- 1. Relevant documentation is updated to reflect your changes
69
- 2. New features are documented in the appropriate README files
70
- 3. Any API changes are reflected in the server documentation
71
- 4. Documentation follows the style guide in `/docs/DOC_STYLE_GUIDE.md`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/evaluation-harness.mdx DELETED
@@ -1,280 +0,0 @@
1
- ---
2
- title: Evaluation Harness
3
- ---
4
-
5
- This guide provides an overview of how to integrate your own evaluation benchmark into the OpenHands framework.
6
-
7
- ## Setup Environment and LLM Configuration
8
-
9
- Please follow instructions [here](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) to setup your local development environment.
10
- OpenHands in development mode uses `config.toml` to keep track of most configurations.
11
-
12
- Here's an example configuration file you can use to define and use multiple LLMs:
13
-
14
- ```toml
15
- [llm]
16
- # IMPORTANT: add your API key here, and set the model to the one you want to evaluate
17
- model = "claude-3-5-sonnet-20241022"
18
- api_key = "sk-XXX"
19
-
20
- [llm.eval_gpt4_1106_preview_llm]
21
- model = "gpt-4-1106-preview"
22
- api_key = "XXX"
23
- temperature = 0.0
24
-
25
- [llm.eval_some_openai_compatible_model_llm]
26
- model = "openai/MODEL_NAME"
27
- base_url = "https://OPENAI_COMPATIBLE_URL/v1"
28
- api_key = "XXX"
29
- temperature = 0.0
30
- ```
31
-
32
-
33
- ## How to use OpenHands in the command line
34
-
35
- OpenHands can be run from the command line using the following format:
36
-
37
- ```bash
38
- poetry run python ./openhands/core/main.py \
39
- -i <max_iterations> \
40
- -t "<task_description>" \
41
- -c <agent_class> \
42
- -l <llm_config>
43
- ```
44
-
45
- For example:
46
-
47
- ```bash
48
- poetry run python ./openhands/core/main.py \
49
- -i 10 \
50
- -t "Write me a bash script that prints hello world." \
51
- -c CodeActAgent \
52
- -l llm
53
- ```
54
-
55
- This command runs OpenHands with:
56
- - A maximum of 10 iterations
57
- - The specified task description
58
- - Using the CodeActAgent
59
- - With the LLM configuration defined in the `llm` section of your `config.toml` file
60
-
61
- ## How does OpenHands work
62
-
63
- The main entry point for OpenHands is in `openhands/core/main.py`. Here's a simplified flow of how it works:
64
-
65
- 1. Parse command-line arguments and load the configuration
66
- 2. Create a runtime environment using `create_runtime()`
67
- 3. Initialize the specified agent
68
- 4. Run the controller using `run_controller()`, which:
69
- - Attaches the runtime to the agent
70
- - Executes the agent's task
71
- - Returns a final state when complete
72
-
73
- The `run_controller()` function is the core of OpenHands's execution. It manages the interaction between the agent, the runtime, and the task, handling things like user input simulation and event processing.
74
-
75
-
76
- ## Easiest way to get started: Exploring Existing Benchmarks
77
-
78
- We encourage you to review the various evaluation benchmarks available in the [`evaluation/benchmarks/` directory](https://github.com/All-Hands-AI/OpenHands/blob/main/evaluation/benchmarks) of our repository.
79
-
80
- To integrate your own benchmark, we suggest starting with the one that most closely resembles your needs. This approach can significantly streamline your integration process, allowing you to build upon existing structures and adapt them to your specific requirements.
81
-
82
- ## How to create an evaluation workflow
83
-
84
-
85
- To create an evaluation workflow for your benchmark, follow these steps:
86
-
87
- 1. Import relevant OpenHands utilities:
88
- ```python
89
- import openhands.agenthub
90
- from evaluation.utils.shared import (
91
- EvalMetadata,
92
- EvalOutput,
93
- make_metadata,
94
- prepare_dataset,
95
- reset_logger_for_multiprocessing,
96
- run_evaluation,
97
- )
98
- from openhands.controller.state.state import State
99
- from openhands.core.config import (
100
- AppConfig,
101
- SandboxConfig,
102
- get_llm_config_arg,
103
- parse_arguments,
104
- )
105
- from openhands.core.logger import openhands_logger as logger
106
- from openhands.core.main import create_runtime, run_controller
107
- from openhands.events.action import CmdRunAction
108
- from openhands.events.observation import CmdOutputObservation, ErrorObservation
109
- from openhands.runtime.runtime import Runtime
110
- ```
111
-
112
- 2. Create a configuration:
113
- ```python
114
- def get_config(instance: pd.Series, metadata: EvalMetadata) -> AppConfig:
115
- config = AppConfig(
116
- default_agent=metadata.agent_class,
117
- runtime='docker',
118
- max_iterations=metadata.max_iterations,
119
- sandbox=SandboxConfig(
120
- base_container_image='your_container_image',
121
- enable_auto_lint=True,
122
- timeout=300,
123
- ),
124
- )
125
- config.set_llm_config(metadata.llm_config)
126
- return config
127
- ```
128
-
129
- 3. Initialize the runtime and set up the evaluation environment:
130
- ```python
131
- def initialize_runtime(runtime: Runtime, instance: pd.Series):
132
- # Set up your evaluation environment here
133
- # For example, setting environment variables, preparing files, etc.
134
- pass
135
- ```
136
-
137
- 4. Create a function to process each instance:
138
- ```python
139
- from openhands.utils.async_utils import call_async_from_sync
140
- def process_instance(instance: pd.Series, metadata: EvalMetadata) -> EvalOutput:
141
- config = get_config(instance, metadata)
142
- runtime = create_runtime(config)
143
- call_async_from_sync(runtime.connect)
144
- initialize_runtime(runtime, instance)
145
-
146
- instruction = get_instruction(instance, metadata)
147
-
148
- state = run_controller(
149
- config=config,
150
- task_str=instruction,
151
- runtime=runtime,
152
- fake_user_response_fn=your_user_response_function,
153
- )
154
-
155
- # Evaluate the agent's actions
156
- evaluation_result = await evaluate_agent_actions(runtime, instance)
157
-
158
- return EvalOutput(
159
- instance_id=instance.instance_id,
160
- instruction=instruction,
161
- test_result=evaluation_result,
162
- metadata=metadata,
163
- history=compatibility_for_eval_history_pairs(state.history),
164
- metrics=state.metrics.get() if state.metrics else None,
165
- error=state.last_error if state and state.last_error else None,
166
- )
167
- ```
168
-
169
- 5. Run the evaluation:
170
- ```python
171
- metadata = make_metadata(llm_config, dataset_name, agent_class, max_iterations, eval_note, eval_output_dir)
172
- output_file = os.path.join(metadata.eval_output_dir, 'output.jsonl')
173
- instances = prepare_dataset(your_dataset, output_file, eval_n_limit)
174
-
175
- await run_evaluation(
176
- instances,
177
- metadata,
178
- output_file,
179
- num_workers,
180
- process_instance
181
- )
182
- ```
183
-
184
- This workflow sets up the configuration, initializes the runtime environment, processes each instance by running the agent and evaluating its actions, and then collects the results into an `EvalOutput` object. The `run_evaluation` function handles parallelization and progress tracking.
185
-
186
- Remember to customize the `get_instruction`, `your_user_response_function`, and `evaluate_agent_actions` functions according to your specific benchmark requirements.
187
-
188
- By following this structure, you can create a robust evaluation workflow for your benchmark within the OpenHands framework.
189
-
190
-
191
- ## Understanding the `user_response_fn`
192
-
193
- The `user_response_fn` is a crucial component in OpenHands's evaluation workflow. It simulates user interaction with the agent, allowing for automated responses during the evaluation process. This function is particularly useful when you want to provide consistent, predefined responses to the agent's queries or actions.
194
-
195
-
196
- ### Workflow and Interaction
197
-
198
- The correct workflow for handling actions and the `user_response_fn` is as follows:
199
-
200
- 1. Agent receives a task and starts processing
201
- 2. Agent emits an Action
202
- 3. If the Action is executable (e.g., CmdRunAction, IPythonRunCellAction):
203
- - The Runtime processes the Action
204
- - Runtime returns an Observation
205
- 4. If the Action is not executable (typically a MessageAction):
206
- - The `user_response_fn` is called
207
- - It returns a simulated user response
208
- 5. The agent receives either the Observation or the simulated response
209
- 6. Steps 2-5 repeat until the task is completed or max iterations are reached
210
-
211
- Here's a more accurate visual representation:
212
-
213
- ```
214
- [Agent]
215
- |
216
- v
217
- [Emit Action]
218
- |
219
- v
220
- [Is Action Executable?]
221
- / \
222
- Yes No
223
- | |
224
- v v
225
- [Runtime] [user_response_fn]
226
- | |
227
- v v
228
- [Return Observation] [Simulated Response]
229
- \ /
230
- \ /
231
- v v
232
- [Agent receives feedback]
233
- |
234
- v
235
- [Continue or Complete Task]
236
- ```
237
-
238
- In this workflow:
239
-
240
- - Executable actions (like running commands or executing code) are handled directly by the Runtime
241
- - Non-executable actions (typically when the agent wants to communicate or ask for clarification) are handled by the `user_response_fn`
242
- - The agent then processes the feedback, whether it's an Observation from the Runtime or a simulated response from the `user_response_fn`
243
-
244
- This approach allows for automated handling of both concrete actions and simulated user interactions, making it suitable for evaluation scenarios where you want to test the agent's ability to complete tasks with minimal human intervention.
245
-
246
- ### Example Implementation
247
-
248
- Here's an example of a `user_response_fn` used in the SWE-Bench evaluation:
249
-
250
- ```python
251
- def codeact_user_response(state: State | None) -> str:
252
- msg = (
253
- 'Please continue working on the task on whatever approach you think is suitable.\n'
254
- 'If you think you have solved the task, please first send your answer to user through message and then <execute_bash> exit </execute_bash>.\n'
255
- 'IMPORTANT: YOU SHOULD NEVER ASK FOR HUMAN HELP.\n'
256
- )
257
-
258
- if state and state.history:
259
- # check if the agent has tried to talk to the user 3 times, if so, let the agent know it can give up
260
- user_msgs = [
261
- event
262
- for event in state.history
263
- if isinstance(event, MessageAction) and event.source == 'user'
264
- ]
265
- if len(user_msgs) >= 2:
266
- # let the agent know that it can give up when it has tried 3 times
267
- return (
268
- msg
269
- + 'If you want to give up, run: <execute_bash> exit </execute_bash>.\n'
270
- )
271
- return msg
272
- ```
273
-
274
- This function does the following:
275
-
276
- 1. Provides a standard message encouraging the agent to continue working
277
- 2. Checks how many times the agent has attempted to communicate with the user
278
- 3. If the agent has made multiple attempts, it provides an option to give up
279
-
280
- By using this function, you can ensure consistent behavior across multiple evaluation runs and prevent the agent from getting stuck waiting for human input.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/github-action.mdx DELETED
@@ -1,53 +0,0 @@
1
- ---
2
- title: OpenHands GitHub Action
3
- description: This guide explains how to use the OpenHands GitHub Action in your own projects.
4
- ---
5
-
6
- ## Using the Action in the OpenHands Repository
7
-
8
- To use the OpenHands GitHub Action in a repository, you can:
9
-
10
- 1. Create an issue in the repository.
11
- 2. Add the `fix-me` label to the issue or leave a comment on the issue starting with `@openhands-agent`.
12
-
13
- The action will automatically trigger and attempt to resolve the issue.
14
-
15
- ## Installing the Action in a New Repository
16
-
17
- To install the OpenHands GitHub Action in your own repository, follow
18
- the [README for the OpenHands Resolver](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/resolver/README.md).
19
-
20
- ## Usage Tips
21
-
22
- ### Iterative resolution
23
-
24
- 1. Create an issue in the repository.
25
- 2. Add the `fix-me` label to the issue, or leave a comment starting with `@openhands-agent`.
26
- 3. Review the attempt to resolve the issue by checking the pull request.
27
- 4. Follow up with feedback through general comments, review comments, or inline thread comments.
28
- 5. Add the `fix-me` label to the pull request, or address a specific comment by starting with `@openhands-agent`.
29
-
30
- ### Label versus Macro
31
-
32
- - Label (`fix-me`): Requests OpenHands to address the **entire** issue or pull request.
33
- - Macro (`@openhands-agent`): Requests OpenHands to consider only the issue/pull request description and **the specific comment**.
34
-
35
- ## Advanced Settings
36
-
37
- ### Add custom repository settings
38
-
39
- You can provide custom directions for OpenHands by following the [README for the resolver](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/resolver/README.md#providing-custom-instructions).
40
-
41
- ### Custom configurations
42
-
43
- GitHub resolver will automatically check for valid [repository secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions?tool=webui#creating-secrets-for-a-repository) or [repository variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#creating-configuration-variables-for-a-repository) to customize its behavior.
44
- The customization options you can set are:
45
-
46
- | **Attribute name** | **Type** | **Purpose** | **Example** |
47
- | -------------------------------- | -------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
48
- | `LLM_MODEL` | Variable | Set the LLM to use with OpenHands | `LLM_MODEL="anthropic/claude-3-5-sonnet-20241022"` |
49
- | `OPENHANDS_MAX_ITER` | Variable | Set max limit for agent iterations | `OPENHANDS_MAX_ITER=10` |
50
- | `OPENHANDS_MACRO` | Variable | Customize default macro for invoking the resolver | `OPENHANDS_MACRO=@resolveit` |
51
- | `OPENHANDS_BASE_CONTAINER_IMAGE` | Variable | Custom Sandbox ([learn more](https://docs.all-hands.dev/modules/usage/how-to/custom-sandbox-guide)) | `OPENHANDS_BASE_CONTAINER_IMAGE="custom_image"` |
52
- | `TARGET_BRANCH` | Variable | Merge to branch other than `main` | `TARGET_BRANCH="dev"` |
53
- | `TARGET_RUNNER` | Variable | Target runner to execute the agent workflow (default ubuntu-latest) | `TARGET_RUNNER="custom-runner"` |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/gui-mode.mdx DELETED
@@ -1,143 +0,0 @@
1
- ---
2
- title: GUI Mode
3
- description: OpenHands provides a Graphical User Interface (GUI) mode for interacting with the AI assistant.
4
- ---
5
-
6
- ## Installation and Setup
7
-
8
- 1. Follow the installation instructions to install OpenHands.
9
- 2. After running the command, access OpenHands at [http://localhost:3000](http://localhost:3000).
10
-
11
- ## Interacting with the GUI
12
-
13
- ### Initial Setup
14
-
15
- 1. Upon first launch, you'll see a settings popup.
16
- 2. Select an `LLM Provider` and `LLM Model` from the dropdown menus. If the required model does not exist in the list,
17
- select `see advanced settings`. Then toggle `Advanced` options and enter it with the correct prefix in the
18
- `Custom Model` text box.
19
- 3. Enter the corresponding `API Key` for your chosen provider.
20
- 4. Click `Save Changes` to apply the settings.
21
-
22
- ### Version Control Tokens
23
-
24
- OpenHands supports multiple version control providers. You can configure tokens for multiple providers simultaneously.
25
-
26
- #### GitHub Token Setup
27
-
28
- OpenHands automatically exports a `GITHUB_TOKEN` to the shell environment if provided:
29
-
30
- <details>
31
- <summary>Setting Up a GitHub Token</summary>
32
-
33
- 1. **Generate a Personal Access Token (PAT)**:
34
- - On GitHub, go to Settings > Developer Settings > Personal Access Tokens > Tokens (classic).
35
- - **New token (classic)**
36
- - Required scopes:
37
- - `repo` (Full control of private repositories)
38
- - **Fine-Grained Tokens**
39
- - All Repositories (You can select specific repositories, but this will impact what returns in repo search)
40
- - Minimal Permissions ( Select `Meta Data = Read-only` read for search, `Pull Requests = Read and Write` and `Content = Read and Write` for branch creation)
41
- 2. **Enter Token in OpenHands**:
42
- - Click the Settings button (gear icon).
43
- - Navigate to the `Git` tab.
44
- - Paste your token in the `GitHub Token` field.
45
- - Click `Save Changes` to apply the changes.
46
- </details>
47
-
48
- <details>
49
- <summary>Organizational Token Policies</summary>
50
-
51
- If you're working with organizational repositories, additional setup may be required:
52
-
53
- 1. **Check Organization Requirements**:
54
- - Organization admins may enforce specific token policies.
55
- - Some organizations require tokens to be created with SSO enabled.
56
- - Review your organization's [token policy settings](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization).
57
- 2. **Verify Organization Access**:
58
- - Go to your token settings on GitHub.
59
- - Look for the organization under `Organization access`.
60
- - If required, click `Enable SSO` next to your organization.
61
- - Complete the SSO authorization process.
62
- </details>
63
-
64
- <details>
65
- <summary>Troubleshooting</summary>
66
-
67
- Common issues and solutions:
68
-
69
- - **Token Not Recognized**:
70
- - Ensure the token is properly saved in settings.
71
- - Check that the token hasn't expired.
72
- - Verify the token has the required scopes.
73
- - Try regenerating the token.
74
-
75
- - **Organization Access Denied**:
76
- - Check if SSO is required but not enabled.
77
- - Verify organization membership.
78
- - Contact organization admin if token policies are blocking access.
79
-
80
- - **Verifying Token Works**:
81
- - The app will show a green checkmark if the token is valid.
82
- - Try accessing a repository to confirm permissions.
83
- - Check the browser console for any error messages.
84
- </details>
85
-
86
- #### GitLab Token Setup
87
-
88
- OpenHands automatically exports a `GITLAB_TOKEN` to the shell environment if provided:
89
-
90
- <details>
91
- <summary>Setting Up a GitLab Token</summary>
92
-
93
- 1. **Generate a Personal Access Token (PAT)**:
94
- - On GitLab, go to User Settings > Access Tokens.
95
- - Create a new token with the following scopes:
96
- - `api` (API access)
97
- - `read_user` (Read user information)
98
- - `read_repository` (Read repository)
99
- - `write_repository` (Write repository)
100
- - Set an expiration date or leave it blank for a non-expiring token.
101
- 2. **Enter Token in OpenHands**:
102
- - Click the Settings button (gear icon).
103
- - Navigate to the `Git` tab.
104
- - Paste your token in the `GitLab Token` field.
105
- - Click `Save Changes` to apply the changes.
106
- </details>
107
-
108
- <details>
109
- <summary>Troubleshooting</summary>
110
-
111
- Common issues and solutions:
112
-
113
- - **Token Not Recognized**:
114
- - Ensure the token is properly saved in settings.
115
- - Check that the token hasn't expired.
116
- - Verify the token has the required scopes.
117
-
118
- - **Access Denied**:
119
- - Verify project access permissions.
120
- - Check if the token has the necessary scopes.
121
- - For group/organization repositories, ensure you have proper access.
122
- </details>
123
-
124
- ### Advanced Settings
125
-
126
- 1. Inside the Settings page, under the `LLM` tab, toggle `Advanced` options to access additional settings.
127
- 2. Use the `Custom Model` text box to manually enter a model if it's not in the list.
128
- 3. Specify a `Base URL` if required by your LLM provider.
129
-
130
- ### Interacting with the AI
131
-
132
- 1. Type your prompt in the input box.
133
- 2. Click the send button or press Enter to submit your message.
134
- 3. The AI will process your input and provide a response in the chat window.
135
- 4. You can continue the conversation by asking follow-up questions or providing additional information.
136
-
137
- ## Tips for Effective Use
138
-
139
- - Be specific in your requests to get the most accurate and helpful responses, as described in the [prompting best practices](../prompting/prompting-best-practices).
140
- - Use one of the recommended models, as described in the [LLMs section](usage/llms/llms.md).
141
-
142
- Remember, the GUI mode of OpenHands is designed to make your interaction with the AI assistant as smooth and intuitive
143
- as possible. Don't hesitate to explore its features to maximize your productivity.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/headless-mode.mdx DELETED
@@ -1,57 +0,0 @@
1
- ---
2
- title: Headless Mode
3
- description: You can run OpenHands with a single command, without starting the web application. This makes it easy to write scripts and automate tasks with OpenHands.
4
- ---
5
-
6
- This is different from [CLI Mode](./cli-mode), which is interactive, and better for active development.
7
-
8
- ## With Python
9
-
10
- To run OpenHands in headless mode with Python:
11
- 1. Ensure you have followed the [Development setup instructions](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
12
- 2. Run the following command:
13
- ```bash
14
- poetry run python -m openhands.core.main -t "write a bash script that prints hi"
15
- ```
16
-
17
- You'll need to be sure to set your model, API key, and other settings via environment variables
18
- [or the `config.toml` file](https://github.com/All-Hands-AI/OpenHands/blob/main/config.template.toml).
19
-
20
- ## With Docker
21
-
22
- To run OpenHands in Headless mode with Docker:
23
-
24
- 1. Set the following environment variables in your terminal:
25
- - `SANDBOX_VOLUMES` to specify the directory you want OpenHands to access ([See using SANDBOX_VOLUMES for more info](../runtimes/docker#using-sandbox_volumes))
26
- - `LLM_MODEL` - the LLM model to use (e.g. `export LLM_MODEL="anthropic/claude-sonnet-4-20250514"`)
27
- - `LLM_API_KEY` - your API key (e.g. `export LLM_API_KEY="sk_test_12345"`)
28
-
29
- 2. Run the following Docker command:
30
-
31
- ```bash
32
- docker run -it \
33
- --pull=always \
34
- -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.41-nikolaik \
35
- -e SANDBOX_USER_ID=$(id -u) \
36
- -e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
37
- -e LLM_API_KEY=$LLM_API_KEY \
38
- -e LLM_MODEL=$LLM_MODEL \
39
- -e LOG_ALL_EVENTS=true \
40
- -v /var/run/docker.sock:/var/run/docker.sock \
41
- -v ~/.openhands-state:/.openhands-state \
42
- --add-host host.docker.internal:host-gateway \
43
- --name openhands-app-$(date +%Y%m%d%H%M%S) \
44
- docker.all-hands.dev/all-hands-ai/openhands:0.41 \
45
- python -m openhands.core.main -t "write a bash script that prints hi"
46
- ```
47
-
48
- The `-e SANDBOX_USER_ID=$(id -u)` is passed to the Docker command to ensure the sandbox user matches the host user’s
49
- permissions. This prevents the agent from creating root-owned files in the mounted workspace.
50
-
51
- ## Advanced Headless Configurations
52
-
53
- To view all available configuration options for headless mode, run the Python command with the `--help` flag.
54
-
55
- ### Additional Logs
56
-
57
- For the headless mode to log all the agent actions, in the terminal run: `export LOG_ALL_EVENTS=true`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/how-to/websocket-connection.mdx DELETED
@@ -1,179 +0,0 @@
1
- ---
2
- title: WebSocket Connection
3
- ---
4
-
5
- This guide explains how to connect to the OpenHands WebSocket API to receive real-time events and send actions to the agent.
6
-
7
- ## Overview
8
-
9
- OpenHands uses [Socket.IO](https://socket.io/) for WebSocket communication between the client and server. The WebSocket connection allows you to:
10
-
11
- 1. Receive real-time events from the agent
12
- 2. Send user actions to the agent
13
- 3. Maintain a persistent connection for ongoing conversations
14
-
15
- ## Connecting to the WebSocket
16
-
17
- ### Connection Parameters
18
-
19
- When connecting to the WebSocket, you need to provide the following query parameters:
20
-
21
- - `conversation_id`: The ID of the conversation you want to join
22
- - `latest_event_id`: The ID of the latest event you've received (use `-1` for a new connection)
23
- - `providers_set`: (Optional) A comma-separated list of provider types
24
-
25
- ### Connection Example
26
-
27
- Here's a basic example of connecting to the WebSocket using JavaScript:
28
-
29
- ```javascript
30
- import { io } from "socket.io-client";
31
-
32
- const socket = io("http://localhost:3000", {
33
- transports: ["websocket"],
34
- query: {
35
- conversation_id: "your-conversation-id",
36
- latest_event_id: -1,
37
- providers_set: "github,gitlab" // Optional
38
- }
39
- });
40
-
41
- socket.on("connect", () => {
42
- console.log("Connected to OpenHands WebSocket");
43
- });
44
-
45
- socket.on("oh_event", (event) => {
46
- console.log("Received event:", event);
47
- });
48
-
49
- socket.on("connect_error", (error) => {
50
- console.error("Connection error:", error);
51
- });
52
-
53
- socket.on("disconnect", (reason) => {
54
- console.log("Disconnected:", reason);
55
- });
56
- ```
57
-
58
- ## Sending Actions to the Agent
59
-
60
- To send an action to the agent, use the `oh_user_action` event:
61
-
62
- ```javascript
63
- // Send a user message to the agent
64
- socket.emit("oh_user_action", {
65
- type: "message",
66
- source: "user",
67
- message: "Hello, can you help me with my project?"
68
- });
69
- ```
70
-
71
- ## Receiving Events from the Agent
72
-
73
- The server emits events using the `oh_event` event type. Here are some common event types you might receive:
74
-
75
- - User messages (`source: "user", type: "message"`)
76
- - Agent messages (`source: "agent", type: "message"`)
77
- - File edits (`action: "edit"`)
78
- - File writes (`action: "write"`)
79
- - Command executions (`action: "run"`)
80
-
81
- Example event handler:
82
-
83
- ```javascript
84
- socket.on("oh_event", (event) => {
85
- if (event.source === "agent" && event.type === "message") {
86
- console.log("Agent says:", event.message);
87
- } else if (event.action === "run") {
88
- console.log("Command executed:", event.args.command);
89
- console.log("Result:", event.result);
90
- }
91
- });
92
- ```
93
-
94
- ## Using Websocat for Testing
95
-
96
- [Websocat](https://github.com/vi/websocat) is a command-line tool for interacting with WebSockets. It's useful for testing your WebSocket connection without writing a full client application.
97
-
98
- ### Installation
99
-
100
- ```bash
101
- # On macOS
102
- brew install websocat
103
-
104
- # On Linux
105
- curl -L https://github.com/vi/websocat/releases/download/v1.11.0/websocat.x86_64-unknown-linux-musl > websocat
106
- chmod +x websocat
107
- sudo mv websocat /usr/local/bin/
108
- ```
109
-
110
- ### Connecting to the WebSocket
111
-
112
- ```bash
113
- # Connect to the WebSocket and print all received messages
114
- echo "40{}" | \
115
- websocat "ws://localhost:3000/socket.io/?EIO=4&transport=websocket&conversation_id=your-conversation-id&latest_event_id=-1"
116
- ```
117
-
118
- ### Sending a Message
119
-
120
- ```bash
121
- # Send a message to the agent
122
- echo '42["oh_user_action",{"type":"message","source":"user","message":"Hello, agent!"}]' | \
123
- websocat "ws://localhost:3000/socket.io/?EIO=4&transport=websocket&conversation_id=your-conversation-id&latest_event_id=-1"
124
- ```
125
-
126
- ### Complete Example with Websocat
127
-
128
- Here's a complete example of connecting to the WebSocket, sending a message, and receiving events:
129
-
130
- ```bash
131
- # Start a persistent connection
132
- websocat -v "ws://localhost:3000/socket.io/?EIO=4&transport=websocket&conversation_id=your-conversation-id&latest_event_id=-1"
133
-
134
- # In another terminal, send a message
135
- echo '42["oh_user_action",{"type":"message","source":"user","message":"Can you help me with my project?"}]' | \
136
- websocat "ws://localhost:3000/socket.io/?EIO=4&transport=websocket&conversation_id=your-conversation-id&latest_event_id=-1"
137
- ```
138
-
139
- ## Event Structure
140
-
141
- Events sent and received through the WebSocket follow a specific structure:
142
-
143
- ```typescript
144
- interface OpenHandsEvent {
145
- id: string; // Unique event ID
146
- source: string; // "user" or "agent"
147
- timestamp: string; // ISO timestamp
148
- message?: string; // For message events
149
- type?: string; // Event type (e.g., "message")
150
- action?: string; // Action type (e.g., "run", "edit", "write")
151
- args?: any; // Action arguments
152
- result?: any; // Action result
153
- }
154
- ```
155
-
156
- ## Best Practices
157
-
158
- 1. **Handle Reconnection**: Implement reconnection logic in your client to handle network interruptions.
159
- 2. **Track Event IDs**: Store the latest event ID you've received and use it when reconnecting to avoid duplicate events.
160
- 3. **Error Handling**: Implement proper error handling for connection errors and failed actions.
161
- 4. **Rate Limiting**: Avoid sending too many actions in a short period to prevent overloading the server.
162
-
163
- ## Troubleshooting
164
-
165
- ### Connection Issues
166
-
167
- - Verify that the OpenHands server is running and accessible
168
- - Check that you're providing the correct conversation ID
169
- - Ensure your WebSocket URL is correctly formatted
170
-
171
- ### Authentication Issues
172
-
173
- - Make sure you have the necessary authentication cookies if required
174
- - Verify that you have permission to access the specified conversation
175
-
176
- ### Event Handling Issues
177
-
178
- - Check that you're correctly parsing the event data
179
- - Verify that your event handlers are properly registered
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/installation.mdx DELETED
@@ -1,19 +0,0 @@
1
- ---
2
- title: Quick Start
3
- description: Running OpenHands Cloud or running on your local system.
4
- icon: rocket
5
- ---
6
-
7
- ## OpenHands Cloud
8
-
9
- The easiest way to get started with OpenHands is on OpenHands Cloud, which comes with $50 in free credits for new users.
10
-
11
- To get started with OpenHands Cloud, visit [app.all-hands.dev](https://app.all-hands.dev).
12
-
13
- For more information see [getting started with OpenHands Cloud.](/usage/cloud/openhands-cloud)
14
-
15
- ## Running OpenHands Locally
16
-
17
- Run OpenHands on your local system and bring your own LLM and API key.
18
-
19
- For more information see [running OpenHands locally.](/usage/local-setup)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/key-features.mdx DELETED
@@ -1,32 +0,0 @@
1
- ---
2
- title: Key Features
3
- icon: bars
4
- ---
5
-
6
- ![overview](/static/img/oh-features.png)
7
-
8
- ### Chat Panel
9
- - Displays the conversation between the user and OpenHands.
10
- - OpenHands explains its actions in this panel.
11
-
12
- ### Changes
13
- - Shows the file changes performed by OpenHands.
14
-
15
- ### VS Code
16
- - Embedded VS Code for browsing and modifying files.
17
- - Can also be used to upload and download files.
18
-
19
- ### Terminal
20
- - A space for OpenHands and users to run terminal commands.
21
-
22
- ### Jupyter
23
- - Shows all Python commands that were executed by OpenHands.
24
- - Particularly handy when using OpenHands to perform data visualization tasks.
25
-
26
- ### App
27
- - Displays the web server when OpenHands runs an application.
28
- - Users can interact with the running application.
29
-
30
- ### Browser
31
- - Used by OpenHands to browse websites.
32
- - The browser is non-interactive.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/llms/azure-llms.mdx DELETED
@@ -1,42 +0,0 @@
1
- ---
2
- title: Azure
3
- description: OpenHands uses LiteLLM to make calls to Azure's chat models. You can find their documentation on using Azure as a provider [here](https://docs.litellm.ai/docs/providers/azure).
4
- ---
5
-
6
- ## Azure OpenAI Configuration
7
-
8
- When running OpenHands, you'll need to set the following environment variable using `-e` in the
9
- [docker run command](../installation#running-openhands):
10
-
11
- ```
12
- LLM_API_VERSION="<api-version>" # e.g. "2023-05-15"
13
- ```
14
-
15
- Example:
16
- ```bash
17
- docker run -it --pull=always \
18
- -e LLM_API_VERSION="2023-05-15"
19
- ...
20
- ```
21
-
22
- Then in the OpenHands UI Settings under the `LLM` tab:
23
-
24
- <Note>
25
- You will need your ChatGPT deployment name which can be found on the deployments page in Azure. This is referenced as
26
- &lt;deployment-name&gt; below.
27
- </Note>
28
-
29
- 1. Enable `Advanced` options.
30
- 2. Set the following:
31
- - `Custom Model` to azure/&lt;deployment-name&gt;
32
- - `Base URL` to your Azure API Base URL (e.g. `https://example-endpoint.openai.azure.com`)
33
- - `API Key` to your Azure API key
34
-
35
- ### Azure OpenAI Configuration
36
-
37
- When running OpenHands, set the following environment variable using `-e` in the
38
- [docker run command](../installation#running-openhands):
39
-
40
- ```
41
- LLM_API_VERSION="<api-version>" # e.g. "2024-02-15-preview"
42
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/llms/custom-llm-configs.mdx DELETED
@@ -1,137 +0,0 @@
1
- ---
2
- title: Custom LLM Configurations
3
- description: OpenHands supports defining multiple named LLM configurations in your `config.toml` file. This feature allows you to use different LLM configurations for different purposes, such as using a cheaper model for tasks that don't require high-quality responses, or using different models with different parameters for specific agents.
4
- ---
5
-
6
- ## How It Works
7
-
8
- Named LLM configurations are defined in the `config.toml` file using sections that start with `llm.`. For example:
9
-
10
- ```toml
11
- # Default LLM configuration
12
- [llm]
13
- model = "gpt-4"
14
- api_key = "your-api-key"
15
- temperature = 0.0
16
-
17
- # Custom LLM configuration for a cheaper model
18
- [llm.gpt3]
19
- model = "gpt-3.5-turbo"
20
- api_key = "your-api-key"
21
- temperature = 0.2
22
-
23
- # Another custom configuration with different parameters
24
- [llm.high-creativity]
25
- model = "gpt-4"
26
- api_key = "your-api-key"
27
- temperature = 0.8
28
- top_p = 0.9
29
- ```
30
-
31
- Each named configuration inherits all settings from the default `[llm]` section and can override any of those settings. You can define as many custom configurations as needed.
32
-
33
- ## Using Custom Configurations
34
-
35
- ### With Agents
36
-
37
- You can specify which LLM configuration an agent should use by setting the `llm_config` parameter in the agent's configuration section:
38
-
39
- ```toml
40
- [agent.RepoExplorerAgent]
41
- # Use the cheaper GPT-3 configuration for this agent
42
- llm_config = 'gpt3'
43
-
44
- [agent.CodeWriterAgent]
45
- # Use the high creativity configuration for this agent
46
- llm_config = 'high-creativity'
47
- ```
48
-
49
- ### Configuration Options
50
-
51
- Each named LLM configuration supports all the same options as the default LLM configuration. These include:
52
-
53
- - Model selection (`model`)
54
- - API configuration (`api_key`, `base_url`, etc.)
55
- - Model parameters (`temperature`, `top_p`, etc.)
56
- - Retry settings (`num_retries`, `retry_multiplier`, etc.)
57
- - Token limits (`max_input_tokens`, `max_output_tokens`)
58
- - And all other LLM configuration options
59
-
60
- For a complete list of available options, see the LLM Configuration section in the [Configuration Options](../configuration-options) documentation.
61
-
62
- ## Use Cases
63
-
64
- Custom LLM configurations are particularly useful in several scenarios:
65
-
66
- - **Cost Optimization**: Use cheaper models for tasks that don't require high-quality responses, like repository exploration or simple file operations.
67
- - **Task-Specific Tuning**: Configure different temperature and top_p values for tasks that require different levels of creativity or determinism.
68
- - **Different Providers**: Use different LLM providers or API endpoints for different tasks.
69
- - **Testing and Development**: Easily switch between different model configurations during development and testing.
70
-
71
- ## Example: Cost Optimization
72
-
73
- A practical example of using custom LLM configurations to optimize costs:
74
-
75
- ```toml
76
- # Default configuration using GPT-4 for high-quality responses
77
- [llm]
78
- model = "gpt-4"
79
- api_key = "your-api-key"
80
- temperature = 0.0
81
-
82
- # Cheaper configuration for repository exploration
83
- [llm.repo-explorer]
84
- model = "gpt-3.5-turbo"
85
- temperature = 0.2
86
-
87
- # Configuration for code generation
88
- [llm.code-gen]
89
- model = "gpt-4"
90
- temperature = 0.0
91
- max_output_tokens = 2000
92
-
93
- [agent.RepoExplorerAgent]
94
- llm_config = 'repo-explorer'
95
-
96
- [agent.CodeWriterAgent]
97
- llm_config = 'code-gen'
98
- ```
99
-
100
- In this example:
101
- - Repository exploration uses a cheaper model since it mainly involves understanding and navigating code
102
- - Code generation uses GPT-4 with a higher token limit for generating larger code blocks
103
- - The default configuration remains available for other tasks
104
-
105
- # Custom Configurations with Reserved Names
106
-
107
- OpenHands can use custom LLM configurations named with reserved names, for specific use cases. If you specify the model and other settings under the reserved names, then OpenHands will load and them for a specific purpose. As of now, one such configuration is implemented: draft editor.
108
-
109
- ## Draft Editor Configuration
110
-
111
- The `draft_editor` configuration is a group of settings you can provide, to specify the model to use for preliminary drafting of code edits, for any tasks that involve editing and refining code. You need to provide it under the section `[llm.draft_editor]`.
112
-
113
- For example, you can define in `config.toml` a draft editor like this:
114
-
115
- ```toml
116
- [llm.draft_editor]
117
- model = "gpt-4"
118
- temperature = 0.2
119
- top_p = 0.95
120
- presence_penalty = 0.0
121
- frequency_penalty = 0.0
122
- ```
123
-
124
- This configuration:
125
- - Uses GPT-4 for high-quality edits and suggestions
126
- - Sets a low temperature (0.2) to maintain consistency while allowing some flexibility
127
- - Uses a high top_p value (0.95) to consider a wide range of token options
128
- - Disables presence and frequency penalties to maintain focus on the specific edits needed
129
-
130
- Use this configuration when you want to let an LLM draft edits before making them. In general, it may be useful to:
131
- - Review and suggest code improvements
132
- - Refine existing content while maintaining its core meaning
133
- - Make precise, focused changes to code or text
134
-
135
- <Note>
136
- Custom LLM configurations are only available when using OpenHands in development mode, via `main.py` or `cli.py`. When running via `docker run`, please use the standard configuration options.
137
- </Note>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/llms/google-llms.mdx DELETED
@@ -1,30 +0,0 @@
1
- ---
2
- title: Google Gemini/Vertex
3
- description: OpenHands uses LiteLLM to make calls to Google's chat models. You can find their documentation on using Google as a provider -> [Gemini - Google AI Studio](https://docs.litellm.ai/docs/providers/gemini), [VertexAI - Google Cloud Platform](https://docs.litellm.ai/docs/providers/vertex)
4
- ---
5
-
6
- ## Gemini - Google AI Studio Configs
7
-
8
- When running OpenHands, you'll need to set the following in the OpenHands UI through the Settings under the `LLM` tab:
9
- - `LLM Provider` to `Gemini`
10
- - `LLM Model` to the model you will be using.
11
- If the model is not in the list, enable `Advanced` options, and enter it in `Custom Model`
12
- (e.g. gemini/&lt;model-name&gt; like `gemini/gemini-2.0-flash`).
13
- - `API Key` to your Gemini API key
14
-
15
- ## VertexAI - Google Cloud Platform Configs
16
-
17
- To use Vertex AI through Google Cloud Platform when running OpenHands, you'll need to set the following environment
18
- variables using `-e` in the [docker run command](../installation#running-openhands):
19
-
20
- ```
21
- GOOGLE_APPLICATION_CREDENTIALS="<json-dump-of-gcp-service-account-json>"
22
- VERTEXAI_PROJECT="<your-gcp-project-id>"
23
- VERTEXAI_LOCATION="<your-gcp-location>"
24
- ```
25
-
26
- Then set the following in the OpenHands UI through the Settings under the `LLM` tab:
27
- - `LLM Provider` to `VertexAI`
28
- - `LLM Model` to the model you will be using.
29
- If the model is not in the list, enable `Advanced` options, and enter it in `Custom Model`
30
- (e.g. vertex_ai/&lt;model-name&gt;).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/usage/llms/groq.mdx DELETED
@@ -1,23 +0,0 @@
1
- ---
2
- title: Groq
3
- description: OpenHands uses LiteLLM to make calls to chat models on Groq. You can find their documentation on using Groq as a provider [here](https://docs.litellm.ai/docs/providers/groq).
4
- ---
5
-
6
- ## Configuration
7
-
8
- When running OpenHands, you'll need to set the following in the OpenHands UI through the Settings under the `LLM` tab:
9
- - `LLM Provider` to `Groq`
10
- - `LLM Model` to the model you will be using. [Visit here to see the list of
11
- models that Groq hosts](https://console.groq.com/docs/models). If the model is not in the list,
12
- enable `Advanced` options, and enter it in `Custom Model` (e.g. groq/&lt;model-name&gt; like `groq/llama3-70b-8192`).
13
- - `API key` to your Groq API key. To find or create your Groq API Key, [see here](https://console.groq.com/keys).
14
-
15
- ## Using Groq as an OpenAI-Compatible Endpoint
16
-
17
- The Groq endpoint for chat completion is [mostly OpenAI-compatible](https://console.groq.com/docs/openai). Therefore, you can access Groq models as you
18
- would access any OpenAI-compatible endpoint. In the OpenHands UI through the Settings under the `LLM` tab:
19
- 1. Enable `Advanced` options
20
- 2. Set the following:
21
- - `Custom Model` to the prefix `openai/` + the model you will be using (e.g. `openai/llama3-70b-8192`)
22
- - `Base URL` to `https://api.groq.com/openai/v1`
23
- - `API Key` to your Groq API key