Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions agentstack/frameworks/crewai.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
from agentstack.agents import AgentConfig
from agentstack.generation import asttools

try:
from crewai.tools import tool as _crewai_tool_decorator
except ImportError:
raise ValidationError("Could not import `crewai`. Is this an AgentStack CrewAI project?")

ENTRYPOINT: Path = Path('src/crew.py')


Expand Down Expand Up @@ -330,6 +325,11 @@ def get_tool_callables(tool_name: str) -> list[Callable]:
"""
Get a tool implementations for use directly by a CrewAI agent.
"""
try:
from crewai.tools import tool as _crewai_tool_decorator
except ImportError:
raise ValidationError("Could not import `crewai`. Is this an AgentStack CrewAI project?")

tool_funcs = []
tool_config = ToolConfig.from_tool_name(tool_name)
for tool_func_name in tool_config.tools:
Expand Down
Loading