File size: 1,148 Bytes
5a2d62e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from base_agent import BaseAgent
from models import AgentState
from typing import AsyncGenerator
import json

class DeploymentAnalysis(BaseAgent):
    async def __call__(self, state: AgentState) -> AsyncGenerator[str, None]:
        prompt_template = """
        Analyze the following project and identify deployment context:

        Project: {project_name}
        Description: {project_description}
        Architecture Components: {architecture_components}

        Instructions:
        1. Identify the deployment nodes (servers, clients, etc.)
        2. List the artifacts to be deployed
        3. Show the relationships between nodes
        4. Format as a structured list of deployment elements
        """

        async for chunk in self._stream_process(
            state=state,
            prompt_template=prompt_template,
            output_key="deployment_context",
            step_name="extract_deployment",
            project_name=state["project_name"],
            project_description=state["project_description"],
            architecture_components=state.get("architecture_components", "")
        ):
            yield chunk