LATE.IO2 / backend /scripts /deploy_from_manifest.py
AIEINC
Initial Hugging Face Space deployment
5e1dfdc
import csv
from core.supervisor import Supervisor
from core.agents.base_agent import Agent
supervisor = Supervisor()
def parse_condition(expr):
field, op_val = expr.split(">", 1)
field = field.strip()
val = float(op_val.strip('% '))
return lambda metrics: metrics.get(field, 0) > val
def load_agents_from_csv(csv_path="master_plan.csv"):
with open(csv_path) as f:
reader = csv.DictReader(f)
for row in reader:
agent = Agent(
id=row['agent_id'],
role=row['role'],
target_env=row['target_env'],
dependencies=row['dependencies'].split(';'),
trigger=parse_condition(row['trigger_condition'])
)
supervisor.register_agent(agent)