Learn

Core concepts

Precise definitions, constraints, and CLI/API names for Cohub's core objects — Space, Chat, Save, Sandbox, Local Runtime, Board, App, Channel, Space Hook, Space Wallet, and roles.

This page defines each core object in Cohub, its operating constraints, and the name it uses in the CLI and API.

Space

A Space is the isolated workspace boundary that holds Chats, files, Saves, Tasks, Boards, Apps, and settings.

  • Every user has a personal Home Space (slug home). When -s <space> and COHUB_SPACE_ID are omitted outside a directory bound to a Local Runtime, cohub prompt, completion, decision, generate, apps, and public fall back to home.
  • Space URLs use your username and slug (/:username/:spaceSlug), or the Space ID (/spaces/:id).

Chat

A Chat is a conversation context inside a Space, with its own message history, turns, forks, model/harness selection, and optional Chat-level access override.

  • Multiple Chats run independently inside one Space while sharing the same underlying files.
  • In the CLI and API, a Chat is a session (cohub spaces sessions).

Agent

An Agent executes work inside a Space on behalf of a Chat turn or automation trigger. It reads and edits workspace files, runs commands inside the Sandbox or connected Local Runtime, invokes Skills, and streams outputs back into the Chat.

Save

A Save is an immutable snapshot of a Space's workspace state. In the CLI and API, a Save is a checkpoint (cohub spaces checkpoints).

  • Supported actions: inspect the snapshot file tree and contents, view diffs against its parent or another Save, or fork a new independent Space via New Space (/spaces/new?checkpointId=<id>) or cohub spaces create --checkpoint <id>.
  • Constraint — no in-place restore: Saves cannot roll back or overwrite the current Space in place. To resume from an earlier Save, fork a new Space from it.
  • Concurrency limit: Only one Save task can run per Space at a time; submitting a second Save while one is in progress returns HTTP 409.

Files

Files are the Space filesystem — /workspace in a cloud Sandbox, or the bound local project directory under a Local Runtime. Files are the source of truth edited by people and Agents, snapshotted by Saves, and published as Apps or public assets.

Sandbox

A Sandbox is the cloud execution environment backing a Space. It runs shell commands and services, runs optional .cohub/setup startup scripts, applies configured environment variables and mounted Mods, and exposes ports for preview or App publishing.

Local Runtime

A Local Runtime connects a directory on your own machine to a Space via cohub runtime up, letting Agents run through a local Harness (cohub, pi, codex, claude, workbuddy, cursor, or antigravity) against local files.

  • Constraint: A Space holds at most one active Local Runtime connection at a time; users choose a Harness rather than a host machine.
  • See Local Runtime for setup, harness sync, and troubleshooting, and Files & Sandbox for cloud vs. local boundaries.

Board

A Board is a .board JSON document with three top-level collections: board (canvas settings), items (frames, text, shapes, draw paths, arrows, media, and cards), and animations (keyframed property tracks).

  • Constraints: Only frame items can act as parents for child items; items can attach scripts for local interaction, and a .board file can be published as a Board App.
  • See Boards for authoring, animations, scripts, and export, and Apps for publishing Board Apps.

App

An App is a published web surface built from a single HTML file, a .board file, a static directory, or a live Sandbox port. Apps are versioned, support public or space visibility, declare permission scopes when accessing Cohub runtime APIs, and resolve at:

/:username/:spaceSlug/w/:appSlug

Channel

A Channel connects an external messaging platform to a Space so incoming messages map to Chats and Agent replies route back to the platform.

  • Supported external platforms: Discord, Feishu / Lark, WeChat, and QQ.
  • Constraint: Telegram is not supported. Channels are created under Account Settings → Channels (/settings/channels) and bound to a Space under Space Settings → Channels.
  • See Channels for binding and routing behavior.

Label

Labels organize Chats, Saves, and files inside a Space.

  • System labels record attribution automatically, including Chat source (session-source:* such as web, desktop, mobile, cli, feishu, wechat, discord, qq, scheduled_task, and space_hook) and initiator (session-initiator:* for human, agent, or automation).
  • User labels provide custom grouping and sidebar filtering.
  • See Profile, Labels & Referrals for managing personal and Space labels.

Mod

A Mod mounts another Space into the current Space as read-only context under /mods/<slug>, allowing shared Skills, prompts, and tooling without copying files.

  • Constraint: Adding, enabling, disabling, renaming the mount slug, or removing a Mod requires restarting the Sandbox to take effect.
  • See Mods, Skills & Prompts for mounting Mods and layering context.

Skill

A Skill is a reusable capability bundle invoked from the Chat composer (such as /skill:<name>) or loaded by an Agent. Skills can come from the Space, user config, platform defaults, or mounted Mods. See Mods, Skills & Prompts for skill discovery and prompt templates.

Task

A Task is an asynchronous execution record for background work such as Save creation, media generation, Space Hook runs, and long-running jobs. In the CLI and API, this is a task run (cohub tasks). See Tasks & Scheduled prompts for inspecting runs and failure states.

Scheduled prompt

A Scheduled prompt sends a prompt later — once via --delay-ms or --at <iso>, or repeatedly via a 5-field --cron expression with an IANA --timezone. In the CLI and API, recurring schedules are cron jobs (cohub cron-jobs) created via cohub prompt. See Tasks & Scheduled prompts for schedule management.

Space Hook

A Space Hook declares asynchronous Space automation in .cohub/hooks/*.yml, .cohub/hooks/*.yaml, or .cohub/hooks/*.json (schema: cohub.space-hook.v1).

  • Constraints: One file defines one hook (its file path is its identity); each hook reacts to a Space event (such as space.fs.changed, checkpoint.created, or session.turn.finalized) and must specify exactly one action: run, prompt, or uses.
  • See Space Hooks & Webhooks for schemas, events, actions, and incoming webhooks.

Space Wallet

A Space Wallet holds a per-Space usage balance separate from Space Commerce, funded by signed-in users with space.view (or any signed-in user via /spaces/:id/fund when the host enables public funding).

  • Constraints: Usage settlement is all-or-nothing (if the Space Wallet covers the full charge, it pays; otherwise the triggering user pays in full — no split payments), withdrawals are not supported, and funding grants no additional Space access.
  • See Billing, Wallet & Commerce for funding, settlement rules, and Space Commerce.

Permission and roles

Space access is governed by three roles with strict capability boundaries:

Role Allowed Not allowed
host Full Space control: profile and settings, members and access policies, channels, mods, sandbox management, label management, commerce, and all builder capabilities —
builder View/edit Chats, send full-access prompts, manage Chat-level access, edit files, create Saves, run commands, generate media, manage Apps and scheduled prompts, assign labels, view members/channels/mods/sandbox/tasks Cannot edit Space profile, manage members/invites/access policies, create or delete Space labels, or manage channels, mods, sandbox, or commerce
guest Read-only access: view Space, labels, Chats, Saves, and filtered files (file.view.filtered) Cannot send prompts, edit files, create Saves, execute commands, manage Apps/schedules, or view Tasks

Space Settings → Access also configures default access for signed-in users (no access, guest, or builder) and anonymous visitors (no access or guest only). Apps declare their own permission scopes and request viewer consent before accessing runtime APIs. See Members, invites & access for the full role matrix, invite links, and Chat-level access overrides.

Boundaries and common misconceptions

  • Save ≠ in-place rollback: A Save only lets you inspect files, compare diffs, and fork a new Space. It never rewinds the current Space.
  • Channel platform list: Only Discord, Feishu/Lark, WeChat, and QQ are supported. Telegram is not supported. CLI channel management is not currently publicly documented; configure channels in the web UI.
  • Role escalation limits: Anonymous visitors cannot be granted builder access; builder members cannot modify Space Settings sections owned by host (Profile, Members/Access policy, Mods, Channels, Sandbox, Commerce).
  • No split payments on Space Wallet: Charges never split across a Space Wallet and a personal balance.

Next steps

  • Quick start — run through the Space → Chat → Save → App flow
  • Product map — see where each object appears in the web UI
  • Spaces — configure and manage Spaces
  • Saves — inspect, diff, and fork snapshots
  • Apps — publish HTML, Board, directory, and port Apps
  • CLI — work with these objects from the terminal