Skip to content

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

Draft
rakshith48 wants to merge 5 commits into
mainfrom
rak/agent-on-terms-required
Draft

rakshith48 wants to merge 5 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 "rolling out" note: the fields appear only once terms gating is enabled for the run. There's also 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.

Only base (English) files are touched, per CLAUDE.md. 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 25, 2026, 3:52 PM

💡 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>

This branch was successfully deployed

1 active deployment
staging — ff0af9d2 Deployed Sep 25, 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