the-organism / agents /agent_executor.py
digitview's picture
init: clean release of the organism architecture core
f1ba810
Raw History Blame Contribute Delete
810 Bytes
# [LK] agent_executor.py - Feedback-Enabled Orchestrator
import subprocess
def execute_command(brain_tag, task_content):
workflows = {
"02_Creative_Assets": "python C:/Users/leonk/Documents/AI_Projects/ai_workspace/scripts/content_pipeline_generator.py",
"03_Knowledge_Base": "python C:/Users/leonk/Documents/AI_Projects/ai_workspace/scripts/research_archiver.py"
}
if brain_tag in workflows:
result = subprocess.run(workflows[brain_tag].split(), capture_output=True, text=True)
if result.returncode == 0:
return f"SUCCESS: Workflow {brain_tag} completed. Output: {result.stdout[:50]}..."
else:
return f"FAILURE: Workflow {brain_tag} crashed. Error: {result.stderr[:50]}"
return f"LOGGED: Task sent to {brain_tag}"