From 22dd5d09b803c2a3937a82d92b85c7e8aa4c02db Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:20:20 +0100 Subject: [PATCH 1/4] docs: add comprehensive LangChain integration section to README - Add detailed LangChain integration examples showing tool conversion and usage - Include CrewAI integration section demonstrating LangChain compatibility - Provide practical code examples for model binding and tool execution - Position section after Meta Tools for logical flow --- README.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/README.md b/README.md index 1c5105e..cef7e07 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,69 @@ execute_tool = meta_tools.get_tool("meta_execute_tool") result = execute_tool.call(toolName="hris_list_employees", params={"limit": 10}) ``` +## LangChain Integration + +StackOne tools work seamlessly with LangChain, enabling powerful AI agent workflows: + +```python +from langchain_openai import ChatOpenAI +from stackone_ai import StackOneToolSet + +# Initialize StackOne tools +toolset = StackOneToolSet() +tools = toolset.get_tools("hris_*", account_id="your-account-id") + +# Convert to LangChain format +langchain_tools = tools.to_langchain() + +# Use with LangChain models +model = ChatOpenAI(model="gpt-4o-mini") +model_with_tools = model.bind_tools(langchain_tools) + +# Execute AI-driven tool calls +response = model_with_tools.invoke("Get employee information for ID: emp123") + +# Handle tool calls +for tool_call in response.tool_calls: + tool = tools.get_tool(tool_call["name"]) + if tool: + result = tool.execute(tool_call["args"]) + print(f"Result: {result}") +``` + +### CrewAI Integration + +CrewAI uses LangChain tools natively, making integration seamless: + +```python +from crewai import Agent, Crew, Task +from stackone_ai import StackOneToolSet + +# Get tools and convert to LangChain format +toolset = StackOneToolSet() +tools = toolset.get_tools("hris_*", account_id="your-account-id") +langchain_tools = tools.to_langchain() + +# Create CrewAI agent with StackOne tools +agent = Agent( + role="HR Manager", + goal="Analyze employee data and generate insights", + backstory="Expert in HR analytics and employee management", + tools=langchain_tools, + llm="gpt-4o-mini" +) + +# Define task and execute +task = Task( + description="Find all employees in the engineering department", + agent=agent, + expected_output="List of engineering employees with their details" +) + +crew = Crew(agents=[agent], tasks=[task]) +result = crew.kickoff() +``` + ## Features - Unified interface for multiple SaaS tools From c68ac28efe3b12bcaba9800fd397fd1e2cb2e8ce Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:23:17 +0100 Subject: [PATCH 2/4] docs: move Features section above examples for better structure - Relocated Features section to appear after Quick Start but before detailed examples - Improves README flow by highlighting key features early - Maintains logical progression from installation -> features -> examples --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index cef7e07..ba9bbeb 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,19 @@ employee = employee_tool.call(id="employee-id") employee = employee_tool.execute({"id": "employee-id"}) ``` +## Features + +- Unified interface for multiple SaaS tools +- AI-friendly tool descriptions and parameters +- **Tool Calling**: Direct method calling with `tool.call()` for intuitive usage +- **Glob Pattern Filtering**: Advanced tool filtering with patterns like `"hris_*"` and exclusions `"!hris_delete_*"` +- **Meta Tools** (Beta): Dynamic tool discovery and execution based on natural language queries +- Integration with popular AI frameworks: + - OpenAI Functions + - LangChain Tools + - CrewAI Tools + - LangGraph Tool Node + ## Meta Tools (Beta) Meta tools enable dynamic tool discovery and execution without hardcoding tool names: @@ -111,19 +124,6 @@ crew = Crew(agents=[agent], tasks=[task]) result = crew.kickoff() ``` -## Features - -- Unified interface for multiple SaaS tools -- AI-friendly tool descriptions and parameters -- **Tool Calling**: Direct method calling with `tool.call()` for intuitive usage -- **Glob Pattern Filtering**: Advanced tool filtering with patterns like `"hris_*"` and exclusions `"!hris_delete_*"` -- **Meta Tools** (Beta): Dynamic tool discovery and execution based on natural language queries -- Integration with popular AI frameworks: - - OpenAI Functions - - LangChain Tools - - CrewAI Tools - - LangGraph Tool Node - ## Documentation For more examples and documentation, visit: From 6111c7d011cd40acc3f828188be203d973a3edbc Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 14 Aug 2025 17:01:39 +0100 Subject: [PATCH 3/4] docs: restructure README sections and fix documentation links - Move Features section immediately after project overview - Restructure LangChain and CrewAI integrations into collapsible Integration Examples section - Reorder Meta Tools section to appear after Integration Examples - Replace broken docs/ links with working examples/ directory links - Consolidate documentation sections into single Examples section --- README.md | 92 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index ba9bbeb..fbd8f6f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,19 @@ StackOne AI provides a unified interface for accessing various SaaS tools through AI-friendly APIs. +## Features + +- Unified interface for multiple SaaS tools +- AI-friendly tool descriptions and parameters +- **Tool Calling**: Direct method calling with `tool.call()` for intuitive usage +- **Glob Pattern Filtering**: Advanced tool filtering with patterns like `"hris_*"` and exclusions `"!hris_delete_*"` +- **Meta Tools** (Beta): Dynamic tool discovery and execution based on natural language queries +- Integration with popular AI frameworks: + - OpenAI Functions + - LangChain Tools + - CrewAI Tools + - LangGraph Tool Node + ## Installation ```bash @@ -30,38 +43,10 @@ employee = employee_tool.call(id="employee-id") employee = employee_tool.execute({"id": "employee-id"}) ``` -## Features +## Integration Examples -- Unified interface for multiple SaaS tools -- AI-friendly tool descriptions and parameters -- **Tool Calling**: Direct method calling with `tool.call()` for intuitive usage -- **Glob Pattern Filtering**: Advanced tool filtering with patterns like `"hris_*"` and exclusions `"!hris_delete_*"` -- **Meta Tools** (Beta): Dynamic tool discovery and execution based on natural language queries -- Integration with popular AI frameworks: - - OpenAI Functions - - LangChain Tools - - CrewAI Tools - - LangGraph Tool Node - -## Meta Tools (Beta) - -Meta tools enable dynamic tool discovery and execution without hardcoding tool names: - -```python -# Get meta tools for dynamic discovery -tools = toolset.get_tools("hris_*") -meta_tools = tools.meta_tools() - -# Search for relevant tools using natural language -filter_tool = meta_tools.get_tool("meta_filter_relevant_tools") -results = filter_tool.call(query="manage employees", limit=5) - -# Execute discovered tools dynamically -execute_tool = meta_tools.get_tool("meta_execute_tool") -result = execute_tool.call(toolName="hris_list_employees", params={"limit": 10}) -``` - -## LangChain Integration +
+LangChain Integration StackOne tools work seamlessly with LangChain, enabling powerful AI agent workflows: @@ -91,7 +76,10 @@ for tool_call in response.tool_calls: print(f"Result: {result}") ``` -### CrewAI Integration +
+ +
+CrewAI Integration CrewAI uses LangChain tools natively, making integration seamless: @@ -124,21 +112,39 @@ crew = Crew(agents=[agent], tasks=[task]) result = crew.kickoff() ``` -## Documentation +
+ +## Meta Tools (Beta) + +Meta tools enable dynamic tool discovery and execution without hardcoding tool names: + +```python +# Get meta tools for dynamic discovery +tools = toolset.get_tools("hris_*") +meta_tools = tools.meta_tools() -For more examples and documentation, visit: +# Search for relevant tools using natural language +filter_tool = meta_tools.get_tool("meta_filter_relevant_tools") +results = filter_tool.call(query="manage employees", limit=5) + +# Execute discovered tools dynamically +execute_tool = meta_tools.get_tool("meta_execute_tool") +result = execute_tool.call(toolName="hris_list_employees", params={"limit": 10}) +``` -- [Error Handling](docs/error-handling.md) -- [StackOne Account IDs](docs/stackone-account-ids.md) -- [Available Tools](docs/available-tools.md) -- [File Uploads](docs/file-uploads.md) +## Examples -## AI Framework Integration +For more examples, check out the [examples/](examples/) directory: -- [OpenAI Integration](docs/openai-integration.md) -- [LangChain Integration](docs/langchain-integration.md) -- [CrewAI Integration](docs/crewai-integration.md) -- [LangGraph Tool Node](docs/langgraph-tool-node.md) +- [Error Handling](examples/error_handling.py) +- [StackOne Account IDs](examples/stackone_account_ids.py) +- [Available Tools](examples/available_tools.py) +- [File Uploads](examples/file_uploads.py) +- [OpenAI Integration](examples/openai_integration.py) +- [LangChain Integration](examples/langchain_integration.py) +- [CrewAI Integration](examples/crewai_integration.py) +- [LangGraph Tool Node](examples/langgraph_tool_node.py) +- [Meta Tools](examples/meta_tools_example.py) ## License From 33fd80106a020084c84b67dee63aefd43c86db31 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Thu, 14 Aug 2025 17:02:32 +0100 Subject: [PATCH 4/4] docs: add PyPI and GitHub release badges to README - Add PyPI version badge linking to package page - Add GitHub release badge showing latest version - Improve README visual appeal and provide quick access to version info --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index fbd8f6f..7d0108e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # StackOne AI SDK +[![PyPI version](https://badge.fury.io/py/stackone-ai.svg)](https://badge.fury.io/py/stackone-ai) +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/StackOneHQ/stackone-ai-python)](https://github.com/StackOneHQ/stackone-ai-python/releases) + StackOne AI provides a unified interface for accessing various SaaS tools through AI-friendly APIs. ## Features