@openhands/agent-canvas 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/package.json +207 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2025 OpenHands contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# agent-canvas
|
|
2
|
+
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> This project is in sandbox phase. It may be vibecoded, untested, or out of date. OpenHands takes no responsibility for the code or its support. [Learn more](https://github.com/OpenHands/incubator-program).
|
|
5
|
+
|
|
6
|
+
Agent Canvas is a web frontend for managing agents. You can:
|
|
7
|
+
|
|
8
|
+
- ⌨️ prompt them manually
|
|
9
|
+
- 🕐 run them on a schedule
|
|
10
|
+
- ⚡ trigger them automatically—e.g. from Slack or GitHub.
|
|
11
|
+
|
|
12
|
+
Agents can run anywhere:
|
|
13
|
+
|
|
14
|
+
- 🧑💻 on your laptop
|
|
15
|
+
- 🖥️ on a remote virtual machine
|
|
16
|
+
- ☁️ in our hosted cloud
|
|
17
|
+
- 🏢 or inside your company’s infrastructure
|
|
18
|
+
|
|
19
|
+
You can work with any agent (e.g. Claude Code, Codex) or connect directly to an LLM (e.g. Anthropic, OpenAI, Gemini, Mistral, Minimax, Kimi).
|
|
20
|
+
|
|
21
|
+
If you have questions or feedback, please open a GitHub issue or join the [#proj-agent-canvas channel in Slack](https://openhands.dev/joinslack)
|
|
22
|
+
|
|
23
|
+
<img width="1509" height="826" alt="Screenshot 2026-05-11 at 10 13 19 AM" src="https://github.com/user-attachments/assets/71ef41ae-8f6d-4fbf-990f-d672175d93d1" />
|
|
24
|
+
|
|
25
|
+
## Quickstart
|
|
26
|
+
|
|
27
|
+
### With Docker (recommended)
|
|
28
|
+
|
|
29
|
+
**Prerequisites**:
|
|
30
|
+
|
|
31
|
+
- Node.js 22.12.x or later
|
|
32
|
+
- `npm`
|
|
33
|
+
- Docker
|
|
34
|
+
|
|
35
|
+
Set `$PROJECT_PATH` to the directory on your machine where your projects live (e.g. `/path/to/your/projects`). The agent server will mount this directory so the agent can read and edit your code.
|
|
36
|
+
|
|
37
|
+
By default the container is kept isolated from your host home — only `~/.openhands`, `~/.claude`, `~/.codex`, and `~/.ssh` are mounted individually (and only if they exist). If you want the **Add Workspace** dialog to browse your real host filesystem, set `OH_MOUNT_HOST_HOME=1` before `npm run dev:docker` to bind-mount your entire host home onto `/home/openhands` in the container. The Add Workspace modal also shows this hint inline when it detects the mount is off.
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
export PROJECT_PATH=/path/to/your/projects
|
|
41
|
+
git clone https://github.com/OpenHands/agent-canvas.git
|
|
42
|
+
cd agent-canvas
|
|
43
|
+
npm install
|
|
44
|
+
npm run dev:docker
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Access the UI at [http://localhost:8000](http://localhost:8000)
|
|
48
|
+
|
|
49
|
+
### Without Docker
|
|
50
|
+
|
|
51
|
+
> [!WARNING]
|
|
52
|
+
> This runs the agent-server directly on the machine you're installing on--the agent will have full access to your filesystem!
|
|
53
|
+
|
|
54
|
+
Running without docker is great if you're running Agent Canvas on a VM. See [SELF_HOSTING.md](SELF_HOSTING.md) for details,
|
|
55
|
+
especially with respect to security hardening. Notably, you can run the backend on _multiple different VMs_ and switch between
|
|
56
|
+
them from the same Agent Canvas frontend!
|
|
57
|
+
|
|
58
|
+
**Prerequisites**:
|
|
59
|
+
|
|
60
|
+
- Node.js 22.12.x or later
|
|
61
|
+
- `npm`
|
|
62
|
+
- `uv` (for running the agent server via `uvx`)
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
git clone https://github.com/OpenHands/agent-canvas.git
|
|
66
|
+
cd agent-canvas
|
|
67
|
+
npm install
|
|
68
|
+
npm run dev:dangerously-dockerless
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Access the UI at [http://localhost:8000](http://localhost:8000)
|
|
72
|
+
|
|
73
|
+
# Architecture
|
|
74
|
+
|
|
75
|
+
Agent Canvas is powered by the [OpenHands Agent Server](https://github.com/OpenHands/software-agent-sdk/tree/main/openhands-agent-server/openhands/agent_server), a REST API for running multiple agents on a single machine. Each Agent Server runs on a single host/port; the Agent Canvas can connect to multiple Agent Servers and easily flip between them.
|
|
76
|
+
|
|
77
|
+
You can run an Agent Server anywhere:
|
|
78
|
+
|
|
79
|
+
- Directly on your laptop (be careful!)
|
|
80
|
+
- Inside a Docker container
|
|
81
|
+
- On a dedicated machine like a Mac Mini
|
|
82
|
+
- On a virtual machine in the cloud
|
|
83
|
+
- Inside a Kubernetes Pod
|
|
84
|
+
- Inside OpenHands Cloud (our commercial offering)
|
|
85
|
+
|
|
86
|
+
The Agent Server is often paired with an [Automation Server](https://github.com/OpenHands/automation), which lets you set up agents that run on a schedule or in response to events.
|
|
87
|
+
|
|
88
|
+
<img width="1456" height="1258" alt="image" src="https://github.com/user-attachments/assets/cb6de6f5-ac30-4d04-a76a-b5c259f0c163" />
|
|
89
|
+
|
|
90
|
+
## npm Package
|
|
91
|
+
|
|
92
|
+
Agent Canvas is also available as an npm package for embedding in your own applications:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm install @openhands/agent-canvas
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Usage
|
|
99
|
+
|
|
100
|
+
Import the full package or specific components:
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
// Full package
|
|
104
|
+
import { AgentServerUIProviders } from '@openhands/agent-canvas';
|
|
105
|
+
|
|
106
|
+
// Individual component packages
|
|
107
|
+
import { BrowserPanel } from '@openhands/agent-canvas/browser';
|
|
108
|
+
import { ChatInterface } from '@openhands/agent-canvas/conversation';
|
|
109
|
+
import { FileExplorer } from '@openhands/agent-canvas/files';
|
|
110
|
+
import { Terminal } from '@openhands/agent-canvas/terminal';
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Available Subpath Exports
|
|
114
|
+
|
|
115
|
+
| Subpath | Description |
|
|
116
|
+
|---------|-------------|
|
|
117
|
+
| `@openhands/agent-canvas` | Main entry with providers and core components |
|
|
118
|
+
| `@openhands/agent-canvas/browser` | Browser/preview panel components |
|
|
119
|
+
| `@openhands/agent-canvas/conversation` | Chat interface and message components |
|
|
120
|
+
| `@openhands/agent-canvas/files` | File explorer and editor components |
|
|
121
|
+
| `@openhands/agent-canvas/settings` | Settings screens and forms |
|
|
122
|
+
| `@openhands/agent-canvas/sidebar` | Sidebar navigation components |
|
|
123
|
+
| `@openhands/agent-canvas/terminal` | Terminal emulator component |
|
|
124
|
+
| `@openhands/agent-canvas/i18n` | Internationalization resources |
|
|
125
|
+
|
|
126
|
+
## More documentation
|
|
127
|
+
|
|
128
|
+
For contributor and developer workflows, including frontend-only mode, mock mode, environment variables, and build/test commands, see [DEVELOPMENT.md](./DEVELOPMENT.md).
|
package/package.json
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@openhands/agent-canvas",
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.12.0"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@heroui/react": "2.8.10",
|
|
12
|
+
"@microlink/react-json-view": "1.31.19",
|
|
13
|
+
"@monaco-editor/react": "4.7.0",
|
|
14
|
+
"@openhands/typescript-client": "github:OpenHands/typescript-client#ef62e82fc3dfb03991a1c8025429caf354427263",
|
|
15
|
+
"@react-router/node": "7.14.2",
|
|
16
|
+
"@react-router/serve": "7.14.2",
|
|
17
|
+
"@tailwindcss/vite": "4.2.4",
|
|
18
|
+
"@tanstack/react-query": "5.100.6",
|
|
19
|
+
"@uidotdev/usehooks": "2.4.1",
|
|
20
|
+
"@xterm/addon-fit": "0.11.0",
|
|
21
|
+
"@xterm/xterm": "6.0.0",
|
|
22
|
+
"axios": "1.15.2",
|
|
23
|
+
"class-variance-authority": "0.7.1",
|
|
24
|
+
"clsx": "2.1.1",
|
|
25
|
+
"downshift": "9.3.2",
|
|
26
|
+
"eslint-config-airbnb-typescript": "18.0.0",
|
|
27
|
+
"framer-motion": "12.38.0",
|
|
28
|
+
"i18next": "26.0.8",
|
|
29
|
+
"i18next-browser-languagedetector": "8.2.1",
|
|
30
|
+
"i18next-http-backend": "3.0.6",
|
|
31
|
+
"isbot": "5.1.39",
|
|
32
|
+
"lucide-react": "1.14.0",
|
|
33
|
+
"monaco-editor": "0.55.1",
|
|
34
|
+
"posthog-js": "1.372.5",
|
|
35
|
+
"react": "19.2.5",
|
|
36
|
+
"react-dom": "19.2.5",
|
|
37
|
+
"react-hot-toast": "2.6.0",
|
|
38
|
+
"react-i18next": "17.0.6",
|
|
39
|
+
"react-icons": "5.6.0",
|
|
40
|
+
"react-markdown": "10.1.0",
|
|
41
|
+
"react-router": "7.14.2",
|
|
42
|
+
"react-syntax-highlighter": "16.1.1",
|
|
43
|
+
"rehype-raw": "7.0.0",
|
|
44
|
+
"rehype-sanitize": "6.0.0",
|
|
45
|
+
"remark-breaks": "4.0.0",
|
|
46
|
+
"remark-gfm": "4.0.1",
|
|
47
|
+
"sirv-cli": "3.0.1",
|
|
48
|
+
"socket.io-client": "4.8.3",
|
|
49
|
+
"tailwind-merge": "3.5.0",
|
|
50
|
+
"tailwind-scrollbar": "4.0.2",
|
|
51
|
+
"uuid": "^14.0.0",
|
|
52
|
+
"vite": "8.0.10",
|
|
53
|
+
"zustand": "5.0.12"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"dev": "npm run dev:docker",
|
|
57
|
+
"dev:dangerously-dockerless": "npm run dev:automation",
|
|
58
|
+
"dev:safe": "node --env-file-if-exists=.env scripts/dev-safe.mjs",
|
|
59
|
+
"dev:extra-backend": "node --env-file-if-exists=.env scripts/dev-extra-backend.mjs",
|
|
60
|
+
"dev:automation": "node --env-file-if-exists=.env scripts/dev-with-automation.mjs",
|
|
61
|
+
"dev:docker": "node --env-file-if-exists=.env scripts/dev-docker.mjs",
|
|
62
|
+
"dev:static": "node --env-file-if-exists=.env scripts/dev-static.mjs",
|
|
63
|
+
"dev:minimal": "node --env-file-if-exists=.env scripts/dev-safe.mjs",
|
|
64
|
+
"dev:frontend": "npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev",
|
|
65
|
+
"dev:mock": "npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev",
|
|
66
|
+
"build": "npm run build:app",
|
|
67
|
+
"build:mock": "npm run make-i18n && cross-env VITE_MOCK_API=true react-router build",
|
|
68
|
+
"start": "npx sirv-cli build/ --single",
|
|
69
|
+
"test": "npm run make-i18n && vitest run",
|
|
70
|
+
"test:e2e": "playwright test",
|
|
71
|
+
"test:coverage": "npm run make-i18n && vitest run --coverage",
|
|
72
|
+
"dev_wsl": "VITE_WATCH_USE_POLLING=true vite",
|
|
73
|
+
"preview": "vite preview",
|
|
74
|
+
"make-i18n": "node scripts/make-i18n-translations.cjs",
|
|
75
|
+
"prelint": "npm run make-i18n",
|
|
76
|
+
"lint": "npm run typecheck && eslint src --ext .ts,.tsx,.js && prettier --check src/**/*.{ts,tsx}",
|
|
77
|
+
"lint:fix": "eslint src --ext .ts,.tsx,.js --fix && prettier --write src/**/*.{ts,tsx}",
|
|
78
|
+
"prepare": "cd .. && husky frontend/.husky",
|
|
79
|
+
"typecheck": "react-router typegen && tsc",
|
|
80
|
+
"typecheck:staged": "react-router typegen && npx tsc --noEmit --skipLibCheck",
|
|
81
|
+
"check-translation-completeness": "node scripts/check-translation-completeness.cjs",
|
|
82
|
+
"build:app": "npm run make-i18n && react-router build",
|
|
83
|
+
"build:lib": "npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true vite build && tsc -p tsconfig.lib.json"
|
|
84
|
+
},
|
|
85
|
+
"lint-staged": {
|
|
86
|
+
"src/**/*.{ts,tsx,js}": [
|
|
87
|
+
"eslint --fix",
|
|
88
|
+
"prettier --write"
|
|
89
|
+
],
|
|
90
|
+
"src/**/*.{ts,tsx}": [
|
|
91
|
+
"bash -c 'npm run typecheck:staged'"
|
|
92
|
+
],
|
|
93
|
+
"src/**/*": [
|
|
94
|
+
"npm run check-translation-completeness"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"devDependencies": {
|
|
98
|
+
"@mswjs/socket.io-binding": "0.2.0",
|
|
99
|
+
"@playwright/test": "1.59.1",
|
|
100
|
+
"@react-router/dev": "7.14.2",
|
|
101
|
+
"@tailwindcss/typography": "0.5.19",
|
|
102
|
+
"@tanstack/eslint-plugin-query": "5.100.6",
|
|
103
|
+
"@testing-library/dom": "10.4.1",
|
|
104
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
105
|
+
"@testing-library/react": "16.3.2",
|
|
106
|
+
"@testing-library/user-event": "14.6.1",
|
|
107
|
+
"@types/node": "25.6.0",
|
|
108
|
+
"@types/react": "19.2.14",
|
|
109
|
+
"@types/react-dom": "19.2.3",
|
|
110
|
+
"@types/react-syntax-highlighter": "15.5.13",
|
|
111
|
+
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
112
|
+
"@typescript-eslint/parser": "7.18.0",
|
|
113
|
+
"@vercel/react-router": "1.2.6",
|
|
114
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
115
|
+
"cross-env": "10.1.0",
|
|
116
|
+
"eslint": "8.57.1",
|
|
117
|
+
"eslint-config-airbnb": "19.0.4",
|
|
118
|
+
"eslint-config-airbnb-typescript": "18.0.0",
|
|
119
|
+
"eslint-config-prettier": "10.1.8",
|
|
120
|
+
"eslint-plugin-i18next": "6.1.4",
|
|
121
|
+
"eslint-plugin-import": "2.32.0",
|
|
122
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
123
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
124
|
+
"eslint-plugin-react": "7.37.5",
|
|
125
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
126
|
+
"eslint-plugin-unused-imports": "4.4.1",
|
|
127
|
+
"husky": "9.1.7",
|
|
128
|
+
"jsdom": "29.1.1",
|
|
129
|
+
"lint-staged": "16.4.0",
|
|
130
|
+
"msw": "2.14.2",
|
|
131
|
+
"postcss-prefix-selector": "2.1.1",
|
|
132
|
+
"prettier": "3.8.3",
|
|
133
|
+
"tailwindcss": "4.2.4",
|
|
134
|
+
"typescript": "6.0.3",
|
|
135
|
+
"vite-plugin-svgr": "5.2.0",
|
|
136
|
+
"vitest": "4.1.5"
|
|
137
|
+
},
|
|
138
|
+
"packageManager": "npm@10.5.0",
|
|
139
|
+
"volta": {
|
|
140
|
+
"node": "22.12.0"
|
|
141
|
+
},
|
|
142
|
+
"msw": {
|
|
143
|
+
"workerDirectory": [
|
|
144
|
+
"public"
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"overrides": {
|
|
148
|
+
"dompurify": "3.3.2",
|
|
149
|
+
"eslint-config-airbnb": {
|
|
150
|
+
"eslint-plugin-react-hooks": "$eslint-plugin-react-hooks"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"main": "./dist/index.cjs",
|
|
154
|
+
"module": "./dist/index.js",
|
|
155
|
+
"types": "./dist/index.d.ts",
|
|
156
|
+
"files": [
|
|
157
|
+
"dist"
|
|
158
|
+
],
|
|
159
|
+
"exports": {
|
|
160
|
+
".": {
|
|
161
|
+
"types": "./dist/index.d.ts",
|
|
162
|
+
"import": "./dist/index.js",
|
|
163
|
+
"require": "./dist/index.cjs"
|
|
164
|
+
},
|
|
165
|
+
"./browser": {
|
|
166
|
+
"types": "./dist/components/browser/index.d.ts",
|
|
167
|
+
"import": "./dist/components/browser/index.js",
|
|
168
|
+
"require": "./dist/components/browser/index.cjs"
|
|
169
|
+
},
|
|
170
|
+
"./conversation": {
|
|
171
|
+
"types": "./dist/components/conversation/index.d.ts",
|
|
172
|
+
"import": "./dist/components/conversation/index.js",
|
|
173
|
+
"require": "./dist/components/conversation/index.cjs"
|
|
174
|
+
},
|
|
175
|
+
"./files": {
|
|
176
|
+
"types": "./dist/components/files/index.d.ts",
|
|
177
|
+
"import": "./dist/components/files/index.js",
|
|
178
|
+
"require": "./dist/components/files/index.cjs"
|
|
179
|
+
},
|
|
180
|
+
"./settings": {
|
|
181
|
+
"types": "./dist/components/settings/index.d.ts",
|
|
182
|
+
"import": "./dist/components/settings/index.js",
|
|
183
|
+
"require": "./dist/components/settings/index.cjs"
|
|
184
|
+
},
|
|
185
|
+
"./sidebar": {
|
|
186
|
+
"types": "./dist/components/sidebar/index.d.ts",
|
|
187
|
+
"import": "./dist/components/sidebar/index.js",
|
|
188
|
+
"require": "./dist/components/sidebar/index.cjs"
|
|
189
|
+
},
|
|
190
|
+
"./terminal": {
|
|
191
|
+
"types": "./dist/components/terminal/index.d.ts",
|
|
192
|
+
"import": "./dist/components/terminal/index.js",
|
|
193
|
+
"require": "./dist/components/terminal/index.cjs"
|
|
194
|
+
},
|
|
195
|
+
"./i18n": {
|
|
196
|
+
"types": "./dist/i18n/index.d.ts",
|
|
197
|
+
"import": "./dist/i18n/index.js",
|
|
198
|
+
"require": "./dist/i18n/index.cjs"
|
|
199
|
+
},
|
|
200
|
+
"./package.json": "./package.json"
|
|
201
|
+
},
|
|
202
|
+
"peerDependencies": {
|
|
203
|
+
"react": "19.2.5",
|
|
204
|
+
"react-dom": "19.2.5",
|
|
205
|
+
"react-router": "7.14.2"
|
|
206
|
+
}
|
|
207
|
+
}
|