---
title: Drives, Rooms, Tenant Apps, Listeners, and Durable Workflows
description: Share versioned filesystems with human-reviewed changesets, coordinate multi-agent swarms in Rooms, filter events at zero tokens with Listeners, and run durable Workflows.
canonical: https://docs.caveman.so/agents/drives-rooms-workflows
product: Caveman Cloud
tab: Documentation
group: Build & Deploy Agents
---

# Drives, Rooms, Tenant Apps, Listeners, and Durable Workflows

> Share versioned filesystems with human-reviewed changesets, coordinate multi-agent swarms in Rooms, filter events at zero tokens with Listeners, and run durable Workflows.

Beyond single-agent runs, Caveman Cloud provides five composable platform primitives for persistent memory, multi-agent coordination, interactive review UIs, zero-token event filtering, and durable workflows. Every primitive works from `cvm` and has a matching agent skill (`cvm skills add <name>`).

## Drives (`cvm drive`)

A **Drive** is a versioned, hash-chained cloud filesystem shared across agents and people, with access controls enforced outside compute. Mount Drives declaratively in `AGENT.md` (`drives: { /kb: support-kb, /reports: { drive: research-reports, write: true, review: true } }`). Persistent Drives are billed pay-as-you-go at \$0.05 / GB-month (see [Billing](/governance/billing#sandboxes-agent-harness-and-drives)).

```bash
cvm drive create team-kb
cvm drive put ./README.md team-kb/README.md
cvm drive ls team-kb --recursive
cvm drive grep "policy" team-kb
cvm drive cat team-kb/README.md --lines 1:40
cvm drive get team-kb/README.md ./local-copy.md
```

### History, forks, and human-reviewed changesets

Every mutation creates an immutable commit sequence (`SEQ`). Mounting a Drive with `review: true` holds agent writes in a pending changeset for human approval:

```bash
# Inspect history, diff commits, verify integrity, or restore earlier versions
cvm drive log team-kb/README.md
cvm drive changes team-kb
cvm drive diff team-kb --from 1 --to 5
cvm drive verify team-kb
cvm drive restore team-kb/README.md --version 2
cvm drive undo team-kb --session SESSION_ID

# Fork a Drive, make isolated edits, and merge back
cvm drive fork team-kb team-kb-draft
cvm drive merge team-kb-draft --dry-run
cvm drive merge team-kb-draft

# Review and approve agent-authored changesets
cvm drive review research-reports --status pending
cvm drive review research-reports CHANGESET_ID
cvm drive approve research-reports CHANGESET_ID --at SEQ
cvm drive reject research-reports CHANGESET_ID --yes
```

### Sharing and access grants

```bash
cvm drive grant team-kb/docs --to SERVICE_ACCOUNT_ID --read
cvm drive share team-kb/public --read --for 15m --label "external review"
cvm drive grants team-kb
cvm drive revoke team-kb GRANT_ID
```

When downloading directories with `cvm drive get --recursive`, sensitive control files (`.git`, `CLAUDE.md`, and similar tool-obeyed files) are skipped by default unless you pass `--include-protected`.

## Rooms & Task Threads (`cvm room`)

A **Room** coordinates humans and multi-agent swarms across decoupled conversation and task **Threads**, with atomic task leases, watchers, taint propagation, and per-thread cost rollups.

```bash
cvm room create eng-swarm
cvm room open eng-swarm "Fix flaky billing test" --body "Investigate 429 retries" --status ready
cvm room threads eng-swarm --status ready
cvm room claim eng-swarm THREAD_ID --ttl 300
cvm room post eng-swarm THREAD_ID "Root cause isolated; PR opened."
cvm room complete eng-swarm THREAD_ID
cvm room rollup eng-swarm
```

Core commands:

- **Threads & messaging**: `cvm room list`, `create`, `threads`, `open`, `post`, `read`, `wait`
- **Task leases**: `cvm room claim`, `renew`, `release`, `complete`
- **Watchers & cost**: `cvm room watch`, `rollup`

Messages marked `--untrusted` (or coming from tainted threads) propagate taint automatically to reading sessions so write approvals trigger as configured.

## Tenant Apps (`cvm apps`)

**Apps** are tenant-owned web interfaces served from a Drive (`--kind drive_static`) or a sandbox port, rendered in isolated iframes using short-lived capability-bridge tokens (`capp_...`) instead of static API keys.

```bash
cvm drive create review-ui
cvm drive put ./index.html review-ui/index.html
cvm apps create tax-review --kind drive_static --drive review-ui --scope drive:read --scope room:post
cvm apps token tax-review --ttl 3600
cvm apps fork tax-review tax-review-v2
```

Request only the narrowest scopes an interface needs (`drive:read`, `drive:write`, `room:post`, `inbox:action`). Forking an App automatically forks its backing Drive.

## Event Listeners (`cvm listeners`)

**Listeners** are TTL-bounded event sensors over webhooks, connectors, rooms, or Drive changes. Deterministic predicate filters drop non-matching events before waking any agent, spending zero LLM tokens on noise.

```bash
cvm listeners create acme-redlines \
  --source webhook \
  --target-kind room_post \
  --target eng-swarm \
  --ttl 604800 \
  --filter '{"all":[{"rule":{"path":"sender.domain","op":"eq","value":"acmecorp.com"}},{"rule":{"path":"subject","op":"icontains","value":"redline"}}]}'

cvm listeners stats acme-redlines
cvm listeners events acme-redlines
cvm listeners pause acme-redlines
cvm listeners delete acme-redlines
```

Set `--ttl` on temporary watches so listeners expire automatically.

## Durable Workflows (`cvm workflows`)

**Workflows** combine deterministic code steps, agent sessions, timers, and human Inbox approvals on one durable Session step ledger. Side-effecting steps declare explicit effects (`read`, `write`, `idempotent`, `external`) so crashes and retries replay safely without duplicating external calls.

```bash
cvm workflows create invoice-close --runtime typescript --drive finance --path workflows/invoice.ts
cvm workflows run invoice-close --input '{"invoice_id":"inv_123"}'
cvm workflows get RUN_ID
```

When a workflow calls `waitForApproval`, it parks at zero compute and surfaces an approval item in the organization Inbox.

## Install focused agent skills

Give your coding agent dedicated instructions for any of these primitives:

```bash
cvm skills add drive
cvm skills add rooms
cvm skills add apps
cvm skills add listeners
cvm skills add workflows
# Or install all focused skills at once
cvm skills add all
```

See [Cloud Skills](/cli/skills) for install paths and uninstall commands.
