feat(ai-autopilot): add @gemstack/ai-autopilot — Supervisor orchestration#17
Merged
Conversation
…tion Third package of the AI family (#9). The orchestration layer: runs many agent runs under a control policy, above ai-sdk's single-agent loop. Seed slice = the supervisor/worker topology (plan -> dispatch -> synthesize), the smallest thing clearly more than the asTool/handoff primitives: - Supervisor: planner decomposes a task into subtasks; dispatch runs each on a worker agent with bounded concurrency, an optional token budget, and per-subtask error isolation; synthesizer combines the results. - agentPlanner(agent): LLM decomposition via ai-sdk Output.array. - agentSynthesizer(agent) / defaultSynthesize: LLM or deterministic combine. - Pluggable stages (plan/workers/synthesize), guardrails (concurrency, maxSubtasks, budget.maxTotalTokens), progress events. Scope boundary kept sharp: if a feature just calls an ai-sdk primitive it stays in ai-sdk; autopilot only owns topology/control/lifecycle. Autonomous workers in v1; durable pause/resume + more topologies deferred behind optional seams. One-directional (ai-autopilot -> ai-sdk). 18 tests across pool/supervisor/ planner/synthesizer. Closes #9
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #9 — the third (and most speculative) package of the GemStack AI family. The orchestration layer: runs many agent runs under a control policy, above
ai-sdk's single-agent loop.Per the issue, this ships the smallest useful first slice rather than a broad speculative API: the supervisor/worker topology.
Seed slice:
Supervisor(plan → dispatch → synthesize)Surface
Supervisor— the orchestrator. Pluggable stages:plan(aPlanner),workers(a singleAgent/ aRecord<string, Agent>routed bysubtask.worker/ aWorkerRouter),synthesize(aSynthesizer).agentPlanner(agent)— LLM decomposition viaai-sdk'sOutput.array(JSON subtasks).agentSynthesizer(agent)/defaultSynthesize— LLM synthesis, or deterministic concatenation (no LLM call).concurrency,maxSubtasks(trims + flagsstoppedEarly),budget.maxTotalTokens(halts dispatch). ProgressonEvent.Answering the issue's open questions
handoff/asTool? Those are primitives (transfer control / expose one agent as a tool). The Supervisor is a code-orchestrated topology over many runs: concurrency, budget, error isolation, result aggregation. The scope rule is enforced — if a feature just calls a primitive, it stays inai-sdk.ai-sdk'sSubAgentRunStore+ resume primitives is a deferred optional adapter, along with more topologies (pipelines, debate) and queue-backed runners.Verification
pnpm build+pnpm typecheck— all packages ✓ai-sdkprompt +Outputparsing viaAiFake).ai-sdkreferencesai-autopilotnowhere.Changeset:
@gemstack/ai-autopilotminor → 0.1.0. With this, the family's four packages (ai-sdk, ai-mcp, ai-skills, ai-autopilot) all exist.