The StackOne AI SDK is a Python library that provides a unified interface for AI agents to discover and execute actions across multiple SaaS platforms (HRIS, CRM, ATS, LMS). It abstracts the complexity of integrating with diverse APIs by offering dynamic tool discovery, intelligent filtering, and seamless conversion to popular AI framework formats.
Scope: This page covers the high-level architecture, core components, and system design patterns of the SDK. For specific usage patterns, see Quick Start. For detailed API documentation, see API Reference.
Related Pages:
The SDK addresses three primary challenges:
Sources: README.md1-50 pyproject.toml1-28
Key Architectural Patterns:
| Pattern | Implementation | Location |
|---|---|---|
| Facade | StackOneToolSet provides unified API for tool management | stackone_ai/toolset.py |
| Adapter | Format converters (to_openai_function(), to_langchain()) adapt tools to framework-specific formats | stackone_ai/models.py |
| Repository | Tools collection manages tool instances with lookup/filtering | stackone_ai/models.py |
| Proxy | _StackOneRpcTool proxies execution to remote RPC endpoint | stackone_ai/models.py |
| Strategy | Hybrid search in ToolIndex combines BM25 and TF-IDF algorithms | stackone_ai/meta_tools/tool_index.py |
Sources: README.md10-28 stackone_ai/__init__.py1-11
Component Responsibilities:
| Component | Primary Responsibility | Key Methods/Properties |
|---|---|---|
StackOneToolSet | Entry point for SDK, manages API credentials and account configuration | fetch_tools(), set_accounts() |
StackOneTool | Represents a single executable tool with schema and execution logic | execute(), call(), to_openai_function(), to_langchain() |
Tools | Collection container providing tool lookup, filtering, and batch conversion | get_tool(), to_langchain(), meta_tools() |
ToolIndex | Hybrid search engine for tool discovery using BM25 + TF-IDF | search(), initialized with hybrid_alpha=0.2 |
create_feedback_tool() | Factory for feedback collection tool | Returns StackOneTool instance |
Sources: stackone_ai/__init__.py1-11 README.md53-69
Lifecycle Stages:
StackOneToolSet created with API key from environment (STACKONE_API_KEY) or explicit parameterfetch_tools() queries MCP service with filtering criteriaactions=["hris_*"]) applied to tool namesTools container with lookup methodstool.call() or tool.execute() triggers RPC invocation with parameter validationSources: README.md53-69 README.md72-103
Integration Method Mapping:
| Framework | Conversion Method | Output Type | Location |
|---|---|---|---|
| OpenAI | tool.to_openai_function() | OpenAI function calling dict | stackone_ai/models.py |
| LangChain | tool.to_langchain() or tools.to_langchain() | langchain_core.tools.BaseTool | stackone_ai/models.py |
| LangGraph | to_tool_node(langchain_tools) | ToolNode | stackone_ai/integrations/langgraph.py |
| CrewAI | Uses LangChain tools directly | langchain_core.tools.BaseTool | N/A (native compatibility) |
Sources: README.md159-279 README.md23-27
Infrastructure Components:
| Component | Purpose | Key Features |
|---|---|---|
| Nix Flake | Reproducible development environments | Python 3.10-3.13 support, auto-installs dependencies |
| uv | Fast Python package manager | Manages uv.lock, replaces pip |
| just | Task automation | Provides install, lint, test, build, publish commands |
| ty | Type checker | Validates types with PEP 561 compliance (py.typed marker) |
| ruff | Linter/formatter | 110-char line limit, PEP 8 compliance |
| release-please | Automated releases | Conventional commits → version bumps → PyPI publish |
Sources: pyproject.toml1-119 README.md341-372
Dependency Rationale:
requests (migration completed in v2.0.0)BaseTool interface for LangChain/CrewAI compatibilitySources: pyproject.toml21-63 CHANGELOG.md52
| Attribute | Value | Notes |
|---|---|---|
| Current Version | 2.1.1 | Published 2026-01-22 |
| Python Support | 3.10, 3.11, 3.12, 3.13 | Python 3.9 dropped in v2.0.0 |
| License | MIT | See LICENSE |
| Package Name | stackone-ai | PyPI distribution |
| Repository | StackOneHQ/stackone-ai-python | GitHub |
Breaking Changes in v2.0.0:
getTools() method (replaced by fetch_tools())requests to httpx librarySources: pyproject.toml1-20 stackone_ai/__init__.py11 CHANGELOG.md30-72
What This SDK Does:
What This SDK Does Not Do:
fetch_tools() call)Sources: README.md10-14
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.