Dynamically generate list of agents, try to fix goal changing flow

This commit is contained in:
Laine
2025-03-11 14:48:39 -04:00
parent f13ed70bfe
commit 8db1dcd4a7
6 changed files with 49 additions and 42 deletions

View File

@@ -1,27 +1,17 @@
from pathlib import Path
import json
import tools.goal_registry as goals
def list_agents(args: dict) -> dict:
# file_path = Path(__file__).resolve().parent / "goal_regsitry.py"
#if not file_path.exists():
# return {"error": "Data file not found."}
agents = []
agents.append(
{
"agent_name": "Event Flight Helper",
"goal_id": "goal_event_flight_invoice",
"agent_description": "Helps users find interesting events and arrange travel to them",
}
)
agents.append(
{
"agent_name": "Soccer Train Thing Guy",
"goal_id": "goal_match_train_invoice",
"agent_description": "Something about soccer and trains and stuff",
}
)
if goals.goal_list is not None:
for goal in goals.goal_list:
agents.append(
{
"agent_name": goal.agent_name,
"goal_id": goal.id,
"agent_description": goal.agent_friendly_description,
}
)
return {
"agents": agents,
}
}