openwork 0.0.1-alpha.0 → 0.1.1-rc.0

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 LangChain, Inc.
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,139 @@
1
+ # openwork
2
+
3
+ A tactical agent interface for [deepagentsjs](https://github.com/langchain-ai/deepagentsjs) - an opinionated harness for building deep agents with filesystem capabilities, planning, and subagent delegation.
4
+
5
+ ![openwork screenshot](docs/screenshot.png)
6
+
7
+ ## Features
8
+
9
+ - **Chat Interface** - Stream conversations with your AI agent in real-time
10
+ - **TODO Tracking** - Visual task list showing agent's planning progress
11
+ - **Filesystem Browser** - See files the agent reads, writes, and edits
12
+ - **Subagent Monitoring** - Track spawned subagents and their status
13
+ - **Human-in-the-Loop** - Approve, edit, or reject sensitive tool calls
14
+ - **Multi-Model Support** - Use Claude, GPT-4, Gemini, or local models
15
+ - **Thread Persistence** - SQLite-backed conversation history
16
+
17
+ ## Installation
18
+
19
+ ### npm (recommended)
20
+
21
+ ```bash
22
+ # Run directly
23
+ npx openwork
24
+
25
+ # Or install globally
26
+ npm install -g openwork
27
+ openwork
28
+ ```
29
+
30
+ Requires Node.js 18+. Electron is installed automatically as a dependency.
31
+
32
+ ### From Source
33
+
34
+ ```bash
35
+ git clone https://github.com/langchain-ai/openwork.git
36
+ cd openwork
37
+ npm install
38
+ npm run dev
39
+ ```
40
+
41
+ ## Configuration
42
+
43
+ ### API Keys
44
+
45
+ openwork supports multiple LLM providers. Set your API keys via:
46
+
47
+ 1. **Environment Variables** (recommended)
48
+ ```bash
49
+ export ANTHROPIC_API_KEY="sk-ant-..."
50
+ export OPENAI_API_KEY="sk-..."
51
+ export GOOGLE_API_KEY="..."
52
+ ```
53
+
54
+ 2. **In-App Settings** - Click the settings icon and enter your API keys securely.
55
+
56
+ ### Supported Models
57
+
58
+ | Provider | Models |
59
+ |----------|--------|
60
+ | Anthropic | Claude Sonnet 4, Claude 3.5 Sonnet, Claude 3.5 Haiku |
61
+ | OpenAI | GPT-4o, GPT-4o Mini |
62
+ | Google | Gemini 2.0 Flash |
63
+
64
+ ## Architecture
65
+
66
+ openwork is built with:
67
+
68
+ - **Electron** - Cross-platform desktop framework
69
+ - **React** - UI components with tactical/SCADA-inspired design
70
+ - **deepagentsjs** - Agent harness with planning, filesystem, and subagents
71
+ - **LangGraph** - State machine for agent orchestration
72
+ - **SQLite** - Local persistence for threads and checkpoints
73
+
74
+ ```
75
+ ┌─────────────────────────────────────────────────────────────┐
76
+ │ Electron Main Process │
77
+ ├─────────────────────────────────────────────────────────────┤
78
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
79
+ │ │ IPC Handlers│ │ SQLite │ │ DeepAgentsJS │ │
80
+ │ │ - agent │ │ - threads │ │ - createAgent │ │
81
+ │ │ - threads │ │ - runs │ │ - checkpointer │ │
82
+ │ │ - models │ │ - assists │ │ - middleware │ │
83
+ │ └─────────────┘ └─────────────┘ └─────────────────────┘ │
84
+ └─────────────────────────────────────────────────────────────┘
85
+
86
+ IPC Bridge
87
+
88
+ ┌─────────────────────────────────────────────────────────────┐
89
+ │ Electron Renderer Process │
90
+ ├─────────────────────────────────────────────────────────────┤
91
+ │ ┌──────────┐ ┌─────────────────────┐ ┌───────────────┐ │
92
+ │ │ Sidebar │ │ Chat Interface │ │ Right Panel │ │
93
+ │ │ - Threads│ │ - Messages │ │ - TODOs │ │
94
+ │ │ - Model │ │ - Tool Renderers │ │ - Files │ │
95
+ │ │ - Config │ │ - Streaming │ │ - Subagents │ │
96
+ │ └──────────┘ └─────────────────────┘ └───────────────┘ │
97
+ └─────────────────────────────────────────────────────────────┘
98
+ ```
99
+
100
+ ## Development
101
+
102
+ ```bash
103
+ # Install dependencies
104
+ npm install
105
+
106
+ # Start development server
107
+ npm run dev
108
+
109
+ # Build for production
110
+ npm run build
111
+ ```
112
+
113
+ ## Releases
114
+
115
+ To publish a new release:
116
+
117
+ 1. Create a git tag: `git tag v0.2.0`
118
+ 2. Push the tag: `git push origin v0.2.0`
119
+ 3. GitHub Actions will:
120
+ - Build the application
121
+ - Publish to npm
122
+ - Create a GitHub release
123
+
124
+ ## Design System
125
+
126
+ openwork uses a tactical/SCADA-inspired design system optimized for:
127
+
128
+ - **Information density** - Dense layouts for monitoring agent activity
129
+ - **Status at a glance** - Color-coded status indicators (nominal, warning, critical)
130
+ - **Dark mode only** - Reduced eye strain for extended sessions
131
+ - **Monospace typography** - JetBrains Mono for data and code
132
+
133
+ ## Contributing
134
+
135
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
136
+
137
+ ## License
138
+
139
+ MIT License - see [LICENSE](LICENSE) for details.
package/bin/cli.js ADDED
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env node
2
+ /* eslint-disable @typescript-eslint/no-require-imports */
3
+ /**
4
+ * openwork CLI - Launches the Electron app
5
+ */
6
+
7
+ const { spawn } = require('child_process')
8
+ const path = require('path')
9
+
10
+ // Set process title for Activity Monitor
11
+ process.title = 'openwork'
12
+
13
+ const args = process.argv.slice(2)
14
+
15
+ // Handle --version flag
16
+ if (args.includes('--version') || args.includes('-v')) {
17
+ const { version } = require('../package.json')
18
+ console.log(`openwork v${version}`)
19
+ process.exit(0)
20
+ }
21
+
22
+ // Handle --help flag
23
+ if (args.includes('--help') || args.includes('-h')) {
24
+ console.log(`
25
+ openwork - A tactical agent interface for deepagentsjs
26
+
27
+ Usage:
28
+ openwork Launch the application
29
+ openwork --version Show version
30
+ openwork --help Show this help
31
+ `)
32
+ process.exit(0)
33
+ }
34
+
35
+ // Get the path to electron
36
+ const electron = require('electron')
37
+
38
+ // Launch electron with our main process
39
+ const mainPath = path.join(__dirname, '..', 'out', 'main', 'index.js')
40
+
41
+ const child = spawn(electron, [mainPath, ...args], {
42
+ stdio: 'inherit'
43
+ })
44
+
45
+ // Forward signals to child process
46
+ function forwardSignal(signal) {
47
+ if (child.pid) {
48
+ process.kill(child.pid, signal)
49
+ }
50
+ }
51
+
52
+ process.on('SIGINT', () => forwardSignal('SIGINT'))
53
+ process.on('SIGTERM', () => forwardSignal('SIGTERM'))
54
+
55
+ // Exit with the same code as the child
56
+ child.on('close', (code) => {
57
+ process.exit(code ?? 0)
58
+ })
59
+
60
+ child.on('error', (err) => {
61
+ console.error('Failed to start openwork:', err.message)
62
+ process.exit(1)
63
+ })