Add Parallel research subagent to Pi - #41
Open
georgeatparallel wants to merge 3 commits into
Open
Conversation
georgeatparallel
marked this pull request as ready for review
August 18, 2026 16:53
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.
Why this exists
Parallel is building the Responses API to give AI agents a simple way to hand off web research. You send it a question, Parallel does the research, and you get back a finished answer with sources.
That maps naturally to a subagent. Instead of giving a model a search tool and asking it to assemble the answer itself, Pi can hand the whole research task to Parallel and use the cited result like any other child agent output.
What you get
This PR adds a
parallel-researchagent to the existing@parallel-web/pi-extensionpackage.You can run it directly with pi-subagents:
You can also call it from pi-subagents' JavaScript code mode. The research answer comes back in
result.output, so your workflow can read it, branch on it, or pass it to another step.After this version is published, install it with:
Then run
/login parallelinside Pi and start aparallel-researchchild.How it works
parallel/researchmodel.POST /v1/responses.It makes one Responses API call. There is no second model call, search loop, background job, or automatic retry. Pi still owns child orchestration, concurrency, waiting, artifacts, cancellation, and JavaScript branching.
By default, the request contains only the packaged research instructions and the latest text task. It does not send parent history, local files, environment variables, tools, session state, or worktree data.
Why this shape
The Responses API already returns the final cited research answer. Treating it as the subagent itself keeps the integration small, makes cost predictable, and avoids wrapping it in another model.
This is different from the DeepSeek integration in this repo. That package gives DeepSeek raw search results. This one gives Pi a finished research result that behaves like a native child agent.
What we tested
We tested this the way you would actually use it:
@parallel-web/pi-extension1.2.0 artifact and installed that exact package./login parallel./run parallel-research.Both research calls succeeded. Each used one child turn, zero tools, no worktree, no retry, and no second synthesis model. Both returned cited answers whose source URLs resolved successfully. The two
mediumResponses calls cost $0.05 each, for $0.10 total.The live run used the packed Responses implementation at commit
52619e5. The only later commit changes auth guidance and its tests, not research execution.We also confirmed the correct Pi auth behavior while running it:
/parallel-loginto check Parallel auth inside Pi./logoutand select Parallel to remove a stored credential.pi auth checkdoes not discover extension-provided providers.PARALLEL_API_KEYfrom your environment.The README and status messages now reflect those behaviors.
Validation
What remains
ifbranch. Both live paths returned the ordinary childoutputused by code mode, and credential-free tests cover that mapping.Release
This PR keeps
@parallel-web/pi-extensionat version 1.2.0. After it merges, the normal release PR will publish the updated package.