kaikaidai commited on
Commit
95bea1f
·
1 Parent(s): 651020c

Fix agno workflow import

Browse files
Files changed (2) hide show
  1. requirements.txt +1 -1
  2. src/workflows_v2.py +11 -7
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
  # Core Framework
2
- agno>=1.8.2
3
  streamlit>=1.47.0
4
  fastapi>=0.104.0
5
 
 
1
  # Core Framework
2
+ agno>=2.0.7
3
  streamlit>=1.47.0
4
  fastapi>=0.104.0
5
 
src/workflows_v2.py CHANGED
@@ -5,8 +5,8 @@ from agno.agent import Agent
5
  from agno.models.openai import OpenAIChat
6
  from agno.tools.googlesearch import GoogleSearchTools
7
  from agno.utils.pprint import pprint_run_response
8
- from agno.workflow.v2.types import WorkflowExecutionInput
9
- from agno.workflow.v2.workflow import Workflow
10
  from pydantic import BaseModel, Field
11
 
12
  from dotenv import load_dotenv
@@ -171,8 +171,7 @@ def create_agents(model_id: str = DEFAULT_MODEL_ID):
171
  # --- Execution function ---
172
  @instrument("Startup Idea Validation Workflow")
173
  async def startup_validation_execution(
174
- workflow: Workflow,
175
- execution_input: WorkflowExecutionInput, # This is a Pydantic model to ensure type safety
176
  startup_idea: str,
177
  model_id: str = DEFAULT_MODEL_ID,
178
  progress_callback=None,
@@ -187,7 +186,7 @@ async def startup_validation_execution(
187
  idea_clarifier_agent, market_research_agent, competitor_analysis_agent, report_agent = create_agents(model_id)
188
 
189
  # Get inputs
190
- message: str = execution_input.message
191
  idea: str = startup_idea
192
 
193
  if not idea:
@@ -443,8 +442,13 @@ async def startup_validation_execution(
443
  startup_validation_workflow = Workflow(
444
  name="Startup Idea Validator",
445
  description="Comprehensive startup idea validation with market research and competitive analysis",
446
- steps=startup_validation_execution,
447
- workflow_session_state={}, # Initialize empty workflow session state
 
 
 
 
 
448
  )
449
 
450
 
 
5
  from agno.models.openai import OpenAIChat
6
  from agno.tools.googlesearch import GoogleSearchTools
7
  from agno.utils.pprint import pprint_run_response
8
+ from agno.workflow.step import Step
9
+ from agno.workflow.workflow import Workflow
10
  from pydantic import BaseModel, Field
11
 
12
  from dotenv import load_dotenv
 
171
  # --- Execution function ---
172
  @instrument("Startup Idea Validation Workflow")
173
  async def startup_validation_execution(
174
+ step_input, # Step input object containing workflow data
 
175
  startup_idea: str,
176
  model_id: str = DEFAULT_MODEL_ID,
177
  progress_callback=None,
 
186
  idea_clarifier_agent, market_research_agent, competitor_analysis_agent, report_agent = create_agents(model_id)
187
 
188
  # Get inputs
189
+ message: str = step_input.input if hasattr(step_input, 'input') else "Validate this startup idea"
190
  idea: str = startup_idea
191
 
192
  if not idea:
 
442
  startup_validation_workflow = Workflow(
443
  name="Startup Idea Validator",
444
  description="Comprehensive startup idea validation with market research and competitive analysis",
445
+ steps=[
446
+ Step(
447
+ name="startup_validation",
448
+ executor=startup_validation_execution,
449
+ description="Execute complete startup validation workflow"
450
+ )
451
+ ]
452
  )
453
 
454