-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
58 lines (55 loc) · 1.75 KB
/
config.js
File metadata and controls
58 lines (55 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Agent registry for multi-agent support
import { createAgentGraph as createTestAgentGraph } from "./test/graph.js";
import { createAgentGraph as createSupervisorAgentGraph } from "./supervisor/graph.js";
import { createAgentGraph as createFailureAgentGraph } from "./failure/graph.js";
import { createAgentGraph as createWorkorderAgentGraph } from "./workorder/graph.js";
import { createAgentGraph as createPlanningAgentGraph } from "./planning/graph.js";
export const AGENTS = [
{
id: "test",
name: "Test Agent",
createGraph: createTestAgentGraph,
description: "A simple predictive maintenance test agent.",
},
{
id: "supervisor",
name: "Supervisor Agent",
createGraph: createSupervisorAgentGraph,
description:
"Multi-agent workflow: Supervisor coordinates Failure, Workorder, and Planning agents.",
},
{
id: "failure",
name: "Failure Agent",
createGraph: createFailureAgentGraph,
description:
"Handles alerts, retrieves context, and generates incident reports.",
},
{
id: "workorder",
name: "Workorder Agent",
createGraph: createWorkorderAgentGraph,
description: "Receives incident reports and generates workorders.",
},
{
id: "planning",
name: "Planning Agent",
createGraph: createPlanningAgentGraph,
description: "Schedules workorder execution based on context.",
},
];
/**
* Get agent config by id
* @param {string} id
* @returns {object|null}
*/
export function getAgentById(id) {
return AGENTS.find((agent) => agent.id === id) || null;
}
/**
* Get all agent options for UI
* @returns {Array<{id: string, name: string, description: string}>}
*/
export function getAgentOptions() {
return AGENTS.map(({ id, name, description }) => ({ id, name, description }));
}