Files
Toran Bruce RichardsandClaude Opus 5.5 2719c4c72f feat(blocks): add Parallel Decisions blocks (web-grounded yes/no, choice, score) (#16310)
### Why / What / How

**Why:** Parallel Web Systems launched the [Decisions
API](https://docs.parallel.ai/decisions/decisions-quickstart) on
2026-10-27
([announcement](https://x.com/p0/status/2115111877558898931)). It
answers typed questions (yes/no, choice, score) from current web
evidence, returns the sources it used, and costs $0.001 per request.
AutoGPT has no native Parallel blocks; the only Parallel entry is the
Parallel Search MCP server. Closes OPEN-3763.

**What:** A `parallel` provider (API key, `PARALLEL_API_KEY`) and four
blocks over `POST https://api.parallel.ai/v1/decisions`:

- **Parallel Yes/No Decision**: probability the statement is true, and
routes `data` to `yes`, `no` or `unsure` using `min_probability`
- **Parallel Choice Decision**: chosen option plus a probability for
each option
- **Parallel Score Decision**: fractional score on an ordered scale you
define, with legend, probabilities and `max_score`
- **Parallel Ask Many Decisions**: up to 100 mixed questions in one
request, sharing one evidence set and costing one request

Every block outputs `citations` (url, title, excerpts) and
`decision_id`.

**How:** The design mirrors the existing TypeSafe/Jev blocks
(`backend/blocks/typesafe/`), whose question model is the same shape. A
shared `ParallelDecisionBase` makes the call through the SSRF-safe
`Requests` wrapper and records the per-request price as `provider_cost`.

- **Refusals:** Parallel can return `{"type": "refusal"}` for a
question. That is a normal 200 response, and the blocks report it as its
own outcome: `refused` on single-question blocks (Yes/No also sends
`data` to `unsure`) and `refused_questions` on Ask Many. It is never
turned into no, the first option or a zero score.
- **Error messages:** HTTP failures raise with Parallel's message. Both
the documented error envelope and the `{"code", "message"}` shape the
live API returns for a bad key are handled. Retries are capped at 3,
redirects are not followed (so `x-api-key` can't be forwarded to another
host), and there is a 60 s timeout.
- **Input checks before charging:** Ask Many question names are a
`propertyNames` pattern in the JSON schema, which the executor checks
before charging the run.
- **Pricing:** 1 credit per run on a platform key; runs on a user's own
key are free, as with other SDK providers.

### Changes 🏗️

- New `backend/blocks/parallel/` package: provider config, API client,
shared schemas and base class, four blocks, unit tests
- `.env.default`: adds blank `PARALLEL_API_KEY=`
- Generated block docs under
`docs/integrations/block-integrations/parallel/`, with the manual
sections written; README and SUMMARY updated by the generator
- No frontend change: `frontend/public/integrations/parallel.png`
already exists

Found and left out of scope: the existing `mcp_parallel` MCP catalog
entry has no `provider` link to the new `parallel` provider (filed as
OPEN-3764).

### Agents and large language models used

Claude Code with Claude Opus 5.5

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
- [x] `test_available_blocks` and `test_block_declares_an_effect` pass
for all four blocks (mocked API)
- [x] `backend/blocks/parallel/test_parallel.py`: routing at and around
the threshold, including a float-rounding edge; refusals on every block;
request body built for each question type; empty context sent as `{}`;
invalid question names and bad Ask Many names rejected by the pre-run
schema check; `provider_cost` recorded; error messages for both
error-body shapes and a raw body
- [x] Request body, no-redirect, timeout and retry cap asserted on the
client
- [x] Live call to `api.parallel.ai/v1/decisions` through the client
with a fake key returns `HTTP 401: Invalid API key (C.1)`
- [x] `generate_block_docs.py --check` in sync; ruff, black, isort and
pyright clean on the package
  - [ ] Not yet run with a real Parallel API key

#### For configuration changes:

- [x] `.env.default` is updated or already compatible with my changes
- [x] `docker-compose.yml` is updated or already compatible with my
changes
- [x] I have included a list of my configuration changes in the PR
description (under **Changes**)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-28 16:02:57 +00:00
..