Skip to content

Add a decision guide for choosing between common.ai toolsets - #72936

Merged
kaxil merged 11 commits into
apache:mainfrom
astronomer:toolset-decision-guide-docs
Sep 20, 2026
Merged

kaxil merged 11 commits into
apache:mainfrom
astronomer:toolset-decision-guide-docs

Conversation

@Lee-W

@Lee-W Lee-W commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

The toolsets arrived one at a time, each with a docs section explaining what it does and none explaining when it is the wrong answer. A reader who finds all of them still cannot choose, because the routes overlap: the same target is often reachable through a hook, through a vendor's MCP server, or through a skill, and those answers differ in how credentials are governed, how much surface we have to keep current, and how they fail.

Writing the reasoning down once means the next proposal for a toolset can be answered by reference instead of re-argued. Two existing files change with it: SbxSandboxBackend's class docstring, which described the wrong set of specs as refused, and the sandbox network-policy paragraph in toolsets.rst, which carried only half of that fact.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Claude] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@Lee-W
Lee-W marked this pull request as ready for review September 17, 2026 08:43
@Lee-W
Lee-W force-pushed the toolset-decision-guide-docs branch 2 times, most recently from 42ea145 to 3649f24 Compare September 18, 2026 10:26
The toolsets arrived one at a time, each with a docs section explaining
what it does and none explaining when it is the wrong answer. A reader
who finds all of them still cannot choose, because the routes overlap:
the same target is often reachable through a hook, through a vendor's
MCP server, or through a skill, and those answers differ in how
credentials are governed, how much surface we have to keep current, and
how they fail.

Writing the reasoning down once means the next proposal for a toolset
can be answered by reference instead of re-argued.
This page earns its place by stating each route's real limits, so a
claim that is confidently wrong costs more than no claim at all. Three
of them are contradicted by the validator and the toolset itself, and
deferring the enumeration keeps the page from carrying a second list
that drifts from the code.
Both the guide and the class docstring told readers the backend cannot
apply a per-sandbox network rule, which steers them away from something
create does. The limits worth stating are narrower: an allowlist only
narrows a host policy that is already deny-all, and block_network has no
per-sandbox enforcement at all.
Three routes on the page each presented themselves as the one whose
credential does not come from an Airflow connection, and only one of
them could be right. The credentials table already states each route's
source correctly, so the prose is what had to give.
The table sent anyone with an Iceberg table toward the page's only
DataFusion example, which is parquet-shaped and omits the db_name a
catalog format needs, so following the page raised ValueError. The
sandbox row has the opposite problem: the narrower answer the reader
often wants is a flag on AgentOperator, which the page never mentioned.
The decision guide listed the base class leaving authentication to the
subclass as a plain gap, while the toolsets page presents the same split
as the design: credentials keep flowing through the provider's own hook.
The caveat now points at that intended shape instead of contradicting it.
The decision guide named a few of the constructs the table walk refuses
and linked the section that names the rest, so the page carried a second
list that could drift from the code. It now points at that section for
all of them, keeping only the DESCRIBE / SHOW split, which the page
raises two sentences earlier and would otherwise leave hanging.
The SbxSandboxBackend class docstring said create refuses a spec that
names allow_egress_to or block_network. _check_spec gates on what a spec
asks for, and block_network defaults to True, so the two are different
sets: a bare SandboxSpec() names neither field and is refused, while
SandboxSpec(block_network=False) names one and passes. SandboxToolset
materialises that bare spec itself, so the all-defaults case is the one
the old wording called fine. The docstring now reuses the predicate from
:param host_network_policy: and states the default.

toolsets.rst covered only the allow_egress_to half of the layered-policy
fact; it now also says block_network has no per-sandbox enforcement, and
choosing_a_toolset.rst states the True default so the all-defaults
refusal is not a surprise.

Both pages described the alternative to refusing as "granting nothing
quietly", which fits allow_egress_to on an open host policy but inverts
for block_network, where silence leaves egress wide open. Both now say
it refuses rather than leaving the sandbox less restricted than the spec
asked for.
The MCPToolset caveat said it has no tool-level allow-list at all.
MCPToolset is built on the same AbstractToolset base every toolset in
this provider extends, so a Dag author can call .filtered() to subset
the advertised tool list without touching the server. The bullet now
draws the real boundary: that filtering happens on the client, narrowing
what the agent is offered rather than authorizing anything server-side,
and nothing requires you to set it -- unlike allowed_methods on
HookToolset, which rejects an empty list.

Neither filtered nor FilteredToolset appears anywhere else in this
provider's docs, so "tool_prefix renames; it does not filter" read as
reaching for one sibling on that base class and missing the other. That
sentence is gone.
The code_mode note said the glue code still runs in the worker process.
operators/agent.rst denies exactly that: the generated code runs in
Monty's deny-by-default sandbox and cannot read the filesystem, the
network, or environment variables. What keeps a credential in reach is
the tools, not the glue -- they still run in the worker, so pairing code
mode with a credential-bearing toolset on the same agent changes
nothing. The conclusion is unchanged; only the reason is now the one the
operator docs and the code_mode docstring give.
This page is the only Iceberg guidance in the provider, and it did not
say that the format needs an optional extra: without
apache-airflow-providers-common-sql[apache.iceberg],
IcebergFormatHandler.register_data_source_format raises
AirflowOptionalProviderFeatureException. The datafusion extra the whole
route needs was missing too. Both are now flagged inline, following the
precedent the skills extra already sets on this page.
@Lee-W
Lee-W force-pushed the toolset-decision-guide-docs branch from 3649f24 to 10a8e75 Compare September 19, 2026 01:27
@kaxil
kaxil merged commit 1dc7efe into apache:main Sep 20, 2026
83 checks passed
@kaxil
kaxil deleted the toolset-decision-guide-docs branch September 20, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants