热度观测:等待有效的新观测。

← 返回内容列表
GGitHub采集材料

Pi 动态工作流:并行调度子智能体

发布时间未知 · 北京时间

AI 编程

有实践材料可继续查看

代码仓库安装说明使用说明示例代码

原文与观测指标

1 个来源
GGitHub

Pi 动态工作流:并行调度子智能体

QuintinShaw
查看原文
星标556采集时的累计值
每小时增长待观察星标 / 小时 · 观测区间平均值
最近提交10-28 02:08提交时间不是项目发布时间

发布时间:未知 · 首次发现 10-28 02:32 · 北京时间

指标采集:10-28 02:32 · 指标已取得

项目文档有线索安装说明有线索使用说明有线索示例有线索

仅反映文档与示例线索,未实际运行项目。

摘要

pi-dynamic-workflows 将复杂请求拆成 JavaScript 工作流,调用多个子智能体并行处理、交叉核验,再汇总结果,适用于代码审计、重构和资料研究。文档提供安装命令、触发方式及检查路由鉴权的示例代码。

摘要由 AI 生成,请以原文为准。
观测历史 · 最近 1 条 展开 / 收起

缺失不计为零;增长只比较同一指标来源的有效记录,按实际间隔折算每小时。上游缓存可能延迟数值更新。

采集时间 · 北京时间指标数值来源状态
10-28 02:32:26Star556GitHub 公开页面已取得
采集原文 展开 / 收起

pi-dynamic-workflows

Claude Code–style dynamic workflows for Pi: code-mode subagents with real model routing, journaled resume, git-worktree isolation, cost a…
项目说明 展开 / 收起
Documentation · npm · Pi package Turn one request into a JavaScript orchestration script that fans work out across isolated subagents, routes each task to the right model, cross-checks the results, and returns one synthesized answer. Intermediate work stays in script variables instead of filling your chat context. Built for codebase-wide audits, multi-perspective review, large refactors, and source-checked research—the jobs that are too broad for one agent and one context window. Start in 30 seconds pi install npm:@quintinshaw/pi-dynamic-workflows Run /reload in Pi, then ask naturally: Run a workflow to audit every route under src/routes/ for missing auth checks. Pi writes and starts the workflow in the background. A live panel tracks progress while you keep working, and the final result is delivered back into the conversation automatically. Keyword triggering is on by default: use the bounded word workflow or workflows in an idle interactive editor submission to arm workflow mode — the assistant then handles a request by fanning it out across agents, but still answers plainly if you're only asking about workflows (the trigger authorizes the tool, it doesn't force it). The directive applies only to that request; the original user message stays unchanged. Print/JSON/RPC inputs and queued steering/follow-up inputs do not keyword-arm. Or run /workflows run <prompt> explicitly. Identifier-like text and paths such as myworkflow, workflow_name, and src/workflow-editor.ts do not trigger. You can change the keyword with /workflows-trigger set pi-workflow or disable it with /workflows-trigger off. How it works Orchestrate — Pi writes a deterministic JavaScript workflow with agent(), parallel(), pipeline(), and phase(). Fan out — fresh subagent sessions run concurrently, optionally on different models or isolated git worktrees. Verify and return — the workflow cross-checks findings, journals completed work for resume, and delivers one result. The orchestration itself is plain JavaScript: export const meta = { name: 'auth_audit', description: 'Find routes missing auth checks and verify the findings', phases: [{ title: 'Scan' }, { title: 'Review' }, { title: 'Verify' }], } phase('Scan') const files = await agent('List every route file under src/routes/.', { tier: 'small' }) phase('Review') const findings = await parallel( files.split('\n').filter(Boolean).map((file) => () => agent(`Audit ${file} for missing auth checks.`, { tier: 'medium', isolation: 'worktree', }), ), ) phase('Verify') return await agent( 'Synthesize and double-check these findings:\n' + findings.join('\n\n'), { tier: 'big' }, ) Why use it Real parallel orchestration — fan out up to 16 concurrent and 1000 total subagents from one orchestration script. Per-agent model routing — use small, medium, or big tiers, or choose an exact provider/model and thinking level. Journaled resume — replay completed agents after interruption instead of spending their tokens again. Replay follows the longest-unchanged-prefix rule: the first call that never journaled (or whose script changed) and everything after it re-run live; pass resumeMode: "replay-completed" when resuming to also replay completed calls dispatched concurrently with a never-completed gap in the same fan-out (e.g. a parallel() fan-out paused mid-flight). The orchestrator can also resume with an edited script (resumeFromRunId): unchanged agent() calls replay from cache and only edited/new ones re-run — so a single bad prompt no longer means paying to re-run the whole workflow. Git worktree isolation — parallel agents edit on separate branches with isolation: "worktree". Kept by default for merge; pass keepWorktree: false to delete (tests). Measured usage — report real tokens and cost from each subagent session; add run, phase, or agent budgets only when you want them. When a provider session ends without reporting usage, the affected totals are heuristic character estimates and UI token surfaces render them with a ~ prefix (e.g. ~640 tok) — never silently as metered figures. (Script-facing budget.spent()/remaining() are raw numbers and cannot carry the marker.) Visible background runs — track phases, agents, models, fresh/cache tokens, cost, and live tok/s from the progress panel or /workflows navigator. Quality patterns — compose verify(), judgePanel(), loopUntilDry(), and completenessCheck() instead of rebuilding review loops. Reusable workflows — save any run as a command and call saved workflows from other workflows. Supported workflow capabilities The installed extension generates this compact index from its executable capability contract. Read the workflow authoring guide or use the packaged workflow-authoring skill for constraints, lifecycle guidance, and adaptable examples; configured route and agent-type values remain environment-specific. Name Classification Signature Options and defaults agent runtime-global agent(prompt, options?) => Promise<string | structured value | null> label: string (optional; default: derived from phase and call count) phase: string (optional; default: current phase) schema: plain JSON Schema (optional) model: string (optional) thinking: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" (optional) tier: string (optional) isolation: "worktree" | false (optional) keepWorktree: boolean (optional; default: true) cwd: string (optional) thread: string (optional) agentType: string (optional) timeoutMs: number | null (optional; default: run timeout, finite ms in [1, 2^31-1]; null disables) retries: number (optional; default: run retry count) parallel runtime-global parallel(thunks) => Promise<Array<unknown | null>> — pipeline runtime-global pipeline(items, ...stages) => Promise<Array<unknown | null>> — workflow runtime-global workflow(savedName, childArgs?) => Promise<unknown> — verify runtime-global verify(item: unknown, options?: { reviewers?: number; threshold?: number; lens?: string | string[] }) => Promise<{ real: boolean; realCount: num