Skip to content

docs(agent): document exchange.onTermsRequired and the terms-required flow - #1466

Merged
rakshith48 merged 7 commits into
mainfrom
rak/agent-on-terms-required
Sep 28, 2026
Merged

rakshith48 merged 7 commits into
mainfrom
rak/agent-on-terms-required

Conversation

@rakshith48

@rakshith48 rakshith48 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

Agent runs now call only the Alexandria providers whose data terms the team has accepted, and callers choose what happens with exchange.onTermsRequired (firecrawl/extract-v3#182). The docs didn't cover any of this.

What changes

  • features/agent.mdx: a new section, Data providers that need terms.
    • What gating means, and that no mode ever calls a gated provider.
    • No auto-accept: accepting terms always needs a person, and agents must ask their user before terms/accept.
    • The two modes, skip (default) and ask, and thread inheritance when the option is omitted.
    • The response fields skippedProviders and requiresAction (approvalId is always present, with the exact terms/show / terms/accept calls). digest is always present and can be null, and then terms/show supplies it. There's also a pendingApproval of kind: "terms", with a JSON example.
    • Accept, then continue: terms/show, then explicit consent, then terms/accept via /v2/scrape with alexandria, then exchange.approve: { approvalId } on the thread. exchange.decline: { approvalId } declines the whole offer.
    • A note that a turn ending on a paid-call approval has no terms offer, and that callIds / always are ignored on terms offers.
    • A new exchange.onTermsRequired row in the Parameters table.
  • features/alexandria.mdx: one sentence in "Provider terms" linking to the new Agent section.

Cut from v1, per the extract-v3#182 scope cut: fail mode, deferring a terms offer behind a paid-call approval, and decline.callIds.

  • Locales (es, fr, ja, pt-BR, zh): the same section, the exchange.onTermsRequired row and the Alexandria sentence, translated by hand. Every API literal, field name and JSON/curl sample is kept exactly as in English, and headings keep the English anchors. This goes against CLAUDE.md's "don't modify localized files", with Rak's approval, because the "Locale literals" check fails otherwise (missing API literal ... drops requiresAction). With the translations in, scripts/check-locale-api-literals.sh gives output identical to main (only the pre-existing change-tracking, search, monitoring, cli, webhooks and v0/v1 findings). The self-test and extraction-hostile checks pass. The next Locadex sync may retranslate these sections. Not covered: v2-openapi.json doesn't document the Agent exchange, threadId or mode request fields at all yet, so I didn't add a partial exchange object there.

Related PRs and deploy order

  1. firecrawl/extract-v3#182 (backend)
  2. feat(agent): accept exchange.onTermsRequired; type terms-required fields in gateway and SDKs firecrawl#4759 (gateway accepts the field; also the JS/Python SDK types)
  3. firecrawl/firecrawl-web#3758 (dashboard flag NEXT_PUBLIC_AGENT_TERMS_OFFER)
  4. After the gateway: SDK release, feat(agent): add onTermsRequired to firecrawl_agent and keep terms fields in status firecrawl-mcp-server#445, and this PR. Don't publish it before the gateway deploys, or the documented option returns a 400.

🤖 Generated with Claude Code

… flow

Agent runs only call Alexandria providers whose data terms the team has
accepted. Document the skip / ask / fail modes, the skippedProviders,
requiresAction and error response fields, and the accept-then-continue
flow (terms/show, explicit user consent, terms/accept, then
exchange.approve on the thread). There is no auto-accept mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
firecrawl 🟢 Ready View Preview Sep 28, 2026, 5:32 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fail mode also ends on an answerable terms pendingApproval; requiresAction
always carries approvalId and is absent when the offer was deferred behind
a paid-call approval; a null accept digest comes from terms/show; only the
listed callIds count ([] names nobody, omitted means all).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches the extract-v3#182 scope cut: onTermsRequired is skip or ask, a
terms offer is accepted or declined as a whole, and digest is always
present and nullable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No per-provider id; approve callIds/always are ignored on terms offers; no
terms offer on a turn that ends on a paid-call approval; terms gating is
rolling out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rakshith48 and others added 2 commits September 28, 2026 15:27
- Add "Data providers that need terms" and the exchange.onTermsRequired
  parameter row to the es, fr, ja, pt-BR and zh Agent pages, with every
  API literal, JSON and curl sample kept exactly as in English, and mirror
  the one-line Alexandria change. Fixes the locale-literals check
  (missing requiresAction); the remaining failures are identical to main.
- Remove the "rolling out" note: the terms gate is live for all teams
  (extract-v3#183).

Localized files are edited by hand here with Rak's approval, as an
exception to CLAUDE.md, because the check blocks this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rakshith48
rakshith48 marked this pull request as ready for review September 28, 2026 05:30
@rakshith48
rakshith48 merged commit b24040a into main Sep 28, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
staging — 2a5dab3f Deployed Sep 28, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant