Skip to main content

AI Agent Web Interface with Filesystem and Canvas Visualization

Project description

Cowork Dash

A web interface for AI agent interactions with filesystem workspace, canvas visualization, and real-time streaming.

Features

  • AI Agent Chat: Real-time streaming with thinking process and task progress
  • File Browser: Interactive file tree with lazy loading
  • Canvas: Visualize DataFrames, Plotly/Matplotlib charts, Mermaid diagrams, images
  • Flexible Configuration: Environment variables, CLI args, or config file

Quick Start

Installation

# Install via pip (includes DeepAgents)
pip install cowork-dash

# Or run directly with uvx (no installation needed)
export ANTHROPIC_API_KEY="your_anthropic_api_key"
uvx cowork-dash run --workspace ~/my-workspace

Run

After setting up your agent (optional), run the app. You can also use the default agent by setting ANTHROPIC_API_KEY environment variable.

# Run with defaults (current directory as workspace, no agent)
export ANTHROPIC_API_KEY="your_anthropic_api_key"
cowork-dash run

# Run with workspace
cowork-dash run --workspace ~/my-workspace

# Run with custom agent (optional)
cowork-dash run --agent my_agent.py:agent

# Using uvx (one-off execution)
uvx cowork-dash run --workspace ~/my-workspace --port 8080

Open browser to http://localhost:8050

Configuration

Priority (highest to lowest)

  1. CLI Arguments - --workspace, --port, etc.
  2. Environment Variables - DEEPAGENT_*
  3. Config File - config.py defaults

Environment Variables (optional)

export DEEPAGENT_SPEC=my_agent.py:agent         # Set any Langgraph agent
export DEEPAGENT_WORKSPACE_ROOT=/path/to/workspace
export DEEPAGENT_PORT=9000                      # optional (default: 8050)
export DEEPAGENT_HOST=0.0.0.0                   # optional (default: localhost)
export DEEPAGENT_DEBUG=true                     # optional (default: false)
export DEEPAGENT_APP_TITLE="My App"             # optional
export DEEPAGENT_APP_SUBTITLE="Subtitle"        # optional

cowork-dash run

CLI Options (all optional)

cowork-dash run [OPTIONS]

  --workspace PATH        Workspace directory (default: current directory)
  --agent PATH:OBJECT     Agent spec (default: none, manual mode)
  --port PORT            Server port (default: 8050)
  --host HOST            Server host (default: localhost)
  --debug                Enable debug mode
  --title TITLE          App title (default: "Cowork Dash")
  --subtitle TEXT        App subtitle (default: "AI-Powered Workspace")

Python API

from cowork_dash import run_app

# Option 1: Pass agent instance directly (recommended)
from my_agent import MyAgent
agent = MyAgent()
run_app(agent, workspace="~/my-workspace")

# Option 2: Use agent spec
run_app(agent_spec="my_agent.py:agent", workspace="~/my-workspace")

# Option 3: Manual mode (no agent)
run_app(workspace="~/my-workspace", port=8080, debug=True)

Agent Integration

Workspace Access

Cowork Dash sets DEEPAGENT_WORKSPACE_ROOT environment variable for your agent:

import os
from pathlib import Path

# In your agent code
workspace = Path(os.getenv('DEEPAGENT_WORKSPACE_ROOT', './'))

# Read/write files in workspace
config_file = workspace / "config.json"

Agent Specification

Load agents using path:object format:

# Load from Python file
cowork-dash run --agent agent.py:my_agent

# Absolute path
cowork-dash run --agent /path/to/agent.py:agent_instance

Agent Requirements

Your agent must implement:

  • Streaming: agent.stream(input, stream_mode="updates")
  • Message format: {"messages": [{"role": "user", "content": "..."}]}
  • Workspace access (optional): Read DEEPAGENT_WORKSPACE_ROOT env var

Example Agent Setup

# my_agent.py
import os
from deepagents import create_deep_agent
from deepagents.backends.filesystem import FileSystemBackend

backend = FileSystemBackend(root=os.getenv('DEEPAGENT_WORKSPACE_ROOT', './'))
my_agent = create_deep_agent(..., backend=backend)

Then run: cowork-dash run --agent my_agent.py:my_agent

Canvas

The canvas displays agent-created visualizations:

  • DataFrames: HTML tables
  • Charts: Plotly, Matplotlib
  • Images: PNG, JPG, etc.
  • Diagrams: Mermaid (flowcharts, sequence diagrams)
  • Markdown: Text and notes

Content auto-saves to canvas.md and can be exported or cleared.

Development

# Install from source
git clone https://github.com/dkedar7/cowork-dash.git
cd cowork-dash
pip install -e ".[dev]"

# Run tests
pytest

# Build package
python -m build

Requirements

  • Python 3.11+
  • Dash 2.0+
  • dash-mantine-components
  • pandas, plotly, matplotlib, Pillow
  • python-dotenv
  • deepagents

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cowork_dash-0.1.4.tar.gz (57.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cowork_dash-0.1.4-py3-none-any.whl (53.0 kB view details)

Uploaded Python 3

File details

Details for the file cowork_dash-0.1.4.tar.gz.

File metadata

  • Download URL: cowork_dash-0.1.4.tar.gz
  • Upload date:
  • Size: 57.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for cowork_dash-0.1.4.tar.gz
Algorithm Hash digest
SHA256 bb57500db9c7d32dfc3decd8222b89ca291b51e9a167353ed941463a61e6f181
MD5 b1a71b11da6fa67d447c3a1610193ae8
BLAKE2b-256 359da8e20de6e883bdc6fdb1fcf9d056ebda37aff174eadc4166f0916c326c4f

See more details on using hashes here.

File details

Details for the file cowork_dash-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for cowork_dash-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a2b5d10e6246d7ad6ba57007616b3e61c8fe53f1ab7413c1ffc2d4881df24c77
MD5 a98162f885c02aadb01a3f28e29aab0f
BLAKE2b-256 001020b4fa467b7ea0caa775d3f348eb33e354ca9cbc2319b92ff037f29ab3cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page