Skip to main content

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

  1. Navigate to Workspaces in the sidebar (admin-only access)
  2. Click New Workspace
  3. 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 SourceNone, GitHub, or TFS
  4. Click Create

The workspace creator is auto-assigned to the workspace.

Configuration

SettingDescription
NameDisplay name
Git URLOrigin URL for clone/fetch/push
Default BranchStarter branch for new sessions
Git PATWorkspace-level token (GitHub or Azure DevOps)
Ticket SourceNone, GitHub Issues, or TFS Work Items
Tickets Sync ToggleEnable/disable external sync
GitHub Label FiltersSync only issues with matching labels
Auto-Start RulesTag-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:

SettingDescription
Task NameDisplay name
Working DirectoryWhere the script runs
Script TypeAuto, Bash, or PowerShell
Script ContentThe actual script

Reference these by name from any hook or workflow Task step.

Workspace users

RuleBehavior
Admin Auto-AccessAdmins access every workspace without explicit assignment
Explicit AssignmentNon-admins must be added to a workspace to see it
Auto-Assign CreatorCreator is added on workspace creation
Per-User TFS PATEncrypted, 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:

FieldDescription
TFS URLOrg URL
TFS PATWorkspace-level token
TFS ProjectTarget project
TFS RepositoryTarget repo
Area Path FiltersSync only items under matching paths
Tag FiltersSync only items with matching tags
Status MappingMap TFS states ↔ Polygent ticket stages
Default FieldsDefaults 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 ModePull 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

PermissionCapability
workspaces.viewView workspaces you're assigned to
workspaces.createCreate new workspaces
workspaces.editEdit workspace config
workspaces.deleteDelete workspaces
workspaces.usersManage 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.