What is a Workspace?
A workspace represents a project or codebase with its own configuration, sources, and sessions. Workspaces provide isolation boundaries for:- Sources - MCP servers and API connections
- Sessions - Conversation history and state
- Themes - Custom color schemes
- Permissions - Custom safety rules
- Statuses - Workflow labels (Todo, In Progress, Done, etc.)
Workspaces are the configuration boundary, while sessions are the conversation boundary. Think of workspaces as projects, and sessions as conversations within those projects.
Workspace Structure
Each workspace is stored at~/.craft-agent/workspaces/{workspace-id}/:
Workspace Configuration
Theconfig.json file contains workspace metadata:
Example Configuration
Workspace Storage Location
Default Location
Workspaces are stored at~/.craft-agent/workspaces/ by default:
Workspace ID Format
Workspace IDs are generated from the creation date and folder name:Workspace IDs are stable and don’t change if you rename the workspace folder. The
name field is read from the folder name on each launch.Multiple Workspaces
Craft Agents supports multiple workspaces with independent configurations:Workspace Discovery
Workspaces are auto-discovered in the default location:Creating a Workspace
Programmatic Creation
Validation
Workspaces must have:- A valid
config.jsonwithid,name, androotPath - A
sources/directory - A
sessions/directory
Workspace-Level Sources
Sources (MCP servers and API connections) are scoped to workspaces:- config.json - Connection settings (command, args, env, auth)
- guide.md - Usage instructions shown to the agent on first use
Learn More About Sources
Deep dive into source configuration and types
Workspace-Level Permissions
Custom permission rules override global defaults:Additive Merging
Workspace permissions extend global defaults:Permission Configuration
Learn about permission rules and safe mode
Workspace Themes
Workspaces can override the global theme:6-Color System
Themes define 6 semantic colors:Background color (canvas, panels)
Text and icon color
Primary brand color (buttons, links) - default
#8B5CF6Informational color (badges, status)
Success states (completed tasks)
Error and destructive actions
Switching Workspaces
- Closes all sessions in the current workspace
- Loads sources from the new workspace
- Restores the last active session (if any)
Best Practices
One Workspace Per Project
One Workspace Per Project
Create a dedicated workspace for each codebase or project. This ensures:
- Sources are project-specific (e.g., Linear for project A, Jira for project B)
- Sessions don’t mix contexts from different projects
- Themes and permissions match the project’s needs
Use Descriptive Names
Use Descriptive Names
Workspace names appear in the UI and file paths. Use clear, memorable names:
- Good:
craft-agent,personal-website,client-acme - Bad:
project1,test,new-workspace-2
Configure Permissions Early
Configure Permissions Early
Set up workspace-level permissions before enabling sources:
Version Control guide.md
Version Control guide.md
Source
guide.md files contain usage instructions. Commit them to git:Related Concepts
Sessions
Conversation boundaries within workspaces
Sources
Configure MCP servers and API connections
Permissions
Custom safety rules and safe mode
Themes
Color schemes and visual customization