import json import os import sys sys.path.append(os.path.dirname(os.path.dirname(__file__))) from ai_client import AIClient class SequenceAgent: def __init__(self): self.config = self.load_config() def load_config(self): config_path = os.path.join('config', 'sequence_agent_config.json') with open(config_path, 'r') as f: return json.load(f) def process(self, process_flow): system_prompt = self.config['system_prompt'] instructions = '\n'.join(self.config['instructions']) full_prompt = f"{system_prompt}\n\n{instructions}" ai_client = AIClient() return ai_client.generate_response(full_prompt, process_flow)