From e0d0be1d7528f8120a7384d3f136cd54bd0464d1 Mon Sep 17 00:00:00 2001 From: Roger Gomez Date: Thu, 30 Jan 2025 20:49:48 -0500 Subject: [PATCH] Adding a mermaid diagram to help with the process of the agent framework. --- week8/agent_framework.md | 80 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 week8/agent_framework.md diff --git a/week8/agent_framework.md b/week8/agent_framework.md new file mode 100644 index 0000000..f7bf1de --- /dev/null +++ b/week8/agent_framework.md @@ -0,0 +1,80 @@ +```mermaid +--- +title: Deal Agent Framework Classes +--- +classDiagram + class DealAgentFramework{ + collection + memory + planner [PlanningAgent] + read_memory() + write_memory() + log(message) PlanningAgent + run(message) + } + class PlanningAgent{ + scanner [ScannerAgent] + ensemble [EnsembleAgent] + run(Deal) Opportunity + plan(memory) Opportunity + } + class Scanner{ + fetch_deals(memory) List[ScrapedDeal] + make_user_prompt(scraped) str + scan(memory) DealSelection + } + class Ensemble{ + specialist [SpecialistAgent] + frontier_agent [FrontierAgent] + random_forestAgent [RandomForestAgent] + model + price(description) float + } + class DealSelection { + product_description + price + url + } + class ScrapeDeal { + title + summary + url + } +``` + +```mermaid +--- +title: Deal Agent Framework Flow +--- +sequenceDiagram + participant DealAgentFramework + participant PlanningAgent + participant Scanner + participant Ensemble + participant SpecialistAgent + participant FrontierAgent + participant RandomForest + + activate DealAgentFramework + DealAgentFramework->>PlanningAgent: run the plan + activate PlanningAgent + PlanningAgent->>Scanner: run the scan + activate Scanner + Scanner-->>Scanner: fetch deals + Scanner-->>PlanningAgent: return DealSelection + deactivate Scanner + PlanningAgent-->>PlanningAgent: run the workflow of the deals + PlanningAgent->>Ensemble: run the price prediction + activate Ensemble + Ensemble<<->>SpecialistAgent: estimate the price + Ensemble<<->>FrontierAgent: estimate the price + Ensemble<<->>RandomForest: estimate the price + Ensemble->>PlanningAgent: return the prediction + deactivate Ensemble + PlanningAgent-->>PlanningAgent: send the notification + deactivate PlanningAgent + DealAgentFramework->>PlanningAgent: send the notification + DealAgentFramework-->>DealAgentFramework: udate the memory + deactivate DealAgentFramework +``` +