Workspaces
Send a task to a Workspace, run several agents at once and merge their changes, read saved versions of the files, and see what is kept between runs.
Plori runs AI agents in cloud Workspaces. Give an agent a task and keep its files for the next run.
A Workspace holds the files of one project, saved versions of those files, a
conversation and the run history. Use it from the web app, the plori CLI, the
MCP server or the REST API.
How do I send a task to a Workspace?
- Create the Workspace. In the web app, select New workspace on the
dashboard. Over MCP, call
create_workspace. From the CLI, runplori workspace create <name> --idempotency-key <key>. - Send the task. In the web app, type it in the Workspace conversation. Over
MCP, call
send_workspace_messagewithworkspace_idandmessage. - Wait for the run to end. Over MCP, if the status is
running, callget_run_resultwithworkspace_idand therun_idfrom step 2 afterpoll_after_seconds. If the status isawaiting_input, approve the action at itsapprove_urlin the Plori web app if you can act, or answer the question withanswer_pending_input. - Make sure that the files are saved:
file_source.stateisreadyand the result has nosave_failure. A completed run alone does not show this. - Read the files. In the web app, open the Files panel. Over MCP, call
read_workspace_filewithworkspace_idandpath.
Share a Workspace
Sharing gives a person access to every Workspace in the account. Each invitee uses their own login, API keys and OAuth sessions.
- As the owner, open Settings → Members.
- Invite the person's email address with role
memberorviewer. - Ask the invitee to open the invitation and sign in with that email address.
A viewer can read files, runs and requests. A member can also send tasks, create
workers and accept or reject changesets. Workspace lists show the owning account
and your role. To create a Workspace in a shared account, pass its user id as
account over MCP or account_id in REST. Omit it to use your own account.
A worker's approvals and questions go to the person who created the worker. The manager's requests go to the account owner. The owner can also answer a worker's request. Other members can read it and may answer after the account's assignment timeout, 30 minutes by default. Viewers never answer. Standing grants and secret answers remain owner-only. MCP clients cannot approve actions.
The owner can set a monthly spend cap for each member. When the member reaches
it, new run starts return 402. A run admitted below the cap can spend past it.
Runs use the account's balance and connections.
Members and viewers can list a Workspace's schedules and workflows and open its published site. Only the owner can change schedules, workflows and the site, use port previews, change Workspace settings or delete a Workspace.
How do I run several agents at once?
Send the whole task to the Workspace. Its manager agent gives separate parts to workers. Each worker edits its own copy of the Workspace files.
Plori merges a finished worker's saved changes into the Workspace files automatically when they merge cleanly. The manager resolves conflicts and checks the combined result. Workers started through the CLI, MCP or REST API follow the same rules.
A worker that fails, stops or waits for input keeps its saved revision. Plori does not merge those changes automatically. The manager can still submit the saved revision if the work should be included. A worker with no file changes has nothing to merge. A new worker starts from the current Workspace files. When capacity is busy, workers wait in a queue.
Start the workers from an MCP client
The CLI guide gives the same procedure for the CLI.
- Create a worker with
create_workspace_worker. Giveworkspace_id,taskand a newidempotency_key. Do this step again for each worker. - Call
get_workspace_workerto check the run and its saved files. A ready save alone does not mean the changes are in the Workspace files. - When the worker has a
changeset_id, callget_workspace_changesetuntilstateisaccepted. Plori completes a clean merge automatically. If the changeset has conflicts, the manager resolves them. - Read the combined files with
read_workspace_fileandworkspace_id.
To read the reply of a worker, call get_run_result with workspace_id and
the run_id from get_workspace_worker. To send a correction to a running
worker, call steer_workspace_worker. To stop the workers, call
stop_workspace_task_group.
Which changes does Plori merge automatically?
A finished worker's saved changes merge automatically when they change at least one file and have no conflicts. The task group must still be open, and the worker must not be stopped. Plori waits for an active run on the Workspace files to end before it merges worker changes.
A failed or stopped worker's saved revision stays available for the manager to submit. The same applies while a worker waits for input. For a worker with conflicts, the manager submits the same saved revision, resolves the conflicts and accepts the result.
You can also submit a saved revision with submit_workspace_changeset and
worker_request_id. If Plori already submitted that save, the call returns its
changeset. A submitted changeset with no changes or with resolved conflicts
waits for review. Plori accepts a submitted changeset with changes and no
conflicts automatically. No setting turns this off.
In get_workspace_changeset, auto_accept is pending, accepted or
abandoned. If you call accept_workspace_changeset on a changeset that Plori
accepts, you get its current view.
What do I do when a merge is refused?
409 current_revision_conflict: another merge finished first. For a manual submission, callsubmit_workspace_changesetagain.409 workspace_changeset_unresolved: the comparison is incomplete or the changes have conflicts. The manager resolves conflicts. You can send a message to the Workspace to ask it to resolve a conflicted changeset.409 workspace_changeset_busy: a run or a file operation is active in the Workspace. Try again when it ends.
How do I put a file into a Workspace?
In the web app, use the paperclip beside the message box to attach PDFs, images,
text, or code. Images can be PNG, JPEG, WebP, or GIF. Text and code must be UTF-8,
up to 8 MiB per file. Supported types include CSV, Markdown, JSON, and source code.
Spreadsheets such as .xlsx and archives such as .zip need an upload over MCP.
When you send the message, Plori saves the attachments and starts an agent run.
It gives the agent their paths. In Files, look under .plori/attachments.
Stored filenames use a SHA-256 hash of the contents, with .txt for text and code,
.pdf for PDFs, and .jpg for images converted to JPEG. For example, data.csv
is stored as <sha256>.txt. The conversation shows the original filenames for
text, code, and PDF attachments.
Upload over MCP
To upload another file type or choose its path, call upload_workspace_file
with workspace_id and path over MCP. If a file is at path, the new file
replaces it.
- For UTF-8 text of 262144 bytes or less, give the text in
content. The tool saves the file in the current revision before it returns. - For a larger file or a binary file, do not give
content. The result hasupload_urland acurlcommand. In the command, replaceLOCAL_FILEwith the path of your file. Then run the command in a shell within 10 minutes. The file can be 32 MiB or less. The URL accepts one upload and needs no other credential.
After a successful upload to a Workspace with revision storage,
read_workspace_file can read the file immediately. New workers start with that
revision.
If a run uses the files of the Workspace, the write fails with
409 agent_busy. Try again when the run ends. Only the account owner can write
files. A member or a viewer gets 403.
Can I publish while an agent is running?
Yes. Publish saves the root working copy and publishes that saved revision. The agent continues its run. If storage is unavailable or another storage operation holds the copy, Publish returns an error so you can retry.
How do I read saved versions of the files?
The API calls a saved version a revision. Call read_workspace_file with
workspace_id, path and revision_id:
- Omit
revision_idto read the current files. - Give the
saved_revision_idfromget_workspace_workerto read the files of one worker. - Give the
incoming_revisionorresult_revisionfromget_workspace_changesetto read the files before or after a merge.
The call returns text files up to 262,144 bytes and refuses binary files with
415. Download binary files from the Files panel or the
REST API.
What is kept between runs?
Only the files under /workspace. Software that a run installs in other
locations, and processes that a run starts, are not kept.
Plori tries to save changed files every 60 seconds during a run, and again when
the run ends. A save can be late or fail, so check the save state, not the time:
file_source.state for a run, save_state for a worker. If a
copy is lost, Plori restores the last saved version. Writes after that save are
lost.
What are the limits?
- Tokens: runs of a registered account have no token limit. The credit balance
limits spend, and a member can also have a monthly spend cap.
max_turn_tokensoncreate_workspace_workerorsend_workspace_messagesets an optional ceiling for one run, 5,000,000 at most. A task group's token figure does not limit its workers. - Time: each run stops at its plan's time limit, and a run with no progress for 20 minutes also stops. The run's files are saved, and a new message continues the task.
- Workers: worker agents do not count against the plan's agent limit, and no plan limits how many workers run at once. A worker waits for a free VM when the platform is busy.
- Cost:
get_workspace_costsreturns the amount charged. A null amount means unknown, not zero. - Saved versions: at the limit, Plori deletes the oldest unused saved versions.
If every slot is in use, saves fail with
workspace_storage_limit_reacheduntil running work ends. - Deletion:
delete_workspacereturns a confirmation link. After the account owner confirms in the web app, Plori deletes the files and history in a background cleanup.
What about agents created before Workspaces?
Existing agent, run and session IDs continue to work. Each agent created before Workspaces has its own Workspace. If you delete the agent, Plori also deletes its Workspace. To keep the Workspace, retire the agent instead.