from typing import TypedDict, Any, Optional, Tuple
from langfuse import get_client
from agent.stage.teste import TestAgent
from app.common.timed import timed
import asyncio
import copy
import os
import json
from typing import Any, Dict, Iterator, Tuple

class CustomerPipeline:
    def __init__(self):
        self.agent = TestAgent(streaming=True)
        self.stage = "presentation"

    def start(self):
        return "presentation", ""

    def prepare(self, elegibility: bool, protocol: str):
        pass

    @timed("Agent run") 
    def run(self, user_input: Any): 
        return self.agent.run_stream(user_input)

    @timed("Agent end service") 
    async def end_service(self): 
        return await self._end_service()

    async def _end_service(self): 
        return {}
