Workspaces
A workspace binds Polygent to a Git repository and is the unit of multi-tenant isolation. Users, sessions, tickets, bots, environment variables, hooks, tasks, and templates all live inside a workspace.
Creating a workspace
- Navigate to Workspaces in the sidebar (admin-only access)
- Click New Workspace
- Fill in:
- Name — display name
- Git URL — repository origin
- Default Branch — main / master / develop / etc.
- Git PAT — personal access token (optional, for private repos and PR creation)
- Ticket Source —
None,GitHub, orTFS
- Click Create
The workspace creator is auto-assigned to the workspace.
Configuration
| Setting | Description |
|---|---|
| Name | Display name |
| Git URL | Origin URL for clone/fetch/push |
| Default Branch | Starter branch for new sessions |
| Git PAT | Workspace-level token (GitHub or Azure DevOps) |
| Ticket Source | None, GitHub Issues, or TFS Work Items |
| Tickets Sync Toggle | Enable/disable external sync |
| GitHub Label Filters | Sync only issues with matching labels |
| Auto-Start Rules | Tag-based preset assignment for incoming tickets |
Custom system prompts
Set workspace-specific prompts that augment the base system prompt for each context:
- Chat Mode — applied to Chat sessions
- Develop Mode — applied to Develop sessions
- Merge Conflicts — applied to AI-assisted merge resolution
- Insights — applied to insight extraction
Environment variables
Define environment variables that get injected into sessions and hook tasks:
- Create / Update / Delete individual variables
- Import / Export as a batch (for moving between environments)
These are workspace-scoped, separate from system-wide environment variables.
Session hooks
Configure hooks at the workspace level — see Session Hooks in the Sessions guide.
Workspace tasks
Named scripts reusable by sessions, hooks, and workflows:
| Setting | Description |
|---|---|
| Task Name | Display name |
| Working Directory | Where the script runs |
| Script Type | Auto, Bash, or PowerShell |
| Script Content | The actual script |
Reference these by name from any hook or workflow Task step.
Workspace users
| Rule | Behavior |
|---|---|
| Admin Auto-Access | Admins access every workspace without explicit assignment |
| Explicit Assignment | Non-admins must be added to a workspace to see it |
| Auto-Assign Creator | Creator is added on workspace creation |
| Per-User TFS PAT | Encrypted, max 500 chars, managed via the user's Profile |
Add or remove users via the workspace Members section.
TFS / Azure DevOps configuration
If Ticket Source is TFS:
| Field | Description |
|---|---|
| TFS URL | Org URL |
| TFS PAT | Workspace-level token |
| TFS Project | Target project |
| TFS Repository | Target repo |
| Area Path Filters | Sync only items under matching paths |
| Tag Filters | Sync only items with matching tags |
| Status Mapping | Map TFS states ↔ Polygent ticket stages |
| Default Fields | Defaults applied when creating TFS bugs |
Each user can also store their personal TFS PAT under their Profile (per-workspace, encrypted).
Tickets configuration
Per-workspace ticket behavior:
- Skip QA Approval — Developer Approval flows directly to the Pull Request stage
- Merge Mode — Pull Request (open a PR) or Direct Merge (merge straight to starter branch)
Start Ticket Templates
Presets that pre-fill the ticket creation form (provider, model, workflow, session toggles, etc.):
- Create / Edit / Delete templates
- Set Default — applied when no template is chosen at creation time
Export / Import
Move a workspace's configuration between environments:
- Export the full workspace config (excluding secrets) as JSON
- Import to clone a workspace setup elsewhere
Examples
Onboard a new repository in minutes
Create a workspace pointing at the repo's Git URL with main as the default branch and a Git PAT. Add an on-init hook that installs dependencies and an on-agent-finish hook that runs the test suite. Now every session in this workspace starts ready-to-build and self-tests after each turn — no per-session setup.
Standardize how the team starts tickets Define a Start Ticket Template that pre-selects your bug-fix workflow, Auto mode, and the CodeReview + Verification toggles, then Set Default. Every new ticket in the workspace inherits the right configuration with one click.
Clone a proven setup to a second repo You've tuned a workspace with custom prompts, hooks, tasks, and templates. Export its config to JSON and Import it into a new workspace for a sibling repo — the whole setup (minus secrets) is reproduced, so you re-enter only the Git URL and PAT.
Scope an external tracker to just your team's work
Set Ticket Source to TFS, point it at your Azure DevOps project, and add Area Path Filters plus Tag Filters so only your team's Bugs sync in. Combine with Auto-Start Rules so a auto-fix-tagged work item queues itself automatically. See Ticket Sync.
Pin sensitive config to per-user identity Leave the workspace-level Git PAT for read/clone, but have each member store their personal Azure DevOps PAT under their Profile so PRs are created under their own identity for a clean audit trail.
Permissions
| Permission | Capability |
|---|---|
workspaces.view | View workspaces you're assigned to |
workspaces.create | Create new workspaces |
workspaces.edit | Edit workspace config |
workspaces.delete | Delete workspaces |
workspaces.users | Manage workspace membership |
Admins bypass all checks. Non-admin users must hold the matching permission and be assigned to the workspace.
CRUD summary
Standard operations are available: create, read, update, delete. The UI surfaces these via the workspace settings page; programmatic access is via the REST API.