协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
plori【开发与工程】Run AI agents in plori Workspaces from an MCP client, the plori CLI or REST. Covers sign-in, Workspaces, tasks and replies, running several agents and completing their merge, approvals, and scheduled runs.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
If you were asked to set up plori, follow Connect below: add the plori MCP server to this client, have the account owner sign in, and confirm the tools respond before you report success.
Plori runs AI agents in cloud Workspaces. Several agents can work on one project at once, and
Plori merges their changes back into the Workspace. A Workspace holds a project's files under
/workspace, saved versions of those files, a main conversation and the run history.
If this client already lists Plori tools and list_workspaces answers, skip this section.
MCP: Streamable HTTP at https://api.plori.ai/mcp.
Authorization: Bearer plori_sk_....Read these instructions in the current conversation before starting authentication.
Installing a skill or plugin is optional. Use this flow only in interactive Claude Code
when its Plori MCP client exposes both authenticate and complete_authentication.
Other clients use their ordinary OAuth or API-key setup above.
If this Claude Code build does not expose both authenticate and
complete_authentication, use /mcp instead. Pick plori, choose Authenticate, then
sign in with the emailed code. If the browser cannot reach the localhost callback,
Claude Code prompts for it directly in its own dialog, never in chat. Then verify with
list_workspaces.
https://api.plori.ai/mcp; do not add duplicate entries or replace a different
server with the same name. If missing, configure it once with
claude mcp add --transport http plori https://api.plori.ai/mcp.
Confirm the server is available in this conversation before authenticating. Saving
configuration alone does not prove that it loaded. If its tools are missing, ask
the user to type /reload-plugins in this Claude Code conversation, then resume
these steps in the same session. This also refreshes MCP configuration when no
plugins are installed. It is a user command; do not try to invoke it through the
Skill tool. Confirm the authentication tools are available before proceeding. If they
are still missing, use /mcp instead (above).authenticate tool using its exposed schema. Keep the returned
authorization URL intact. Do not construct a new OAuth request or change its state,
redirect URI, or PKCE challenge.{"authorization_url":"<the exact client URL>"} once to
https://api.plori.ai/oauth/pair. The response contains user_code,
verification_uri, verification_uri_complete, device_code,
expires_in (seconds), and interval (seconds). Keep device_code private.
If a permission rule, hook, or tool denies this request, stop and use the fallback below.https://api.plori.ai/oauth/pair/poll with JSON
{"device_code":"<device_code>"}. Keep only one request in flight, allow each
request at least 30 seconds to finish, and wait at least interval seconds
between requests. The server can hold a pending request for 25 seconds.
Read pending and failure responses from the JSON error field, not status.
On error: "authorization_pending", continue. On error: "slow_down", use the
larger of your previous delay plus five seconds and the response's interval
for all subsequent requests. Honor Retry-After when present on HTTP 429.
On HTTP 503 with error: "temporarily_unavailable", preserve this pairing and
the pending client authentication. Wait at least the larger of your poll interval
and Retry-After (five seconds), then retry the same device code. A temporary
failure does not extend expires_in; retry only within the original four-minute
window while the client authentication remains pending.
If a permission rule, hook, or tool denies a poll request, stop and use the fallback below.status: "approved", pass the returned callback_url directly to the same client's
complete_authentication tool using its exposed schema. Do not navigate to the
loopback URL or exchange the code yourself: the client owns the PKCE verifier.
Then discover Plori tools and call list_workspaces to confirm the connection before
reporting success. This verification does not create a Workspace or start paid work.Use this fallback after the first permission, hook, or tool denial of either pairing
POST. Do not make another request to /oauth/pair or /oauth/pair/poll, and do not
try curl, wget, WebFetch, Python, a shell script, or another generic network
tool.
authenticate
call. Ask them to open it in their browser, sign in, and approve the connection.
Do not edit the URL.complete_authentication
tool. Do not open, fetch, rewrite, log, or exchange it yourself.list_workspaces before reporting success. This check
does not create a Workspace or start paid work.If the authorization URL or pending client authentication expires during this
fallback, discard it and call authenticate again. Use only the new authorization
URL. Never reuse an expired URL.
Stop on access_denied; do not retry a denied request automatically. On
expired_token, an already-consumed pairing, or a client authentication timeout,
start a fresh client authentication before creating another pairing. Never reuse the
old authorization URL. Pairing lasts four minutes to fit within the client's pending
login. If the approved response is lost, restart the whole flow; the callback is
returned only once. Keep approval polling active while the user signs in.
Remote Control can use this flow only when it controls that same interactive Claude Code process and the two authentication tools are available. A separate hosted Claude.ai connector or Agent SDK session needs its own supported authentication flow. URLs can still appear in client tool results; do not promise to hide tool transcripts.
To connect a different Plori account or sign out, use /mcp. Pick plori, choose Clear
authentication, then Authenticate again with the new account's email code.
claude mcp remove does not clear the stored token.
CLI: curl -fsSL https://plori.ai/install.sh | sh (Windows: irm https://plori.ai/install.ps1 | iex),
npm i -g @plori/cli, or npx -y @plori/cli. The shell installer writes to
~/.local/bin and edits no rc file, so run export PATH="$HOME/.local/bin:$PATH" first.
plori login signs in through the browser; headless callers use
plori login --key plori_sk_... or set PLORI_API_KEY. Piped output and --json give
JSON.
REST: https://api.plori.ai/v1 with the same bearer token. Detail: https://plori.ai/auth.md
The MCP server has 23 tools. Every call is scoped to the credential's account.
list_workspaces: pass workspace_id for one. storage_readiness is present while
its storage starts.create_workspace (name, idempotency_key) returns id and
default_manager_agent_id. Without default_manager_agent_id it creates a default
agent, which counts against the agent limit. Names are not unique: reuse a Workspace.delete_workspace permanently deletes its files, saved versions, copies and
conversations.get_credits returns the balance. Check it before long work.send_workspace_message (workspace_id, message) runs a task in the Workspace's main
conversation, or in the one named by session_id. Use it for most work, including work
that can be split: the Workspace's own agent splits it between several agents, merges their
changes and fixes conflicts.
wait_seconds sets it (up to 1800). wait=false returns
at once.agent_id to get_run_result, cancel_run, list_runs and
list_pending_inputs.run_id and poll_after_seconds. After that delay call
get_run_result with wait=true until the run completes or is awaiting_input.session_id to keep context. 409 conversation_busy: that conversation's run is
still going.idempotency_key returns the original run for 24 hours.
max_turn_tokens caps the turn. cancel_run stops a run./workspace persist between runs. Software installed elsewhere and
processes a run starts do not. Use TMPDIR for temporary files.file_source.state
ready with no save_failure.files are URLs readable with the same bearer token.
read_workspace_file reads a saved version: current_revision, an agent's
saved_revision_id, or a changeset's base_revision, incoming_revision or
result_revision. A path such as /workspace/a.md is not a URL.awaiting_input is an approval or a question. Show it to the human, with the approval's
approve_url.always_allow. answer_pending_input can only deny a
request or answer a question. Never send secrets through it.continuation_run_id from get_run_result. answer_pending_input
returns the continuation's run_id, or continuation_pending: true while files save;
then poll the paused run until continuation_run_id is set.list_pending_inputs is the current queue; an old run can keep awaiting_input. A
consent_tool row is an outward write: only the human approves it or grants standing
consent, in the web app.schedule_run (agent_id, prompt, delay_seconds or an RFC3339 fire_at) returns
status: "awaiting_confirmation" and a confirm_url. Show the human the prompt, the time
and the confirm_url. The run is queued only after the owner confirms in the web app.
Only for a client that manages the agents itself. Each agent works on its own copy of the files; your client completes or discards each merge.
create_workspace_worker (workspace_id, task, idempotency_key) returns
agent_id and task_group_id at once; the agent queues while capacity is busy. Pass
task_group_id to later calls to share one token limit; get_workspace_costs reports
cost.get_workspace_worker or list_workspace_workers until save_state is ready.
get_run_result (run_id, agent_id) reads the reply and approval requests.
steer_workspace_worker messages a running turn (409 run_not_running if it has not
started, is paused or has ended). cancel_run stops one agent,
stop_workspace_task_group a group.submit_workspace_changeset submits the saved files; Plori merges them with the current
files.get_workspace_changeset until compared is true. phase review_ready: ready
to complete. needs_resolution: conflicts. recompare_required: submit again.accept_workspace_changeset completes the merge (expected_current_revision = the
comparison_current_revision; validation_evidence = 1-32 short statements of the
checks you made). reject_workspace_changeset discards it. After accept, poll until
state is accepted and result_revision is set.Accept errors:
current_revision_conflict: another merge landed first. Submit again, then repeat
steps 4 and 5.workspace_changeset_unresolved: not computed yet, or it has conflicts. A merge with
conflicts cannot be completed through MCP. To have conflicts fixed, send the task to the
Workspace with send_workspace_message; its agent fixes conflicts.workspace_changeset_busy: a run or file operation is active. Accept after it ends.These agents pause before outward actions like other runs. Workflows, usage and disk reports, trash and connected accounts are not on MCP; use the web app, REST or the CLI.
The CLI also covers what MCP does not. Use exact IDs; there is no implicit active Workspace.
Groups: workspace, independent-agent, copy, revision, workspace-files,
worker, task-group, changeset, operation; plori GROUP --help lists actions and
flags. Commands that create something take --idempotency-key KEY. To complete a merge:
plori changeset accept WORKSPACE_ID CHANGESET_ID --current-revision REVISION_ID --evidence TEXT --idempotency-key KEY with the comparison_current_revision. Writes to a
copy need the --if-match ETag you read. Use --yes (agent-retire,
workspace delete) only when the human authorized the action. Examples:
https://plori.ai/docs/cli
Do not hold one call open for a job that takes minutes.
get_run_result for about 100 seconds (wait_seconds: 100), one held call
per run, and poll with wait=false in between, or run plori watch in a background
shell.tool_timeout_sec on the plori entry in config.toml to the expected
duration, or run plori watch in a background shell and check plori inbox.wait=false, then call get_run_result after each
poll_after_seconds until the status is terminal or awaiting_input.Agents are addressed by name or ID. Every command accepts --json.
plori run <name> "message" waits for the reply; --no-wait returns a run ID.
plori result <name> <run-id> --wait (bounded by --wait-seconds) reads the result.plori watch prints run endings and input requests as JSON lines. plori inbox lists
what ended and what waits on you.plori inputs <name>; plori answer <run-id> <tool-call-id> --approve|--deny|--value <v>.
Add --always-allow only on the human's explicit instruction.plori schedule <name> "prompt" --in <seconds> (or --at <rfc3339>).plori attach is for a human at the keyboard; an agent uses --read-only to tail.Exit codes of run, result --wait and watch: 0 succeeded, 1 API or runtime failure,
2 usage error, 3 credentials missing, rejected or expired, 4 control plane unreachable, 10
awaiting human input, 20 run error, 30 cancelled, 40 wait ran out with the run still going.
Runs spend credits. The plan sets included credits, disk, agent count, workflow limits and
the length of one run. Registered accounts have no limit on concurrent agent runs.
Anonymous trials allow at most 2 concurrent agent runs across their agents.
A third run makes send_workspace_message return 429 with advice to register free.
max_turn_tokens and max_turn_seconds cap a turn.