from crewai import Agent, Task, Crew, Process
# Different models for different agent capabilities
fast_llm = LLM(model="openai/qwen3-4b", api_key="your-key", base_url="https://api.venice.ai/api/v1")
smart_llm = LLM(model="openai/zai-org-glm-4.7", api_key="your-key", base_url="https://api.venice.ai/api/v1")
uncensored_llm = LLM(model="openai/venice-uncensored", api_key="your-key", base_url="https://api.venice.ai/api/v1")
# Market Analyst - needs intelligence
market_analyst = Agent(
role="Market Research Analyst",
goal="Analyze market trends and competitive landscape",
backstory="You are a veteran market analyst with 15 years of experience "
"in tech markets. You provide unbiased, data-driven insights.",
llm=smart_llm,
verbose=True,
)
# Red Team - benefits from uncensored thinking
red_team = Agent(
role="Red Team Critic",
goal="Find weaknesses, risks, and potential failures in business strategies",
backstory="You are a brutally honest critic who stress-tests ideas. "
"You find every possible flaw and risk, no matter how uncomfortable.",
llm=uncensored_llm, # Uncensored for honest criticism
verbose=True,
)
# Strategist - needs reasoning
strategist = Agent(
role="Business Strategist",
goal="Synthesize analysis into actionable strategy recommendations",
backstory="You are a McKinsey-trained strategist who creates clear, "
"actionable plans from complex analyses.",
llm=smart_llm,
verbose=True,
)
# Tasks
market_task = Task(
description="Analyze the market opportunity for: {product_idea}. "
"Cover market size, competitors, trends, and target audience.",
expected_output="Structured market analysis with TAM/SAM/SOM estimates, "
"top 5 competitors, and 3 key market trends.",
agent=market_analyst,
)
critique_task = Task(
description="Critically evaluate this product idea and market analysis. "
"Find every weakness, risk, and potential failure mode. Be brutally honest.",
expected_output="A list of at least 5 critical risks, 3 potential failure modes, "
"and honest assessment of whether this idea will succeed.",
agent=red_team,
context=[market_task],
)
strategy_task = Task(
description="Based on the market analysis and red team critique, "
"create a go-to-market strategy that addresses the identified risks.",
expected_output="A clear go-to-market strategy with: positioning statement, "
"3 key differentiators, launch timeline, and risk mitigations.",
agent=strategist,
context=[market_task, critique_task],
)
crew = Crew(
agents=[market_analyst, red_team, strategist],
tasks=[market_task, critique_task, strategy_task],
process=Process.sequential,
verbose=True,
)
result = crew.kickoff(inputs={
"product_idea": "A privacy-first AI coding assistant that runs on Venice API"
})
print(result)