Skip to content

Prepare a project workspace

Turn an existing repository into a CompozyOS workspace that agents can inspect and operate through durable sessions.

For people running agent work5 pages in this section

This flow is for a maintainer who already has a repository and wants CompozyOS to run repeatable agent work against it. The goal is not just "start an agent"; it is to make the project discoverable, give the agent a local operating brief, and leave evidence that the runtime is using the intended workspace.

Setup

Start from the repository root and confirm the daemon is reachable:

compozy status

If you do not already have a provider configured, use the provider key that matches your local runtime setup when you create the agent definition below. The example uses claude because it is a built-in provider key, not because the workspace model depends on that provider.

Flow

Rendering diagram…

A project workspace becomes useful when registration, local agent instructions, and session evidence all point at the same root.

Register the repository

Give the workspace a stable name. Use the same name in docs, scripts, and task descriptions so agents do not have to infer which checkout you mean.

compozy workspace add "$PWD" --name checkout-api --default-agent reviewer
compozy workspace info checkout-api -o json

What happened: CompozyOS registered the current directory and will resolve workspace-scoped agents, skills, and config overlays from this root.

Add a workspace-local agent

Put the agent definition in the workspace so it travels with the project and wins over global definitions of the same name.

mkdir -p .compozy/agents/reviewer

Create .compozy/agents/reviewer/AGENT.md with this content:

---
name: reviewer
provider: claude
toolsets:
  - "compozy__catalog"
  - "compozy__coordination"
permissions: approve-reads
---

You are the reviewer for this repository.

Start by identifying the changed files, relevant tests, and runtime surfaces involved.
Return blocking findings first with file paths and concrete reproduction evidence.

Then confirm CompozyOS resolves the file you just created:

compozy agent info reviewer --workspace checkout-api -o json

Run a smoke-test session

Start the default agent for this workspace and ask it to prove that it can see the intended root and local instructions.

compozy session new --workspace checkout-api --agent reviewer --name workspace-smoke -o json
compozy session prompt sess_1234 "Inspect this workspace setup. Confirm the repository root and the agent definition you can see."
compozy session events sess_1234 --follow

What happened: the session produced durable events under the workspace context. Use the emitted session id in later status and history commands.

Evidence to keep

EvidenceCommandWhat it proves
Workspace resolutioncompozy workspace info checkout-api -o jsonThe registered root, default agent, and additional roots.
Agent visibilitycompozy agent info reviewer --workspace checkout-api -o jsonThe workspace-local AGENT.md parses and wins discovery.
Session runtime statecompozy session status sess_1234 -o jsonThe live session is attached to the intended workspace and agent.
Session transcriptcompozy session history sess_1234The smoke-test answer is durable after the terminal closes.

Failure path

SymptomFirst checkNext page
Workspace resolves a different rootcompozy workspace info checkout-api -o jsonWorkspace Resolver
Agent is not foundcompozy agent info reviewer --workspace checkout-api -o jsonAGENT.md
Agent uses the wrong providercompozy agent info reviewer --workspace checkout-api -o jsonAgent Providers
Session starts but never produces outputcompozy session status sess_1234 -o jsonDebug a Failed Session

Next

On this page