Agent System Overview - Csp-Ai/EdgePicks GitHub Wiki
π§ Agent System Overview
EdgePicks uses a modular, explainable agent architecture to generate informed NFL Pickβem predictions. Each agent contributes specific expertise, enabling diverse and transparent decision-making.
π― Agent Roles
| Agent | Description |
|---|---|
injuryScout |
Evaluates how player injuries impact team performance and availability |
lineWatcher |
Monitors Vegas line movement and betting trends for anomalies |
statCruncher |
Analyzes season performance data (e.g. yards, penalties, turnovers) |
trendsAgent |
Detects repeatable historical matchup patterns |
guardianAgent |
Flags unreliable data, prevents runaway confidence, ensures ethical bounds |
π Flow-Orchestrated Predictions
Predictions are orchestrated via flows. Each flow defines:
- Input structure (e.g. home/away team, week)
- Agents to run in sequence or parallel
- How scores and confidence weights are combined
- Streaming logic for real-time feedback via SSE (Server-Sent Events)
π‘ Event Streaming Lifecycle
Each agent emits events during a run:
{
sessionId: string;
agent: "statCruncher" | "injuryScout" | ...;
status: "started" | "errored" | "completed";
confidence: number;
weightedScore: number;
durationMs: number;
}
These events are streamed back to the frontend for live rendering and leaderboard updates.
π Source Files
lib/flow/runFlow.ts β main flow runner
pages/api/run-agents.ts β streaming prediction endpoint
components/AgentNodeGraph.tsx β real-time agent graph renderer
components/AgentLeaderboardPanel.tsx β ranks agent performance by session