Conversation
Add integration with StackOne unified API platform for HRIS, ATS, CRM, and other business systems. - Add `tool_from_stackone()` for single tool creation - Add `StackOneToolset` for bulk tool registration with pattern matching - Require stackone-ai>=2.1.1 (Python 3.10+) - Add documentation and examples - Add comprehensive unit tests with 100% coverage
d77e04f to
888b2d4
Compare
- Fix StackOne URL from .co to .com - Update description to reflect current positioning as "AI Integration Gateway"
glebedel
left a comment
There was a problem hiding this comment.
We should update the examples but also add the meta tools! That would be a great value-add and differentiator for pydantic too because they might not have this concept at all.
eg. via import search_tool & execute_tool and that could take any tools, stackone tools for sure but also any other pydantic tools (eg. let's say the exa one)
Add search_tool, execute_tool, and feedback_tool functions that wrap StackOne's utility tools API (tool_search, tool_execute, tool_feedback). Extend StackOneToolset with new options: - include_utility_tools: enables dynamic tool discovery mode - include_feedback_tool: adds feedback collection capability - hybrid_alpha: configures BM25/TF-IDF search weight Update documentation and examples to reflect the new API.
Update minimum version requirement to 2.3.0 which includes the utility_tools API (tool_search, tool_execute, tool_feedback).
- Update StackOneToolset tests to match new implementation that uses _tool_from_stackone_tool directly instead of tool_from_stackone - Add test for include_utility_tools option - Mark docstring examples with test="skip" to avoid linting issues
- Remove `{test="skip"}` from docstring examples
- Simplify StackOneToolset example to match ExaToolset pattern
- Move Args documentation from class docstring to __init__ method
- Remove verbose examples from search_tool, execute_tool, feedback_tool
- Fix pyright type error in test file with ignore comment
- Replace hris_* with stackone_* in filter_pattern example - Replace hris_list_employees/hris_get_employee with stackone_* tools - Update description to remove 'unified interface' terminology
…_*/stackone_* Per PR review feedback, update all examples and tests to use actual StackOne provider naming patterns like 'bamboohr_*' and 'workday_*' instead of fictional 'hris_*' or 'stackone_*' patterns. - Update docs/toolsets.md examples - Update docs/third-party-tools.md examples - Update examples/stackone_integration.py - Update tests/test_ext_stackone.py - Update docstrings in pydantic_ai_slim/pydantic_ai/ext/stackone.py
- Format test file with ruff to fix line length issues
- Add {test="skip"} to StackOneToolset docstring example to skip
example test that requires stackone-ai package
Add stackone.py and test_ext_stackone.py to coverage omit list, similar to aci.py and exa.py which are also external integrations.
|
Managed to get the CI passing now also noticed that in the Docs we are adding too many tools strategies there. @glebedel Comparing to the others they just added how to use a toolset and multiple tools and thats's it .. having the Dynamic Discovery, Feedback and Search (semantic/lexical) would be great but we are adding too much on the page in the docs. |
shashi-stackone
left a comment
There was a problem hiding this comment.
Made some changes to get CI and addressed some feedback
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="pydantic_ai_slim/pydantic_ai/ext/stackone.py">
<violation number="1" location="pydantic_ai_slim/pydantic_ai/ext/stackone.py:16">
P2: According to linked Jira issue ENG-10848, the StackOne integration must expose the meta search/execute (& feedback) tools. This change removes those exports and the toolset no longer provides any path to include utility tools, so the requirement is no longer met.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
docs/third-party-tools.md
Outdated
| search='auto', | ||
| ) | ||
|
|
||
| agent = Agent('google-gla:gemini-2.5-flash', toolsets=[toolset]) |
There was a problem hiding this comment.
I think our example should have a different model (better at tool calling), eg. haiku
There was a problem hiding this comment.
Should gemimi-3 fine here? As I tested examples with Google API KEY?
| from pydantic_ai.ext.stackone import StackOneToolset | ||
|
|
||
| toolset = StackOneToolset( | ||
| search_query='list and manage employees', |
There was a problem hiding this comment.
does it make sense to do the search ahead of the agent call? Shouldn't it be more that the agent has search tool in the stackone toolset?
There was a problem hiding this comment.
I think Pydantic AI toolsets define their tools at construction time and not sure it support dynamically adding tools during an agent run.. I will double check the source but pretty sure not
There was a problem hiding this comment.
i'm not talking about adding tools during an agent run, i'm talking about having search & execute in the agent run.
What i don't understand here is why do you even have a search query? it's the agent/llm that should decide the query and use the search tool provided in agent declaration?
|
|
||
| def test_tool_execution(): | ||
| tool = stackone_ext._tool_from_stackone_tool(employee_tool) | ||
| result = tool.function(limit=10) # type: ignore |
There was a problem hiding this comment.
do we need the # type: ignore here? is that best practice?
There was a problem hiding this comment.
Added to make pyright happy on CI should be ok here for dynamically-created schema, removing cause type error .
docs/third-party-tools.md
Outdated
| ) | ||
|
|
||
| agent = Agent( | ||
| 'google-gla:gemini-2.5-flash', |
glebedel
left a comment
There was a problem hiding this comment.
not sure the search example makes sense
Summary
Add StackOne AI integration enabling AI agents to access 200+ SaaS integrations (HRIS, ATS, LMS, CRM, IAM, etc.) through a unified API.
Changes
tool_from_stackone()for individual tool integrationStackOneToolsetfor bulk registration with glob pattern filteringNew Files
pydantic_ai_slim/pydantic_ai/ext/stackone.py- Core integration moduletests/test_ext_stackone.py- Unit testsexamples/stackone_integration.py- Usage examplesDocumentation Updates
docs/install.md- Addedstackoneextradocs/third-party-tools.md- Added StackOne tools sectiondocs/toolsets.md- Added StackOne toolset sectionDependencies
stackone-ai>=2.1.1(requires Python 3.10+, same as Pydantic AI)Test plan
uv run pytest tests/test_ext_stackone.py)Jira: ENG-10848