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(desktop): document the Cowork surface, labeled preview

Akarshan Biswas37edb0a64f89
diff --git a/docs/src/pages/docs/agent/memory.mdx b/docs/src/pages/docs/agent/memory.mdx
index e824b481f..32b86811f 100644
--- a/docs/src/pages/docs/agent/memory.mdx
+++ b/docs/src/pages/docs/agent/memory.mdx
@@ -41,8 +41,8 @@ Retrieval is backed by the same store Jan Desktop uses for memory, so a fact lea
available in the other.
<Callout type="info">
-Memory is shared with Jan Desktop. Settings you change there apply to what the terminal agent
-recalls, and vice versa.
+Memory is shared with [Jan Desktop's Cowork surface](/docs/desktop/cowork). Settings you change
+there apply to what the terminal agent recalls, and vice versa.
</Callout>
## Keeping it useful
diff --git a/docs/src/pages/docs/agent/skills.mdx b/docs/src/pages/docs/agent/skills.mdx
index 5d4987755..267fd42a5 100644
--- a/docs/src/pages/docs/agent/skills.mdx
+++ b/docs/src/pages/docs/agent/skills.mdx
@@ -91,8 +91,8 @@ inject = "always" # always | relevance
name and purpose in the system prompt, `relevance` selects per task.
<Callout type="info">
-Skills are shared with Jan Desktop - the same project files, through the same directory. A skill
-written in one shows up in the other.
+Skills are shared with [Jan Desktop's Cowork surface](/docs/desktop/cowork) - the same project
+files, through the same directory. A skill written in one shows up in the other.
</Callout>
## Skills, AGENT.md, and memory
diff --git a/docs/src/pages/docs/desktop/_meta.json b/docs/src/pages/docs/desktop/_meta.json
index 9d1ac2427..204deb45b 100644
--- a/docs/src/pages/docs/desktop/_meta.json
+++ b/docs/src/pages/docs/desktop/_meta.json
@@ -12,6 +12,7 @@
"title": "Core concepts",
"type": "separator"
},
+ "cowork": "Cowork (Preview)",
"projects": "Projects",
"assistants": "Assistants",
"web-search": "Web Search",
diff --git a/docs/src/pages/docs/desktop/cowork.mdx b/docs/src/pages/docs/desktop/cowork.mdx
new file mode 100644
index 000000000..9b5c1ae64
--- /dev/null
+++ b/docs/src/pages/docs/desktop/cowork.mdx
@@ -0,0 +1,180 @@
+---
+title: Cowork
+description: Give Jan a task and it works on it autonomously — reading and writing files, running commands, and reporting back.
+keywords:
+ [
+ Jan,
+ Cowork,
+ agent,
+ autonomous,
+ 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.
+
+Open **Cowork** from the left sidebar and give it a task, for example:
+
+- "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"
+
+<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.
+</Callout>
+
+## How it works
+
+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.
+
+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.
+
+<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>
+
+## What the agent can do
+
+| 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.
+
+## Plan mode
+
+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:
+
+- **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
+
+## Progress panels
+
+While the agent works, three panels track the run:
+
+- **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.
+
+## Subagents
+
+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.
+
+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.
+
+## Slash commands
+
+| 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 |
+
+`/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.
+
+## Artifacts
+
+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.
+
+## Sandbox and network
+
+Under **Settings > Cowork** you can see how the agent's shell is confined:
+
+- **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 and skills
+
+Cowork keeps two kinds of durable knowledge in your Jan data folder
+(`agent-workspace/memory` and `agent-workspace/skills`):
+
+- **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.
+
+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.
+
+<Steps>
+
+### Open Cowork settings
+
+Go to **Settings > Cowork** in the app.
+
+### Edit an entry
+
+Click the pencil icon next to a memory or skill, or **Add** to create one.
+
+### Find the files
+
+Click **Open Folder** to reveal the underlying files in your file manager.
+
+</Steps>
+
+<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>
diff --git a/docs/src/pages/docs/desktop/data-folder.mdx b/docs/src/pages/docs/desktop/data-folder.mdx
index c96fd8164..35e624583 100644
--- a/docs/src/pages/docs/desktop/data-folder.mdx
+++ b/docs/src/pages/docs/desktop/data-folder.mdx
@@ -57,6 +57,12 @@ The data folder location can be customised from **Settings > General > Jan Data
Inside the data folder you will typically find:
```sh
+/agent-workspace/
+ /memory/
+ /skills/
+ /subagents/
+ /sessions/<session_id>/
+ /threads/<thread_id>/
/assistants/
/jan/
assistant.json
@@ -90,6 +96,13 @@ Inside the data folder you will typically find:
thread.json
```
+### `agent-workspace/`
+The [Cowork](/docs/desktop/cowork) agent's home. Memories (`memory/`), skills
+(`skills/`), and saved subagent definitions (`subagents/`) live here
+permanently. Each Cowork session gets an ephemeral sandbox under
+`sessions/<session_id>/`, and chat threads that use agent tools get one under
+`threads/<thread_id>/` — the agent can only write inside its own sandbox.
+
### `assistants/`
Where AI personalities live. The default one (`/assistants/jan/`):
diff --git a/docs/src/pages/docs/desktop/index.mdx b/docs/src/pages/docs/desktop/index.mdx
index 94dcc6b34..d0875a5ce 100644
--- a/docs/src/pages/docs/desktop/index.mdx
+++ b/docs/src/pages/docs/desktop/index.mdx
@@ -24,7 +24,7 @@ keywords:
import { Callout } from 'nextra/components'
import { DocCard, DocCards } from '@/components/DocCard'
-import { Rocket, Package, Bot, Plug, Monitor, Globe, Server, Brain, Terminal, Layers, MessageCircle } from 'lucide-react'
+import { Rocket, Package, Bot, Plug, Monitor, Globe, Server, Brain, Terminal, Layers, MessageCircle, Hammer } from 'lucide-react'
# Overview
@@ -39,6 +39,7 @@ Jan is an open-source replacement for Claude and ChatGPT. It comes with built-in
<DocCards>
<DocCard title="Quickstart" href="/docs/desktop/quickstart" icon={<Rocket size={20} />}>Install Jan on macOS, Windows, or Linux and chat with AI in minutes — no account needed.</DocCard>
<DocCard title="Models" href="/docs/desktop/jan-models/jan-code-4b" icon={<Package size={20} />}>Jan ships with foundation models built for reasoning, agents, and deep research — ready to run on your computer.</DocCard>
+ <DocCard title="Cowork (Preview)" href="/docs/desktop/cowork" icon={<Hammer size={20} />}>Give Jan a task and it works on it autonomously — files, commands, and web research.</DocCard>
<DocCard title="Agents" href="/docs/agent" icon={<Bot size={20} />}>Autonomous AI agents that run on your hardware — read files, manage calendars, and take actions via WhatsApp, Discord, or Slack.</DocCard>
<DocCard title="Integrations" href="/docs/desktop/integrations/claude-code" icon={<Plug size={20} />}>Connect Jan with Claude Code, OpenClaw, MCP servers, and more.</DocCard>
</DocCards>
diff --git a/docs/src/pages/docs/desktop/quickstart.mdx b/docs/src/pages/docs/desktop/quickstart.mdx
index 4ceb060f5..42b08e3b2 100644
--- a/docs/src/pages/docs/desktop/quickstart.mdx
+++ b/docs/src/pages/docs/desktop/quickstart.mdx
@@ -18,7 +18,7 @@ keywords:
import { Callout, Steps } from 'nextra/components'
import { Link } from 'nextra-theme-docs'
import { DocCard, DocCards } from '@/components/DocCard'
-import { FolderOpen, Bot, Cpu, Plug, Brain } from 'lucide-react'
+import { FolderOpen, Bot, Cpu, Plug, Brain, Hammer } from 'lucide-react'
# QuickStart
@@ -97,6 +97,7 @@ See all [Cloud Providers](/docs/desktop/remote-models/openai) for per-provider s
Jan is more than a chat interface. Organize your work with Projects, build custom Assistants, run autonomous Agents, and connect external tools via MCP.
<DocCards>
+ <DocCard title="Cowork (Preview)" href="/docs/desktop/cowork" icon={<Hammer size={20} />}>Hand Jan a task it works through on its own — in a sandbox or directly on your project.</DocCard>
<DocCard title="Projects" href="/docs/desktop/projects" icon={<FolderOpen size={20} />}>Organize conversations with shared instructions and files.</DocCard>
<DocCard title="Assistants" href="/docs/desktop/assistants" icon={<Bot size={20} />}>Set up a personal AI assistant tailored to how you work.</DocCard>
<DocCard title="Agents" href="/docs/agent" icon={<Cpu size={20} />}>Autonomous AI that reads files, manages calendars, and takes actions.</DocCard>