-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
Adding weave into my setup is causes CrewAI "kickoff" to hang indefinitely. I get a pending crewai.Crew.kickoff log that never finishes and the crew never proceeds.
Running the following code results in the process hanging after it logs the kickoff (until I kill it). Removing the weave.init and the process completes in seconds.
Reproduction Example
import dotenv
from crewai import Agent, Task, Crew, Process, LLM
import weave
dotenv.load_dotenv()
llm = LLM(model="bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0", temperature=0.7)
def create_simple_agents():
"""Create a very simple agent for testing"""
simple_agent = Agent(
role="Test Agent",
goal="Answer simple questions",
backstory="You are a helpful test agent that provides brief answers to questions.",
llm=llm,
verbose=True,
allow_delegation=False,
)
return simple_agent
def create_simple_task(user_query, agent):
"""Create a simple task"""
task = Task(
description=f"Answer this question briefly: {user_query}",
agent=agent,
expected_output="A brief, helpful answer to the user's question.",
)
return task
def test_with_weave():
"""Test crew execution with weave - this should hang"""
# Initialize weave - this is where the problem likely occurs
weave.init("weave-bug-testing")
print("Weave initialized successfully")
# Create agent and task
agent = create_simple_agents()
task = create_simple_task("What is 3+3?", agent)
# Create crew
crew = Crew(
agents=[agent],
tasks=[task],
process=Process.sequential,
verbose=True,
)
# Execute crew - this is where it should hang
print("Starting crew execution with weave...")
result = crew.kickoff()
print(f"Result: {result.raw}")
if __name__ == "__main__":
test_with_weave()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
