@@ -52,17 +52,18 @@ uv add 'stackone-ai[mcp,examples]'
5252## Quick Start
5353
5454``` python
55+ import os
5556from stackone_ai import StackOneToolSet
5657
57- # Initialize with API key
58- toolset = StackOneToolSet() # Uses STACKONE_API_KEY env var
59- # Or explicitly: toolset = StackOneToolSet(api_key="your-api-key")
58+ # Initialize — reads STACKONE_API_KEY from environment
59+ toolset = StackOneToolSet()
6060
61- # Get HRIS-related tools with glob patterns
62- tools = toolset.fetch_tools(actions = [" bamboohr_*" ], account_ids = [" your-account-id" ])
61+ # Fetch tools — pass account ID from STACKONE_ACCOUNT_ID env var
62+ account_id = os.getenv(" STACKONE_ACCOUNT_ID" )
63+ tools = toolset.fetch_tools(actions = [" workday_*" ], account_ids = [account_id])
6364
6465# Use a specific tool with the call method
65- employee_tool = tools.get_tool(" bamboohr_get_employee " )
66+ employee_tool = tools.get_tool(" workday_get_worker " )
6667# Call with keyword arguments
6768employee = employee_tool.call(id = " employee-id" )
6869# Or with traditional execute method
@@ -86,7 +87,7 @@ toolset = StackOneToolSet()
8687tools = toolset.fetch_tools(account_ids = [" acc-123" , " acc-456" ])
8788
8889# Filter by providers (case-insensitive)
89- tools = toolset.fetch_tools(providers = [" hibob" , " bamboohr " ])
90+ tools = toolset.fetch_tools(providers = [" hibob" , " workday " ])
9091
9192# Filter by action patterns with glob support
9293tools = toolset.fetch_tools(actions = [" *_list_employees" ])
@@ -106,11 +107,11 @@ tools = toolset.fetch_tools(providers=["hibob"])
106107** Filtering Options:**
107108
108109- ** ` account_ids ` ** : Filter tools by account IDs. Tools will be loaded for each specified account.
109- - ** ` providers ` ** : Filter by provider names (e.g., ` ["hibob", "bamboohr "] ` ). Case-insensitive matching.
110+ - ** ` providers ` ** : Filter by provider names (e.g., ` ["hibob", "workday "] ` ). Case-insensitive matching.
110111- ** ` actions ` ** : Filter by action patterns with glob support:
111- - Exact match: ` ["bamboohr_list_employees "] `
112+ - Exact match: ` ["workday_list_workers "] `
112113 - Glob pattern: ` ["*_list_employees"] ` matches all tools ending with ` _list_employees `
113- - Provider prefix: ` ["bamboohr_ *"] ` matches all BambooHR tools
114+ - Provider prefix: ` ["workday_ *"] ` matches all Workday tools
114115
115116## Implicit Feedback (Beta)
116117
@@ -165,12 +166,14 @@ When two calls for the same session happen within a few seconds, the SDK emits a
165166StackOne tools work seamlessly with LangChain, enabling powerful AI agent workflows:
166167
167168``` python
169+ import os
168170from langchain_openai import ChatOpenAI
169171from stackone_ai import StackOneToolSet
170172
171173# Initialize StackOne tools
172174toolset = StackOneToolSet()
173- tools = toolset.fetch_tools(actions = [" bamboohr_*" ], account_ids = [" your-account-id" ])
175+ account_id = os.getenv(" STACKONE_ACCOUNT_ID" )
176+ tools = toolset.fetch_tools(actions = [" workday_*" ], account_ids = [account_id])
174177
175178# Convert to LangChain format
176179langchain_tools = tools.to_langchain()
@@ -204,6 +207,7 @@ pip install langgraph langchain-openai
204207```
205208
206209``` python
210+ import os
207211from langchain_openai import ChatOpenAI
208212from typing import Annotated
209213from typing_extensions import TypedDict
@@ -217,7 +221,8 @@ from stackone_ai.integrations.langgraph import to_tool_node, bind_model_with_too
217221
218222# Prepare tools
219223toolset = StackOneToolSet()
220- tools = toolset.fetch_tools(actions = [" bamboohr_*" ], account_ids = [" your-account-id" ])
224+ account_id = os.getenv(" STACKONE_ACCOUNT_ID" )
225+ tools = toolset.fetch_tools(actions = [" workday_*" ], account_ids = [account_id])
221226langchain_tools = tools.to_langchain()
222227
223228class State (TypedDict ):
@@ -250,12 +255,14 @@ _ = app.invoke({"messages": [("user", "Get employee with id emp123") ]})
250255CrewAI uses LangChain tools natively, making integration seamless:
251256
252257``` python
258+ import os
253259from crewai import Agent, Crew, Task
254260from stackone_ai import StackOneToolSet
255261
256262# Get tools and convert to LangChain format
257263toolset = StackOneToolSet()
258- tools = toolset.fetch_tools(actions = [" bamboohr_*" ], account_ids = [" your-account-id" ])
264+ account_id = os.getenv(" STACKONE_ACCOUNT_ID" )
265+ tools = toolset.fetch_tools(actions = [" workday_*" ], account_ids = [account_id])
259266langchain_tools = tools.to_langchain()
260267
261268# Create CrewAI agent with StackOne tools
@@ -297,7 +304,7 @@ feedback_tool = tools.get_tool("tool_feedback")
297304result = feedback_tool.call(
298305 feedback = " The HRIS tools are working great! Very fast response times." ,
299306 account_id = " acc_123456" ,
300- tool_names = [" bamboohr_list_employees " , " bamboohr_get_employee " ]
307+ tool_names = [" workday_list_workers " , " workday_get_worker " ]
301308)
302309```
303310
@@ -313,9 +320,12 @@ Search for tools using natural language queries. Works with both semantic (cloud
313320### Basic Usage
314321
315322``` python
323+ import os
324+
316325# Get a callable search tool
317326toolset = StackOneToolSet()
318- all_tools = toolset.fetch_tools(account_ids = [" your-account-id" ])
327+ account_id = os.getenv(" STACKONE_ACCOUNT_ID" )
328+ all_tools = toolset.fetch_tools(account_ids = [account_id])
319329search_tool = toolset.get_search_tool()
320330
321331# Search for relevant tools — returns a Tools collection
@@ -327,15 +337,17 @@ tools[0](limit=10)
327337
328338## Semantic Search
329339
330- Discover tools using natural language instead of exact names. Queries like "onboard new hire" resolve to the right actions even when the tool is called ` bamboohr_create_employee ` .
340+ Discover tools using natural language instead of exact names. Queries like "onboard new hire" resolve to the right actions even when the tool is called ` workday_create_employee ` .
331341
332342``` python
343+ import os
333344from stackone_ai import StackOneToolSet
334345
335346toolset = StackOneToolSet()
336347
337348# Search by intent — returns Tools collection ready for any framework
338- tools = toolset.search_tools(" manage employee records" , account_ids = [" your-account-id" ], top_k = 5 )
349+ account_id = os.getenv(" STACKONE_ACCOUNT_ID" )
350+ tools = toolset.search_tools(" manage employee records" , account_ids = [account_id], top_k = 5 )
339351openai_tools = tools.to_openai()
340352
341353# Lightweight: inspect results without fetching full tool definitions
@@ -357,19 +369,31 @@ tools = toolset.search_tools("manage employees", search="semantic")
357369tools = toolset.search_tools(" manage employees" , search = " local" )
358370```
359371
360- Results are automatically scoped to connectors in your linked accounts. See [ Semantic Search Example] ( examples/semantic_search_example .py ) for ` SearchTool ` (` get_search_tool ` ) integration, OpenAI, and LangChain patterns.
372+ Results are automatically scoped to connectors in your linked accounts. See [ Search Tools Example] ( examples/search_tools .py ) for ` SearchTool ` (` get_search_tool ` ) integration, OpenAI, and LangChain patterns.
361373
362374## Examples
363375
364376For more examples, check out the [ examples/] ( examples/ ) directory:
365377
366- - [ StackOne Account IDs] ( examples/stackone_account_ids.py )
367- - [ File Uploads] ( examples/file_uploads.py )
368- - [ OpenAI Integration] ( examples/openai_integration.py )
369- - [ LangChain Integration] ( examples/langchain_integration.py )
370- - [ CrewAI Integration] ( examples/crewai_integration.py )
371- - [ Search Tool] ( examples/search_tool_example.py )
372- - [ Semantic Search] ( examples/semantic_search_example.py )
378+ - [ OpenAI Integration] ( examples/openai_integration.py ) — OpenAI function calling
379+ - [ LangChain Integration] ( examples/langchain_integration.py ) — LangChain tools
380+ - [ CrewAI Integration] ( examples/crewai_integration.py ) — CrewAI agent
381+ - [ Search Tools] ( examples/search_tools.py ) — Tool discovery (semantic, local, auto search)
382+ - [ Auth Management] ( examples/auth_management.py ) — API key and account ID patterns
383+
384+ ### Running Examples
385+
386+ ``` bash
387+ # 1. Set up credentials
388+ cp .env.example .env
389+ # Edit .env with your API keys
390+
391+ # 2. Install dependencies
392+ uv sync --all-extras
393+
394+ # 3. Run any example
395+ uv run examples/search_tools.py
396+ ```
373397
374398## Development
375399
0 commit comments