Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

docs(cowork): document desktop workflows with annotated screenshots

thinhlpgb98363b3f34b
diff --git a/docs/src/components/DocsHome.tsx b/docs/src/components/DocsHome.tsx
index 87980d31f..283b59d8e 100644
--- a/docs/src/components/DocsHome.tsx
+++ b/docs/src/components/DocsHome.tsx
@@ -17,7 +17,7 @@ const SECTIONS = [
title: 'Jan Agent',
description:
'The standalone agent, distributed separately — launch autonomous coding agents against a local model.',
- tags: 'Coming soon',
+ tags: 'Quickstart · Skills · Memory',
href: '/docs/agent',
chip: 'bg-[#FDE68A]/60 text-[#92400E]',
},
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-artifact-preview.png b/docs/src/pages/docs/desktop/_assets/cowork-artifact-preview.png
new file mode 100644
index 000000000..4bb50cdfc
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-artifact-preview.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-artifacts-library.png b/docs/src/pages/docs/desktop/_assets/cowork-artifacts-library.png
new file mode 100644
index 000000000..7ae560fb4
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-artifacts-library.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-create-skill.png b/docs/src/pages/docs/desktop/_assets/cowork-create-skill.png
new file mode 100644
index 000000000..d36ff91db
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-create-skill.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-import-skill.png b/docs/src/pages/docs/desktop/_assets/cowork-import-skill.png
new file mode 100644
index 000000000..332b50f51
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-import-skill.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-plan-mode.png b/docs/src/pages/docs/desktop/_assets/cowork-plan-mode.png
new file mode 100644
index 000000000..a4289136c
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-plan-mode.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-progress-diffs.png b/docs/src/pages/docs/desktop/_assets/cowork-progress-diffs.png
new file mode 100644
index 000000000..c6216ebc2
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-progress-diffs.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-progress-files.png b/docs/src/pages/docs/desktop/_assets/cowork-progress-files.png
new file mode 100644
index 000000000..8913c0490
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-progress-files.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-progress-todos.png b/docs/src/pages/docs/desktop/_assets/cowork-progress-todos.png
new file mode 100644
index 000000000..8692e522f
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-progress-todos.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-session.png b/docs/src/pages/docs/desktop/_assets/cowork-session.png
new file mode 100644
index 000000000..6ba1cbed8
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-session.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-settings.png b/docs/src/pages/docs/desktop/_assets/cowork-settings.png
new file mode 100644
index 000000000..b25ad58b8
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-settings.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-slash-skill.png b/docs/src/pages/docs/desktop/_assets/cowork-slash-skill.png
new file mode 100644
index 000000000..e62f78510
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-slash-skill.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/cowork-working-folder.png b/docs/src/pages/docs/desktop/_assets/cowork-working-folder.png
new file mode 100644
index 000000000..93b3185fb
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/cowork-working-folder.png differ
diff --git a/docs/src/pages/docs/desktop/cowork.mdx b/docs/src/pages/docs/desktop/cowork.mdx
index 8a69c3575..772676504 100644
--- a/docs/src/pages/docs/desktop/cowork.mdx
+++ b/docs/src/pages/docs/desktop/cowork.mdx
@@ -1,203 +1,332 @@
---
title: Cowork
-description: Give Jan a task and it works on it autonomously — reading and writing files, running commands, and reporting back.
+description: Use Cowork to plan tasks, work with files, and review the results in Jan.
keywords:
- [
- Jan,
- Cowork,
- agent,
- autonomous,
- sandbox,
- workspace,
- plan mode,
- subagents,
- artifacts,
- tasks,
- ]
+ [Jan, Cowork, agent, sandbox, workspace, plan mode, subagents, artifacts, tasks]
---
import { Callout, Steps } from 'nextra/components'
# Cowork
-Cowork is Jan's agent surface. Instead of answering in one message, Jan takes a
-task, breaks it into steps, and works through them on its own — reading and
-writing files, running shell commands, searching the web, and asking you
-questions when a decision is yours to make.
+Cowork lets you give Jan a task that takes more than a single response. Jan can
+break the task into steps, read and write files, run commands, and ask questions
+when it needs your input. You can review its progress and open the files it
+creates without leaving the conversation.
-Open **Cowork** from the left sidebar and give it a task, for example:
+<Callout type="warning">
+Cowork is in preview. Features and controls may change between releases.
+</Callout>
+
+## Starting a Session
+
+<Steps>
+
+### Open Cowork
+
+Click **Cowork** in the left sidebar, then **New session**.
+
+### Choose a Model and Workspace
+
+Select a model from the model selector at the top of the window. To work on an
+existing project, use the folder control beside the message input to attach a
+project folder. Jan can read and edit files in the attached folder, so review
+its changes before keeping them.
+
+Without an attached project, Jan uses a separate workspace for the session in
+your Jan data folder. Files it creates there are available from **Files** and
+from artifact cards in the conversation.
+
+### Describe Your Task
+
+Explain what you want Jan to produce and include any constraints. For example:
+
+> Build an offline task dashboard with three cards: Draft outline, Review design,
+> and Publish notes. Save it as dashboard.html in this session's workspace.
+> Ask for approval before creating the file.
+
+You can also attach a PDF, DOCX, or other document using the **+** button beside
+the message input. Jan copies the document into the session workspace and
+extracts its text so the agent can read it. Attachments appear on your message
+and in the **Files** panel.
+
+</Steps>
+
+![Cowork session with the artifact card and session controls highlighted](./_assets/cowork-session.png)
+
+1. **Artifact card**: Click the card to preview a generated file. **Open** opens it in an external application.
+2. **Session controls**: Open Progress, Agent changes, Files, or model settings beside the message input.
+
+The screenshots show a local macOS development build of Cowork.
+
+## Choosing a Working Folder
+
+Click the folder control beside the message input, then **Attach a folder**.
+Choose the project directory in your system's folder picker.
+
+![Working folder control with Attach a folder highlighted](./_assets/cowork-working-folder.png)
+
+1. **Attach a folder**: Give Jan access to the project you want it to work on.
+
+Without an attached folder, generated files and scratch work stay in the
+session workspace. Attaching a folder lets Jan read and edit that project's
+files in place; it does not create a separate copy of the project. Describe
+which files Jan should work on, and review **Agent changes** afterward.
+Use **Plan** first if you want to review the proposed work before allowing edits.
+
+## Planning a Task
+
+Click **Plan** beside the message input, or type `/plan`, to ask Jan to plan
+before making changes. In Plan mode, Jan can read files, search, and research,
+but cannot edit files or run shell commands.
+
+Review the proposed steps and answer any questions. When Jan offers a plan,
+you can choose:
+
+- **Execute plan**: Leave Plan mode and carry out the plan.
+- **Keep planning**: Continue refining the plan.
+- **Exit plan mode**: Return to normal execution without carrying out the plan.
+
+![Plan control and an earlier approval question highlighted](./_assets/cowork-plan-mode.png)
+
+1. **Plan**: The highlighted control shows that Plan mode is enabled.
+2. **Approval question**: In this example, Jan asked for confirmation before creating the file.
+
+## Reviewing Progress and Changes
+
+Use the controls beside the message input to inspect a session. Panels open
+next to the conversation, so you can review the work while continuing to chat.
+
+### Progress
+
+Click **Progress**, or type `/todo`, to open the task checklist. It shows the
+steps and statuses recorded by the agent.
+
+![Progress panel with the task checklist highlighted](./_assets/cowork-progress-todos.png)
+
+1. **Task checklist**: Review the recorded steps and their current status.
+
+Check the panel as well as the final response. In this example, the response
+says the work is complete, but the recorded checklist still shows **0/6**.
+
+### Agent Changes
+
+Click **Agent changes** to review file changes. Expand a file to inspect its
+diff before accepting the result.
+
+![Agent changes with a file and addition markers highlighted](./_assets/cowork-progress-diffs.png)
+
+1. **Changed file**: Expand the file to inspect its changes.
+2. **Added lines**: Green `+` markers and line numbers identify additions.
+
+### Files
-- "Write a Python script that renames files by the date they were taken"
-- "Build a single-page dashboard from a CSV I'll paste in"
-- "Find every TODO in my project and group them by area"
+Click **Files** to find documents attached to the session and files generated
+by the agent. Select a file to open its preview.
+
+![Files panel with dashboard.html highlighted](./_assets/cowork-progress-files.png)
+
+1. **Session file**: Select `dashboard.html` to preview the generated dashboard.
+
+## Previewing Files
+
+Click an artifact card or select a file from **Files** to preview it beside the
+conversation. Use **Reload** after the file changes. Jan does not replace the
+preview while you are interacting with it.
+
+![HTML preview with file controls and the generated task cards highlighted](./_assets/cowork-artifact-preview.png)
+
+1. **Preview controls**: Manage network access and sandbox mode, reload the preview, open the file externally, or show it in your file manager.
+2. **Generated content**: Review the task cards without leaving the session.
+
+HTML previews are sandboxed by default, with network access off. For a trusted
+page that needs browser storage or relative assets, use the toolbar's
+unsandboxed option. This loads the page through Jan's `preview://` scheme with
+an origin separate from the app. Only registered workspace or attached-project
+folders are served.
<Callout type="warning">
-Cowork is in preview. The surface works end to end, but expect rough edges and
-changes to how it looks and behaves between releases.
+Leave network access and unsandboxed mode off for untrusted content. Preview
+network access is separate from the shell network setting in **Settings > Cowork**.
</Callout>
-## How it works
+To browse generated files across sessions, click **Artifacts** in the sidebar.
+The library groups created files by type, including Code, Image, Document,
+Video, and Audio. Files the agent only edited are not added to the library;
+review those in **Agent changes**.
-Every Cowork session gets a **sandboxed workspace** — a private directory under
-Jan's data folder (`agent-workspace/sessions/<session_id>`) where the agent can
-freely create files and run commands. Scratch work and intermediate files stay
-there, so a session can't touch anything outside it.
+### Browsing the Artifacts Library
-To work on a real project, attach a project folder with the **workspace pill**
-at the top of the session. The attached folder is mounted **read and write**:
-the agent reads, searches, and edits your files in place, while keeping its own
-scratch work in the sandbox. Every change lands in the **diff panel**, where you
-can review what the agent changed.
+Click **Artifacts** in the sidebar to browse files created across sessions.
+Use **Search artifacts** to find a file by name, and the type filter to narrow
+the results to Code, Image, Document, Video, or Audio. Choose **All** to include
+every type.
-<Callout type="info">
-Nothing leaves your machine except what you explicitly allow: model calls go to
-the provider you selected, and shell commands run inside an OS sandbox. See
-[Sandbox and network](#sandbox-and-network) below.
-</Callout>
+![Artifacts library filtered to the dashboard example](./_assets/cowork-artifacts-library.png)
-## What the agent can do
+1. **Search**: This example filters the library to `dashboard`. Filtering does not delete files.
+2. **Artifact**: Click the card to preview it, or **Open** to use an external application.
-| Capability | How it works |
-| --- | --- |
-| Files | Read, create, and edit files — in the sandbox or your attached project |
-| Shell | Run commands confined to the session workspace (where the OS allows sandboxing) |
-| Web | Search and fetch pages, following the global [Web Search](/docs/desktop/web-search) setting |
-| Memory | Keep durable facts across sessions with `memory_write` / `memory_read` |
-| Skills | Load reusable procedures with `skill_read` / `skill_write` |
-| Ask | Surface structured questions when the answer changes what it should do |
-| Subagents | Fan out self-contained jobs to background agents |
-
-A run is bounded — up to 100 agent steps and 200,000 tokens per request — so a
-stuck task can't spin forever. When the cap is hit, the agent reports where
-things stand and you can continue it with another message.
-
-## Context recovery
-
-Cowork keeps the composer minimal: model context controls appear only when a
-run exceeds its context window, rather than as a permanent toolbar button.
-For supported local models, Jan reads the model's context limit on demand and
-caps the increase at that limit. Larger context windows can require more memory.
-Other model settings remain available in the existing provider settings.
-
-When a run exceeds its context window, **Increase Context Size** applies the
-increase and resumes the committed history, including completed tool work.
-Switching sessions or models while the change is saving cancels the automatic
-retry. Unsupported limits and failed changes provide an action to open the
-relevant provider settings.
+## Background Work
-## Plan mode
+### Subagents
-Toggle **Plan mode** (or type `/plan`) when you want Jan to propose before it
-touches anything. In plan mode the agent can only read, search, and research —
-no edits, no shell commands. It investigates, stages a phased plan as a todo
-list, and asks you to review it:
+For a self-contained task, Jan can start a **subagent** with its own
+instructions and tool set. The subagent works in the background and reports
+its result to the main conversation when it finishes. This can help with tasks
+such as researching several topics or reviewing a group of files.
-- **Execute plan** — switch to normal execution and carry the plan out
-- **Keep planning** — continue refining the plan
-- **Exit plan mode** — go back to a normal run without executing
+Type `/tasks` to inspect background work. Subagent definitions are stored in
+`agent-workspace/subagents` in your Jan data folder. Jan can also start a
+one-off subagent without a saved definition.
-## Progress panels
+### Monitors and Parked Sessions
-While the agent works, four panels track the run:
+Ask Jan to watch for a condition when a task depends on something finishing.
+For example:
-- **Todos** — the canonical task list for the current job, with phases and
- statuses the agent keeps current.
-- **Tasks** — background [subagents](#subagents), their queue position and
- status.
-- **Diffs** — every change the agent made to an attached project folder.
-- **Files** — every file in the session: documents you attached to a question
- and the artifacts the agent created, grouped by type. Click one to preview it.
+> Watch for build.log to contain "BUILD FAILED" and report the matching line.
-### Attaching documents
+A monitor checks the condition in the background while Jan continues other
+work. It ends when the condition matches, it reaches its timeout, or it is
+stopped. Ask Jan to list active monitors or stop a monitor you no longer need.
+The `monitor` tool supports `start`, `list`, and `stop` operations.
-Attach a PDF, DOCX, or other document with the composer's attach button. The
-file is copied into the session workspace, its text is extracted beside it, and
-the question names both paths, so the agent can read the contents with its file
-tools. The attachment appears as a chip on your message and in the Files panel.
+A session can become **parked** when the model has answered but background
+work is still pending. A watching or waiting notice replaces the working
+spinner. The model is idle, not generating more text. A monitor notification
+or subagent result can wake the agent to continue.
-## Subagents
+## Configuring Cowork
-For work that is self-contained — a broad research sweep, going through many
-files, generating and verifying a large output — the agent can dispatch a
-**subagent**: a nested agent with its own instructions and a narrowed tool set,
-running in the background while the main conversation continues. Subagents
-report their result back when they finish, and each is capped at 30 steps.
+Open **Settings** in the left sidebar, then select **Cowork**.
-Subagent definitions live as files in `agent-workspace/subagents` inside your
-Jan data folder. The agent can also spawn one-off subagents on the fly, passing
-the role inline — no saved definition required.
+![Cowork settings with shell network access and memories highlighted](./_assets/cowork-settings.png)
-## Slash commands
+1. **Shell network access**: Control whether sandboxed commands can access the network.
+2. **Memories**: Review saved memories or click **Add** to create one. Scroll down to find **Skills**.
-| Command | Action |
-| --- | --- |
-| `/help` | List available commands |
-| `/clear` | Clear this session |
-| `/compact` | Compact the session's context into a summary |
-| `/models` | Switch the active model |
-| `/plan` | Toggle plan mode |
-| `/todo` | Open the progress panel |
-| `/tasks` | Open the background tasks panel |
-| `/init` | Study the attached project and write skills and memory for it |
+### Sandbox and Network
-`/init` is a good first move on a new project: Jan maps the directory layout,
-finds the real build and test commands, and records what it learned as
-[skills and memory](#memories-and-skills) so later sessions start informed.
+Each session has a workspace in
+`agent-workspace/sessions/<session_id>` inside your Jan data folder. An attached
+project folder gives Jan additional read and write access to that project.
-## Artifacts
+Under **Shell Commands**, check whether an OS sandbox is available. When it
+is, shell commands are restricted to permitted workspace locations. If no
+sandbox is available, Jan does not offer the shell tool rather than running
+commands without confinement.
-Files the agent **creates** — a report, a dashboard, an image, a script — are
-collected in the **Artifacts** library, grouped by type (Code, Image, Document,
-Video, Audio) and previewable in the app. Files it merely edited stay out of the
-library; those changes are visible in the diff panel instead.
+**Allow Network Access** is on by default for Cowork shell commands. Turn it
+off to prevent commands from accessing the network, such as installing packages
+or fetching a repository. This does not change the provider used for model
+requests or the separate [Web Search](/docs/desktop/web-search) setting. Model
+requests still go to the provider you selected. The main chat's shell does not
+have network access, regardless of this Cowork setting.
-## Sandbox and network
+### Memories and Skills
-Under **Settings > Cowork** you can see how the agent's shell is confined:
+Cowork stores reusable knowledge in your Jan data folder:
-- **Shell Commands** — shows whether an OS sandbox is available. When it is,
- commands can only write inside the session workspace and cannot read your
- home folder. When no sandbox is available, the bash tool is not offered at
- all — commands are never run unconfined.
-- **Allow Network Access** — lets sandboxed commands reach the network, for
- things like installing packages or cloning a repository. On by default; turn
- it off for fully offline runs. The main chat's shell never has network
- access, regardless of this setting.
+- **Memories**: Facts such as project decisions, preferences, and constraints, stored in `agent-workspace/memory`.
+- **Skills**: Reusable instructions for tasks such as releasing a project or debugging a subsystem, stored in `agent-workspace/skills`. Jan loads the full instructions when a task needs them.
-## Memories and skills
+To manage an entry in **Settings > Cowork**:
-Cowork keeps two kinds of durable knowledge in your Jan data folder
-(`agent-workspace/memory` and `agent-workspace/skills`):
+1. Click **Add** in the Memories or Skills section to create an entry.
+2. Click the pencil icon beside an existing entry to edit it.
+3. Click **Open Folder** to view the underlying files in your file manager.
-- **Memories** are short, durable facts the agent records as it learns things
- worth keeping — decisions, constraints, gotchas. One topic per note.
-- **Skills** are reusable procedures — how to cut a release, run a migration,
- debug a subsystem — written as markdown with an optional description in YAML
- frontmatter. The agent sees each skill's name and purpose, and reads the full
- text only when a task calls for it.
+You can also edit the files in your preferred editor. The formats follow the
+Jan Agent's [skills](/docs/agent/skills) and [memory](/docs/agent/memory)
+conventions.
-Both are editable from **Settings > Cowork**, where you can add, edit, and
-delete entries by hand. The formats match the [Jan Agent's](/docs/agent/skills)
-skill and [memory](/docs/agent/memory) conventions, so instructions written for
-one surface generally work on the other.
+## Using Skills
-<Steps>
+Skills give Jan reusable instructions for a task. Click **Customize** in the
+Cowork sidebar to open **Manage skills**. Check the scope shown below the
+heading; the examples here use global skills available to every session.
-### Open Cowork settings
+### Creating a Skill
-Go to **Settings > Cowork** in the app.
+1. Click **New skill**.
+2. Enter a name, such as `review-dashboard`.
+3. Write the reusable procedure in Markdown.
+4. Click **Save**.
-### Edit an entry
+![New skill editor with the name and instructions highlighted](./_assets/cowork-create-skill.png)
-Click the pencil icon next to a memory or skill, or **Add** to create one.
+1. **Skill definition**: Give the skill a descriptive name and instructions that explain what Jan should do.
-### Find the files
+For example:
-Click **Open Folder** to reveal the underlying files in your file manager.
+```text
+Review labels, keyboard navigation, and contrast.
+Report findings before changing files.
+```
-</Steps>
+Select a saved skill in the list to edit its instructions later.
-<Callout type="tip">
-Memories and skills are plain files. If you prefer, edit them directly in your
-editor of choice — the agent picks up changes on its next run.
-</Callout>
+### Installing a Skill
+
+You can import an existing skill instead of writing one from scratch.
+
+1. In **Manage skills**, click **Import from hub**.
+2. Read the available skill descriptions.
+3. Click **Import** beside the skill you want to add.
+
+![Skill hub with Import from hub and an Import button highlighted](./_assets/cowork-import-skill.png)
+
+1. **Import from hub**: Browse the available skills.
+2. **Import**: Add the selected skill to your skill collection.
+
+Review imported instructions before using them. A skill can direct Jan to
+run commands or change files when the available tools and permissions allow it.
+
+### Invoking a Skill with a Slash Command
+
+Return to the conversation and type `/` followed by part of the skill's name.
+Select the matching **SKILL** entry, add any task-specific details, and send
+the message.
+
+![Slash menu showing the saved review-dashboard skill](./_assets/cowork-slash-skill.png)
+
+1. **Skill command**: Select `/review-dashboard` to use the saved instructions.
+
+For example, use `/review-dashboard dashboard.html` to request a review of
+the generated dashboard. The visible invocation stays compact while Jan
+receives the skill's instructions. Newly saved skills appear in the menu
+without restarting the app.
+
+## Managing Context
+
+Use `/compact` to summarize the session's context when a conversation grows
+long. Model settings are available beside the message input.
+
+If a run exceeds its context window, **Increase Context Size** can increase
+the limit for supported local models and resume the conversation, including
+completed tool work. Larger context windows can require more memory. Jan
+checks the model's supported limit before increasing it. If the change is not
+supported or fails, open the relevant provider settings.
+
+Switching sessions or models while the change is saving cancels the automatic
+retry.
+
+## Slash Commands
+
+Type `/` in the message input to see available commands.
+
+| Command | Action |
+| --- | --- |
+| `/help` | List available commands |
+| `/clear` | Clear this session |
+| `/compact` | Summarize the session's context |
+| `/models` | Switch the active model |
+| `/plan` | Toggle Plan mode |
+| `/todo` | Open Progress |
+| `/tasks` | Open background tasks |
+| `/init` | Study the attached project and create skills and memory for it |
+
+Use `/init` when starting work on a new project. Jan examines the directory
+structure and build and test commands, then records what it learns for later
+sessions.