ReAct and OpenAI Functions agents with business tool access
Multi-step workflow automation
Conversational agents with memory
Advanced error handling and resilience
Copy
Ask AI
from stackone_ai import StackOneToolSetfrom langchain_openai import ChatOpenAI# Initialize and convert toolstoolset = StackOneToolSet()tools = toolset.get_tools("hris_*", account_id="your-account-id")langchain_tools = tools.to_langchain()# Create model with toolsmodel = ChatOpenAI(model="gpt-4o-mini")model_with_tools = model.bind_tools(langchain_tools)# Use the agentresponse = model_with_tools.invoke("List all employees in engineering")# Handle tool executionfor 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}")