feat: Add convenience method to use StackOne third-party tools
Stackone Integration as Third-Party Tools
This PR adds pydantic_ai.ext.stackone so Pydantic AI agents can use StackOne tools, following the pattern already established for LangChain and ACI.dev in the same pydantic_ai.ext namespace
StackOne is Integration Infrastructure for AI Agents. To use it, install the stackone-ai package, set STACKONE_API_KEY in your environment, and provide at least one connected account ID via STACKONE_ACCOUNT_ID or by passing account_ids= directly.
Usage from Pydantic AI
from pydantic_ai import Agent
from pydantic_ai.ext.stackone import StackOneToolset
toolset = StackOneToolset()
agent = Agent('openai:gpt-5.4', toolsets=[toolset])
result = agent.run_sync('List the first 5 workers')
print(result.output)
For large catalogs, mode='search_and_execute' exposes two tools (tool_search and tool_execute) that let the model discover and invoke tools at runtime instead of receiving every tool upfront:
toolset = StackOneToolset(mode='search_and_execute')
agent = Agent('openai:gpt-5.4', toolsets=[toolset])
StackOneToolset also supports narrowing with tools= or filter_pattern=, and multi-account connections via account_ids=[...]
Checklist
- Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
- No breaking changes in accordance with the version policy.
- PR title is fit for the release changelog.
-
make docs-servebuilds and renders the updated StackOne section correctly. - PR has been made easy and clean for reviewers to review and open to discussion of any further info needed.