OpenWork

repository·dev·Indexed 12 days ago

https://github.com/different-ai/openwork

An open-source desktop application and ecosystem for sharing AI workflows, allowing the reuse of skills, Model Context Protocol (MCP) servers, and connected services across AI agents. It includes a filesystem-backed server for remote clients, a desktop runner for scheduled automations, and support for Dynamic Artifacts as MCP Apps.

Tokens
289.9K
Snippets
576
Records
1.3K
Agent score
93%

What's inside OpenWork

  1. Overview of OpenWork Diagnostics

    dev

    OpenWork Diagnostics is a Vercel-native MCP (Model Context Protocol) compatibility endpoint designed for enterprise troubleshooting. It allows an organization to allowlist a stable host, point an MCP client to the /mcp endpoint, and use an authenticated dashboard to inspect redacted request/response sequences.

    Key features include:

    • Connections Dashboard: Maintains a seven-day rolling record of metadata-only OpenWork Connect incidents, correlating desktop maintenance probes with Den lifecycle requests (initialize, initialized, tools/list).
    • Controlled Den Egress: Supports diagnostic runs for private-cloud and Kubernetes deployments where requests originate within the Den process to exercise real network paths (DNS, proxy, TLS, firewall, etc.).
    • Synthetic Profiles: Supports one active profile at a time: generic, microsoft, or servicenow.
  2. Overview of Worker Routes in Den API

    dev

    The Worker Routes in the Den API manage the complete lifecycle of workers, including runtime management, billing, and heartbeat monitoring. The routes are organized into several functional modules:

    • Core Worker Management: Handled by core.ts, providing endpoints to list, create, get, update, and delete workers, as well as token lookup.
    • Worker Heartbeat: Handled by activity.ts, providing an unauthenticated heartbeat endpoint that uses a worker activity token.
    • Billing: Handled by billing.ts, providing user-facing cloud worker billing endpoints.
    • Runtime Inspection: Handled by runtime.ts, providing endpoints for inspecting worker runtimes and passing through upgrade requests.
    • Lifecycle & Infrastructure: Provisioning logic is decoupled from the routes and resides in src/workers/.
  3. Overview of OpenWork capabilities and roadmap

    dev

    OpenWork provides a local-first workspace for agentic work via a desktop app, which can then be extended to other AI agents using OpenWork Connect.

    Core Capabilities

    • Desktop App: The primary interface for managing files, running agents, creating skills, and connecting services. It supports macOS, Windows, and Linux.
    • OpenWork Connect: An MCP-based mechanism that allows your desktop configurations (skills, plugins, MCPs, and connections) to be used within other agents like Codex, Claude Code, Cursor, and OpenCode.
    • OpenWork Cloud: The central control plane for managing organization-wide policies, identity (SAML SSO), team roles, and skill marketplaces.
    • Hosted Workspaces: Provides persistent cloud-based filesystems and environments so work can continue across different surfaces (Desktop, Slack, Mobile).
  4. Overview of den-admin-mcp

    dev

    den-admin-mcp is a read-only admin analytics MCP (Model Context Protocol) server designed for the OpenWork Den database. It allows AI agents to answer business intelligence questions such as weekly growth rates, retention matrices, and user activity status using real data.

    Note on usage: While this package provides a stdio implementation for local development or 'break-glass' scenarios, it is generally preferred to use the hosted endpoint via den-api. The hosted endpoint serves the same toolset over HTTP at /mcp/admin and is authenticated via the desktop's first-party MCP token, removing the need for a DATABASE_URL on client machines.

  5. Understand the OpenWork Enterprise Plan structure

    dev

    OpenWork offers three tiers of service. The Enterprise tier includes all features from the Team Starter tier, plus advanced management and compliance tools.

    PlanPriceIncludes
    Solo$0Open-source desktop app, BYO keys
    Team Starter$50/mo5 seats, API access, marketplace/plugin management, distributed keys
    EnterpriseCustomEverything in Team, plus: SSO/SAML + SCIM, Desktop policies & version controls, enforced SSO (requireSso), managed deployment, custom skill development, MCP consulting, and rollout support

    Enterprise Services:

    • Managed deployment: Setup of Den (self-hosted or hosted), gateway/LiteLLM, IdP, and version pinning.
    • Skill development: Custom skill plugins and marketplace packs.
    • MCP consulting: Connecting internal data sources/tools as MCP servers with policy guardrails.
  6. What is OpenWork Den?

    dev

    OpenWork Den is the organization-level control plane for managing OpenWork at scale. It provides the following capabilities:

    • Inference Management: Provision inference and control access to model providers for specific members or teams.
    • Access Control: Invite teammates, create teams, and manage permissions.
    • Policy Enforcement: Set desktop policies, restrict local model access, and control approved app versions.
    • Skill Distribution: Publish skills and plugins via marketplaces and assign them to organizations, teams, or individuals.
    • Plugin Integration: Import Anthropic-compatible plugins and expose their skills and remote MCPs through the OpenWork MCP.
  7. What is @openwork/headless-threads?

    dev

    The @openwork/headless-threads package is a client used to drive native OpenWork threads (sessions) from code without a UI. It is not a runtime; it does not add a chat engine, session store, or model gateway. Instead, it provides a typed interface over the existing OpenWork server surfaces.

    Key characteristics:

    • Native Integration: Threads created via this client are standard OpenWork sessions. You can open the same conversation in the OpenWork desktop/web UI using the same workspaceId.
    • Automated Sequencing: It handles the complex polling logic required to determine when a thread has actually "settled" (i.e., when the assistant has finished working and a new message has appeared), preventing the common mistake of assuming a turn is finished just because the server is no longer "busy."
  8. Overview of Marketplace Capability execution modes

    dev

    Capabilities in the OpenWork marketplace are categorized by how they are executed:

    • Instructional Modes (skill, command, context, agent, custom): These execute by returning a signed envelope containing provenance, raw content, an arguments schema (if present), and a short-lived bundle mount reference. They do not run arbitrary code inside den-api.
    • External MCP (mcp): These bind to existing External MCP machinery. Org admins approve the connection, and members complete OAuth if required. They are discovered via the search_capabilities and execute_capability tools.
    • Desktop Install (tool, hook, built-in extension manifests): These are intentionally excluded from the cloud-based Connect rail and are only visible on desktop install surfaces.
    • Reserved Sandbox (reserved_sandbox): A placeholder for future high-isolation execution environments (e.g., Den Worker or Claude Agent SDK runner).
  9. Understand the CodeMode supported JavaScript subset

    dev

    CodeMode is a bounded JavaScript orchestration language, not a general-purpose runtime. It is designed for tool calling and data manipulation.

    Supported Features:

    • Control Flow: if, switch, for, for...of, for...in, while, do...while.
    • Functions: Arrow functions, function declarations, closures, defaults, rest parameters, and destructuring.
    • Data Types: Plain literals, Date, RegExp, Map, Set, URL, URLSearchParams, Array, Object, and Promise.
    • Asynchronous Operations: First-class promises. Un-awaited tool calls start immediately on a supervised fiber. await is the supported way to resolve values. Promise.all, Promise.allSettled, and Promise.race are supported. At most 8 tool calls run concurrently.
    • Error Handling: try/catch and throw. Errors are real constructors (e.g., TypeError, SyntaxError) and satisfy instanceof Error.
    • Standard Library: Common Array, String, Number, Object, Math, and JSON operations.

    Key Differences from Standard JS:

    • Iterators: Map.prototype.keys(), Set.prototype.values(), etc., return arrays instead of iterators.
    • Serialization: At the host boundary (final results or tool arguments), Date and URL become strings, while RegExp, Map, Set, and URLSearchParams serialize to {}.
    • Promises: Un-awaited promises cannot cross the data boundary; they will trigger a diagnostic error instead of serializing.
    • Restrictions: eval, dynamic imports, modules, classes, generators, timers, and prototype mutation are not supported.
  10. Hide OpenWork Models upsells in self-hosted deployments

    dev

    When a desktop application is pointed at a self-hosted organization server instead of the OpenWork Cloud control plane, the application automatically suppresses all OpenWork Models upsells and marketing surfaces. This ensures that self-hosted environments only display real, connected providers and do not pitch hosted frontier models.

    Behavioral changes in self-hosted mode:

    • Model Picker: The OpenWork Models group is removed from the composer's model picker; only connected providers are listed.
    • AI Settings: The OpenWork Models banner and Subscribe button are removed from the AI settings page.
    • Workspace Setup: The provider choice step during workspace creation will only offer bring-your-own-key and the free model, omitting the Use OpenWork Models option.

    To revert to the hosted OpenWork Cloud experience and restore these surfaces, clear the organization server URL configuration in the application settings.

  11. Activate environment changes in the runtime

    dev

    Saved environment variables do not take effect immediately. They enter a 'pending' state and must be explicitly applied to the runtime environment.

    Workflow

    1. Save Changes: Add or edit a variable. A pending-changes banner will appear.
    2. Apply Changes: Click the Apply changes button. This triggers a warning modal that requires explicit user confirmation.
    3. Verification: Once applied, the pending state is cleared. Any new task created in the workspace after applying changes will have access to the updated environment variables (e.g., via process.env in a Node command).