cowork-dash 0.1.2__py3-none-any.whl
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.
- cowork_dash/__init__.py +35 -0
- cowork_dash/__main__.py +9 -0
- cowork_dash/agent.py +117 -0
- cowork_dash/app.py +1776 -0
- cowork_dash/assets/app.js +237 -0
- cowork_dash/assets/favicon.svg +1 -0
- cowork_dash/assets/styles.css +915 -0
- cowork_dash/canvas.py +318 -0
- cowork_dash/cli.py +273 -0
- cowork_dash/components.py +568 -0
- cowork_dash/config.py +91 -0
- cowork_dash/file_utils.py +226 -0
- cowork_dash/layout.py +250 -0
- cowork_dash/tools.py +699 -0
- cowork_dash-0.1.2.dist-info/METADATA +238 -0
- cowork_dash-0.1.2.dist-info/RECORD +19 -0
- cowork_dash-0.1.2.dist-info/WHEEL +4 -0
- cowork_dash-0.1.2.dist-info/entry_points.txt +2 -0
- cowork_dash-0.1.2.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cowork-dash
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: AI Agent Web Interface with Filesystem and Canvas Visualization
|
|
5
|
+
Project-URL: Homepage, https://github.com/dkedar7/cowork-dash
|
|
6
|
+
Project-URL: Documentation, https://github.com/dkedar7/cowork-dash/blob/main/README.md
|
|
7
|
+
Project-URL: Repository, https://github.com/dkedar7/cowork-dash
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/dkedar7/cowork-dash/issues
|
|
9
|
+
Author-email: Kedar Dabhadkar <kdabhadk@gmail.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent,ai,cowork,dash,dashboard,plotly,visualization
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Requires-Dist: dash-iconify>=0.1.2
|
|
25
|
+
Requires-Dist: dash-mantine-components>=0.14.0
|
|
26
|
+
Requires-Dist: dash>=2.0.0
|
|
27
|
+
Requires-Dist: deepagents>=0.1.0
|
|
28
|
+
Requires-Dist: matplotlib>=3.5.0
|
|
29
|
+
Requires-Dist: pandas>=1.3.0
|
|
30
|
+
Requires-Dist: pillow>=9.0.0
|
|
31
|
+
Requires-Dist: plotly>=5.0.0
|
|
32
|
+
Requires-Dist: python-dotenv>=0.19.0
|
|
33
|
+
Provides-Extra: all
|
|
34
|
+
Requires-Dist: black>=22.0.0; extra == 'all'
|
|
35
|
+
Requires-Dist: flake8>=4.0.0; extra == 'all'
|
|
36
|
+
Requires-Dist: ipython>=8.0.0; extra == 'all'
|
|
37
|
+
Requires-Dist: mypy>=0.950; extra == 'all'
|
|
38
|
+
Requires-Dist: pytest-cov>=3.0.0; extra == 'all'
|
|
39
|
+
Requires-Dist: pytest>=7.0.0; extra == 'all'
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: black>=22.0.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: flake8>=4.0.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: mypy>=0.950; extra == 'dev'
|
|
44
|
+
Requires-Dist: pytest-cov>=3.0.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
46
|
+
Provides-Extra: ipython
|
|
47
|
+
Requires-Dist: ipython>=8.0.0; extra == 'ipython'
|
|
48
|
+
Description-Content-Type: text/markdown
|
|
49
|
+
|
|
50
|
+
# Cowork Dash
|
|
51
|
+
|
|
52
|
+
A web interface for AI agent interactions with filesystem workspace, canvas visualization, and real-time streaming.
|
|
53
|
+
|
|
54
|
+
## Features
|
|
55
|
+
|
|
56
|
+
- **AI Agent Chat**: Real-time streaming with thinking process and task progress
|
|
57
|
+
- **File Browser**: Interactive file tree with lazy loading
|
|
58
|
+
- **Canvas**: Visualize DataFrames, Plotly/Matplotlib charts, Mermaid diagrams, images
|
|
59
|
+
- **Flexible Configuration**: Environment variables, CLI args, or config file
|
|
60
|
+
|
|
61
|
+
## Quick Start
|
|
62
|
+
|
|
63
|
+
### Installation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Install via pip (includes DeepAgents)
|
|
67
|
+
pip install cowork-dash
|
|
68
|
+
|
|
69
|
+
# Or run directly with uvx (no installation needed)
|
|
70
|
+
export ANTHROPIC_API_KEY="your_anthropic_api_key"
|
|
71
|
+
uvx cowork-dash run --workspace ~/my-workspace
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Run
|
|
75
|
+
After setting up your agent (optional), run the app.
|
|
76
|
+
You can also use the default agent by setting ANTHROPIC_API_KEY environment variable.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Run with defaults (current directory as workspace, no agent)
|
|
80
|
+
export ANTHROPIC_API_KEY="your_anthropic_api_key"
|
|
81
|
+
cowork-dash run
|
|
82
|
+
|
|
83
|
+
# Run with workspace
|
|
84
|
+
cowork-dash run --workspace ~/my-workspace
|
|
85
|
+
|
|
86
|
+
# Run with custom agent (optional)
|
|
87
|
+
cowork-dash run --agent my_agent.py:agent
|
|
88
|
+
|
|
89
|
+
# Using uvx (one-off execution)
|
|
90
|
+
uvx cowork-dash run --workspace ~/my-workspace --port 8080
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Open browser to `http://localhost:8050`
|
|
94
|
+
|
|
95
|
+
## Configuration
|
|
96
|
+
|
|
97
|
+
### Priority (highest to lowest)
|
|
98
|
+
|
|
99
|
+
1. **CLI Arguments** - `--workspace`, `--port`, etc.
|
|
100
|
+
2. **Environment Variables** - `DEEPAGENT_*`
|
|
101
|
+
3. **Config File** - `config.py` defaults
|
|
102
|
+
|
|
103
|
+
### Environment Variables (optional)
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
export DEEPAGENT_SPEC=my_agent.py:agent # Set any Langgraph agent
|
|
107
|
+
export DEEPAGENT_WORKSPACE_ROOT=/path/to/workspace
|
|
108
|
+
export DEEPAGENT_PORT=9000 # optional (default: 8050)
|
|
109
|
+
export DEEPAGENT_HOST=0.0.0.0 # optional (default: localhost)
|
|
110
|
+
export DEEPAGENT_DEBUG=true # optional (default: false)
|
|
111
|
+
export DEEPAGENT_APP_TITLE="My App" # optional
|
|
112
|
+
export DEEPAGENT_APP_SUBTITLE="Subtitle" # optional
|
|
113
|
+
|
|
114
|
+
cowork-dash run
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### CLI Options (all optional)
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
cowork-dash run [OPTIONS]
|
|
121
|
+
|
|
122
|
+
--workspace PATH Workspace directory (default: current directory)
|
|
123
|
+
--agent PATH:OBJECT Agent spec (default: none, manual mode)
|
|
124
|
+
--port PORT Server port (default: 8050)
|
|
125
|
+
--host HOST Server host (default: localhost)
|
|
126
|
+
--debug Enable debug mode
|
|
127
|
+
--title TITLE App title (default: "Cowork Dash")
|
|
128
|
+
--subtitle TEXT App subtitle (default: "AI-Powered Workspace")
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Python API
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
from cowork_dash import run_app
|
|
135
|
+
|
|
136
|
+
# Option 1: Pass agent instance directly (recommended)
|
|
137
|
+
from my_agent import MyAgent
|
|
138
|
+
agent = MyAgent()
|
|
139
|
+
run_app(agent, workspace="~/my-workspace")
|
|
140
|
+
|
|
141
|
+
# Option 2: Use agent spec
|
|
142
|
+
run_app(agent_spec="my_agent.py:agent", workspace="~/my-workspace")
|
|
143
|
+
|
|
144
|
+
# Option 3: Manual mode (no agent)
|
|
145
|
+
run_app(workspace="~/my-workspace", port=8080, debug=True)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Agent Integration
|
|
149
|
+
|
|
150
|
+
### Workspace Access
|
|
151
|
+
|
|
152
|
+
Cowork Dash sets `DEEPAGENT_WORKSPACE_ROOT` environment variable for your agent:
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
import os
|
|
156
|
+
from pathlib import Path
|
|
157
|
+
|
|
158
|
+
# In your agent code
|
|
159
|
+
workspace = Path(os.getenv('DEEPAGENT_WORKSPACE_ROOT', './'))
|
|
160
|
+
|
|
161
|
+
# Read/write files in workspace
|
|
162
|
+
config_file = workspace / "config.json"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Agent Specification
|
|
166
|
+
|
|
167
|
+
Load agents using `path:object` format:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Load from Python file
|
|
171
|
+
cowork-dash run --agent agent.py:my_agent
|
|
172
|
+
|
|
173
|
+
# Absolute path
|
|
174
|
+
cowork-dash run --agent /path/to/agent.py:agent_instance
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Agent Requirements
|
|
178
|
+
|
|
179
|
+
Your agent must implement:
|
|
180
|
+
- **Streaming**: `agent.stream(input, stream_mode="updates")`
|
|
181
|
+
- **Message format**: `{"messages": [{"role": "user", "content": "..."}]}`
|
|
182
|
+
- **Workspace access** (optional): Read `DEEPAGENT_WORKSPACE_ROOT` env var
|
|
183
|
+
|
|
184
|
+
### Example Agent Setup
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
# my_agent.py
|
|
188
|
+
import os
|
|
189
|
+
from deepagents import create_deep_agent
|
|
190
|
+
from deepagents.backends.filesystem import FileSystemBackend
|
|
191
|
+
|
|
192
|
+
backend = FileSystemBackend(root=os.getenv('DEEPAGENT_WORKSPACE_ROOT', './'))
|
|
193
|
+
my_agent = create_deep_agent(..., backend=backend)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Then run: `cowork-dash run --agent my_agent.py:my_agent`
|
|
197
|
+
|
|
198
|
+
## Canvas
|
|
199
|
+
|
|
200
|
+
The canvas displays agent-created visualizations:
|
|
201
|
+
|
|
202
|
+
- **DataFrames**: HTML tables
|
|
203
|
+
- **Charts**: Plotly, Matplotlib
|
|
204
|
+
- **Images**: PNG, JPG, etc.
|
|
205
|
+
- **Diagrams**: Mermaid (flowcharts, sequence diagrams)
|
|
206
|
+
- **Markdown**: Text and notes
|
|
207
|
+
|
|
208
|
+
Content auto-saves to `canvas.md` and can be exported or cleared.
|
|
209
|
+
|
|
210
|
+
## Development
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Install from source
|
|
214
|
+
git clone https://github.com/dkedar7/cowork-dash.git
|
|
215
|
+
cd cowork-dash
|
|
216
|
+
pip install -e ".[dev]"
|
|
217
|
+
|
|
218
|
+
# Run tests
|
|
219
|
+
pytest
|
|
220
|
+
|
|
221
|
+
# Build package
|
|
222
|
+
python -m build
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## Requirements
|
|
226
|
+
|
|
227
|
+
- Python 3.11+
|
|
228
|
+
- Dash 2.0+
|
|
229
|
+
- dash-mantine-components
|
|
230
|
+
- pandas, plotly, matplotlib, Pillow
|
|
231
|
+
- python-dotenv
|
|
232
|
+
- deepagents
|
|
233
|
+
|
|
234
|
+
## Links
|
|
235
|
+
|
|
236
|
+
- **PyPI**: https://pypi.org/project/cowork-dash/
|
|
237
|
+
- **GitHub**: https://github.com/dkedar7/cowork-dash
|
|
238
|
+
- **Issues**: https://github.com/dkedar7/cowork-dash/issues
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
cowork_dash/__init__.py,sha256=37qBKl7g12Zos8GFukXLXligCdpD32e2qe9F8cd8Qdk,896
|
|
2
|
+
cowork_dash/__main__.py,sha256=CCM9VIkWuwh7hwVGNBBgCCbeVAcHj1soyBVXUaPgABk,131
|
|
3
|
+
cowork_dash/agent.py,sha256=dj50jBzP69YgEzEF44IeE8p11X0ap3xKwdITORnpkhs,4318
|
|
4
|
+
cowork_dash/app.py,sha256=GaP9nZVKG5SECAMmaIw5ffJQTZAo1-s-FPNm7hlq06Y,68956
|
|
5
|
+
cowork_dash/canvas.py,sha256=9X_Z6gOwFwIfBk8rsXi4s1hpKAyaK6wglgZ_1UGjZ3E,11093
|
|
6
|
+
cowork_dash/cli.py,sha256=N9APQlQ-5oahUxMoICpJV1FcmVOFNmJpCfaULDeYhRY,6491
|
|
7
|
+
cowork_dash/components.py,sha256=VDJ_IQ8qW7O3dAMVoz97yzBByRBC7XvpnVmDMCIlEUY,20538
|
|
8
|
+
cowork_dash/config.py,sha256=WaFTvbrDPrK2SMvcmOBYXvt1Zc1my3F2dgnym2nsg2k,3008
|
|
9
|
+
cowork_dash/file_utils.py,sha256=s2-L5wFOE-ChpKaZQwdRUSx5qA96ATR1QtmpkrJXUJY,8542
|
|
10
|
+
cowork_dash/layout.py,sha256=1L5XcWEBao1mk3uWqeu6dD4Bos4V-ulxpkgVTFLyQSM,11250
|
|
11
|
+
cowork_dash/tools.py,sha256=6WYK9-s32R5PfZvcpBIR55Z0I6wBgrxJvcxcgfnQ54E,23125
|
|
12
|
+
cowork_dash/assets/app.js,sha256=CIRhskgTn4zPJGfubTYvsZFYSj-0XJNniGlSggy75L4,8162
|
|
13
|
+
cowork_dash/assets/favicon.svg,sha256=MdT50APCvIlWh3HSwW5SNXYWB3q_wKfuLP-JV53SnKg,1065
|
|
14
|
+
cowork_dash/assets/styles.css,sha256=ZiWpULBDO64Hu6bZ5NYFbzDfQ8Ezn66eKjW1LpJ8anM,20621
|
|
15
|
+
cowork_dash-0.1.2.dist-info/METADATA,sha256=-rx1rPPJx600RQrCp0cuuZMjvX29jWoflW2nJ8Pref4,6959
|
|
16
|
+
cowork_dash-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
17
|
+
cowork_dash-0.1.2.dist-info/entry_points.txt,sha256=lL_9XJINiky3nh13tLqWd61LitKbbyh085ROATH9fck,53
|
|
18
|
+
cowork_dash-0.1.2.dist-info/licenses/LICENSE,sha256=2SFXFfIa_c_g_uwY0JApQDXI1mWqEfJeG87Pn4ehLMQ,1072
|
|
19
|
+
cowork_dash-0.1.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Kedar Dabhadkar
|
|
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.
|