Spaces:
Running
Running
| from core.pipeline.step import PipelineStep | |
| class InsightsStep(PipelineStep): | |
| name = "insights_agent" | |
| def __init__(self, agent): | |
| self.agent = agent | |
| async def run(self, context): | |
| latest_run = context.runs[-1] if context.runs else None | |
| context.insights = await self.agent.run( | |
| latest_run, | |
| context.trends, | |
| risk_level=context.risk_assessment.risk_level, | |
| language=context.language, | |
| profile=context.runner_profile, | |
| goal=context.active_goal, | |
| ) | |