Documentation Index
Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
Use this file to discover all available pages before exploring further.
Build sophisticated multi-agent AI systems where specialised agents collaborate to complete complex business tasks using StackOne’s infrastructure of thousands of turnkey tools, RPC orchestration, and MCP/A2A entry points.
CrewAI may have compatibility issues with StackOne’s LangChain tools depending on your CrewAI and pydantic versions. If you encounter a ValidationError for BaseTool, check for version updates or use the OpenAI integration instead.
Overview
- Multi-agent collaboration with business data access
- Specialized agents for different business functions
- Complex workflow automation with task dependencies
- Enhanced error handling and monitoring
from crewai import Agent, Crew, Task
from stackone_ai import StackOneToolSet
def create_hr_crew(account_id: str):
"""
Create multi-agent crew with tools for a specific account.
In production, account_id comes from:
- User/tenant context
- Authentication middleware
- Database lookup
"""
# Initialize toolset
toolset = StackOneToolSet()
# Fetch tools dynamically for this account
tools = toolset.fetch_tools(
account_ids=[account_id]
).to_langchain()
# Optional: Filter by operation type for security
# read_only_tools = toolset.fetch_tools(
# account_ids=[account_id],
# actions=["*_list_*", "*_get_*"] # Only list and get operations
# ).to_langchain()
# Create specialized agents
hr_manager = Agent(
role="HR Manager",
goal="Manage employee data and handle HR requests",
backstory="Expert in human resources with experience in employee management",
tools=tools,
llm="gpt-5.4",
verbose=True
)
recruiter = Agent(
role="Recruiter",
goal="Find and evaluate candidates for open positions",
backstory="Experienced recruiter with talent acquisition expertise",
tools=tools,
llm="gpt-5.4",
verbose=True
)
# Create collaborative tasks
employee_analysis_task = Task(
description="Analyze current employee distribution by department",
agent=hr_manager,
expected_output="Employee distribution report with staffing recommendations"
)
# Execute multi-agent crew
crew = Crew(
agents=[hr_manager, recruiter],
tasks=[employee_analysis_task],
verbose=True
)
return crew
# Usage: Get account from user context
# Get account ID from your app's auth context or StackOne dashboard
account_id = "your-account-id"
crew = create_hr_crew(account_id)
result = crew.kickoff()
print(result)
Example