@memberjunction/ai-agent-manager 2.103.0 → 2.104.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
 
2
- > @memberjunction/ai-agent-manager@2.103.0 build
2
+ > @memberjunction/ai-agent-manager@2.104.0 build
3
3
  > tsc
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @memberjunction/ai-agent-manager
2
2
 
3
+ ## 2.104.0
4
+
3
5
  ## 2.103.0
4
6
 
5
7
  ### Patch Changes
@@ -15,32 +15,31 @@ export interface AIAgentDefinition {
15
15
  description: string;
16
16
  readonly type: 'Loop';
17
17
  purpose: string;
18
- requirements: {
19
- businessGoal: string;
20
- functionalRequirements: string;
21
- technicalRequirements: string;
22
- dataRequirements: string;
23
- integrationRequirements: string;
24
- assumptions: string;
25
- risks: string;
26
- outOfScope: string;
27
- };
28
- successCriteria: string;
29
- design: {
30
- actions: [
31
- {
32
- id: string;
33
- name: string;
34
- reason: string;
35
- }
36
- ];
37
- subAgents?: AIAgentDefinition[];
38
- };
18
+ actions: {
19
+ /** Action ID from the system action library */
20
+ id: string;
21
+ /** Human-readable name of the action */
22
+ name: string;
23
+ /** Justification for why this action is needed */
24
+ reason: string;
25
+ }[];
39
26
  prompt: {
40
- systemPrompt: string;
41
- templateVariables: string;
42
- promptNotes: string;
27
+ /** System prompt for this agent */
28
+ systemPrompt?: string;
29
+ /** Template variables documentation */
30
+ templateVariables?: string;
31
+ /** Prompt analysis and notes */
32
+ promptNotes?: string;
43
33
  };
34
+ payloadDownstreamPaths?: string[];
35
+ payloadUpstreamPaths?: string[];
36
+ subAgents?: AIAgentDefinition[];
37
+ executionOrder?: number;
38
+ exposeAsAction?: boolean;
39
+ iconClass?: string;
40
+ finalPayloadValidation?: string;
41
+ finalPayloadValidationMode?: 'Retry' | 'Fail' | 'Warn';
42
+ finalPayloadValidationMaxRetries?: number;
44
43
  }
45
44
  /**
46
45
  * Root context for the Agent Manager that tracks the entire creation process
@@ -61,4 +60,99 @@ export interface AIAgentManagerContext {
61
60
  report: string;
62
61
  };
63
62
  }
63
+ /**
64
+ * Agent Manager Payload Definition
65
+ * This type defines the structure for data passed between Agent Manager sub-agents
66
+ */
67
+ export interface AgentManagerPayload {
68
+ /**
69
+ * Metadata about the agent creation process
70
+ */
71
+ metadata: {
72
+ /** Unique identifier for this agent creation session */
73
+ sessionId: string;
74
+ /** Current status of the agent creation process */
75
+ status: 'requirements' | 'design' | 'prompting' | 'implementation' | 'validation' | 'complete';
76
+ /** Original user request for agent creation */
77
+ originalRequest: string;
78
+ /** The agent who last modified the payload */
79
+ lastModifiedBy: string;
80
+ };
81
+ /**
82
+ * Requirements Analyst agent section
83
+ */
84
+ requirements?: {
85
+ /** High-level business objective this agent will serve */
86
+ businessGoal: string;
87
+ /** Specific functional capabilities the agent must have */
88
+ functionalRequirements: string;
89
+ /** Technical constraints and requirements */
90
+ technicalRequirements: string;
91
+ /** Data sources and data handling requirements */
92
+ dataRequirements: string;
93
+ /** System integration requirements */
94
+ integrationRequirements: string;
95
+ /** Key assumptions made during requirements gathering */
96
+ assumptions: string;
97
+ /** Identified risks and mitigation strategies */
98
+ risks: string;
99
+ /** Explicitly defined scope boundaries */
100
+ outOfScope: string;
101
+ /** Measurable criteria for success */
102
+ successCriteria: string;
103
+ };
104
+ /**
105
+ * Planning Designer agent section
106
+ */
107
+ design?: {
108
+ /** Complete agent hierarchy structure */
109
+ agentHierarchy: AIAgentDefinition;
110
+ /** Architecture documentation */
111
+ architecture: {
112
+ /** How agents will execute in sequence/parallel */
113
+ executionFlow: string;
114
+ /** How data flows between agents */
115
+ dataFlow: string;
116
+ /** Error handling and recovery strategies */
117
+ errorHandling: string;
118
+ };
119
+ };
120
+ /**
121
+ * Prompt Designer agent section
122
+ */
123
+ prompts?: {
124
+ /** Map of agent names to their prompt configurations */
125
+ [agentName: string]: {
126
+ /** Complete system prompt for the agent */
127
+ systemPrompt: string;
128
+ /** Documentation of template variables used */
129
+ templateVariables: string;
130
+ /** Analysis and optimization notes */
131
+ promptNotes: string;
132
+ };
133
+ };
134
+ /**
135
+ * Agent Manager implementation section
136
+ */
137
+ implementation?: {
138
+ /** Agents that have been created in the system */
139
+ createdAgents: {
140
+ /** Database ID of the created agent */
141
+ id: string;
142
+ /** Name of the agent */
143
+ name: string;
144
+ /** Current status of the agent */
145
+ status: 'created' | 'configured' | 'validated' | 'active';
146
+ }[];
147
+ /** Validation results for the created agent system */
148
+ validationResults: {
149
+ /** ID of the agent that was validated */
150
+ agentId: string;
151
+ /** Whether the agent passed validation */
152
+ isValid: boolean;
153
+ /** Any issues found during validation */
154
+ issues: string[];
155
+ }[];
156
+ };
157
+ }
64
158
  //# sourceMappingURL=agent-definition.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-definition.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/agent-definition.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAEhC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC;IAGhB,YAAY,EAAE;QACZ,YAAY,EAAE,MAAM,CAAC;QACrB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,gBAAgB,EAAE,MAAM,CAAC;QACzB,uBAAuB,EAAE,MAAM,CAAC;QAChC,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,eAAe,EAAE,MAAM,CAAC;IAGxB,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,EAAE,EAAE,MAAM,CAAC;gBACX,IAAI,EAAE,MAAM,CAAC;gBACb,MAAM,EAAE,MAAM,CAAA;aACf;SACF,CAAC;QAEF,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;KACjC,CAAC;IAGF,MAAM,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAEpC,KAAK,EAAE,iBAAiB,CAAC;IAGzB,YAAY,EAAE,cAAc,GAAG,QAAQ,GAAG,WAAW,GAAG,gBAAgB,GAAG,YAAY,GAAG,UAAU,CAAC;IAGrG,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAGF,UAAU,CAAC,EAAE;QACX,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
1
+ {"version":3,"file":"agent-definition.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/agent-definition.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAEhC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAGhB,OAAO,EAAE;QACP,+CAA+C;QAC/C,EAAE,EAAE,MAAM,CAAC;QACX,wCAAwC;QACxC,IAAI,EAAE,MAAM,CAAC;QACb,kDAAkD;QAClD,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IAGJ,MAAM,EAAE;QACN,mCAAmC;QACnC,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,uCAAuC;QACvC,iBA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G,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;SAC3D,EAAE,CAAC;QACJ,sDAAsD;QACtD,iBAAiB,EAAE;YACjB,yCAAyC;YACzC,OAAO,EAAE,MAAM,CAAC;YAChB,0CAA0C;YAC1C,OAAO,EAAE,OAAO,CAAC;YACjB,yCAAyC;YACzC,MAAM,EAAE,MAAM,EAAE,CAAC;SAClB,EAAE,CAAC;KACL,CAAC;CACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ai-agent-manager",
3
- "version": "2.103.0",
3
+ "version": "2.104.0",
4
4
  "description": "Core interfaces and types for the MemberJunction Agent Manager system",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,42 +15,45 @@ export interface AIAgentDefinition {
15
15
  // Basic Information
16
16
  name: string;
17
17
  description: string;
18
- readonly type: 'Loop' // ONLY LOOP FOR NOW | 'Sequential' | 'Graph';
18
+ readonly type: 'Loop'; // ONLY LOOP FOR NOW | 'Sequential' | 'Graph';
19
19
  purpose: string;
20
20
 
21
- // Requirements & Specifications
22
- requirements: {
23
- businessGoal: string;
24
- functionalRequirements: string;
25
- technicalRequirements: string;
26
- dataRequirements: string;
27
- integrationRequirements: string;
28
- assumptions: string;
29
- risks: string;
30
- outOfScope: string;
31
- };
32
-
33
- successCriteria: string;
34
-
35
- // Design & Architecture
36
- design: {
37
- actions: [
38
- {
39
- id: string, // id of the action from the available actions in our system
40
- name: string, // name of the action
41
- reason: string // Why this action is needed
42
- }
43
- ];
44
- // Sub-Agents (recursive structure for n-level depth)
45
- subAgents?: AIAgentDefinition[];
46
- };
21
+ // Actions this agent can use
22
+ actions: {
23
+ /** Action ID from the system action library */
24
+ id: string;
25
+ /** Human-readable name of the action */
26
+ name: string;
27
+ /** Justification for why this action is needed */
28
+ reason: string;
29
+ }[];
47
30
 
48
31
  // Prompt Configuration
49
32
  prompt: {
50
- systemPrompt: string;
51
- templateVariables: string;
52
- promptNotes: string;
33
+ /** System prompt for this agent */
34
+ systemPrompt?: string;
35
+ /** Template variables documentation */
36
+ templateVariables?: string;
37
+ /** Prompt analysis and notes */
38
+ promptNotes?: string;
53
39
  };
40
+
41
+ // Payload access control
42
+ payloadDownstreamPaths?: string[];
43
+ payloadUpstreamPaths?: string[];
44
+
45
+ // Recursive sub-agents
46
+ subAgents?: AIAgentDefinition[];
47
+
48
+ // Execution configuration
49
+ executionOrder?: number;
50
+ exposeAsAction?: boolean;
51
+ iconClass?: string;
52
+
53
+ // Final payload validation
54
+ finalPayloadValidation?: string; // JSON validation schema
55
+ finalPayloadValidationMode?: 'Retry' | 'Fail' | 'Warn';
56
+ finalPayloadValidationMaxRetries?: number;
54
57
  }
55
58
 
56
59
  /**
@@ -78,4 +81,104 @@ export interface AIAgentManagerContext {
78
81
  isValid: boolean;
79
82
  report: string;
80
83
  };
84
+ }
85
+
86
+ /**
87
+ * Agent Manager Payload Definition
88
+ * This type defines the structure for data passed between Agent Manager sub-agents
89
+ */
90
+ export interface AgentManagerPayload {
91
+ /**
92
+ * Metadata about the agent creation process
93
+ */
94
+ metadata: {
95
+ /** Unique identifier for this agent creation session */
96
+ sessionId: string;
97
+ /** Current status of the agent creation process */
98
+ status: 'requirements' | 'design' | 'prompting' | 'implementation' | 'validation' | 'complete';
99
+ /** Original user request for agent creation */
100
+ originalRequest: string;
101
+ /** The agent who last modified the payload */
102
+ lastModifiedBy: string;
103
+ };
104
+
105
+ /**
106
+ * Requirements Analyst agent section
107
+ */
108
+ requirements?: {
109
+ /** High-level business objective this agent will serve */
110
+ businessGoal: string;
111
+ /** Specific functional capabilities the agent must have */
112
+ functionalRequirements: string;
113
+ /** Technical constraints and requirements */
114
+ technicalRequirements: string;
115
+ /** Data sources and data handling requirements */
116
+ dataRequirements: string;
117
+ /** System integration requirements */
118
+ integrationRequirements: string;
119
+ /** Key assumptions made during requirements gathering */
120
+ assumptions: string;
121
+ /** Identified risks and mitigation strategies */
122
+ risks: string;
123
+ /** Explicitly defined scope boundaries */
124
+ outOfScope: string;
125
+ /** Measurable criteria for success */
126
+ successCriteria: string;
127
+ };
128
+
129
+ /**
130
+ * Planning Designer agent section
131
+ */
132
+ design?: {
133
+ /** Complete agent hierarchy structure */
134
+ agentHierarchy: AIAgentDefinition;
135
+ /** Architecture documentation */
136
+ architecture: {
137
+ /** How agents will execute in sequence/parallel */
138
+ executionFlow: string;
139
+ /** How data flows between agents */
140
+ dataFlow: string;
141
+ /** Error handling and recovery strategies */
142
+ errorHandling: string;
143
+ };
144
+ };
145
+
146
+ /**
147
+ * Prompt Designer agent section
148
+ */
149
+ prompts?: {
150
+ /** Map of agent names to their prompt configurations */
151
+ [agentName: string]: {
152
+ /** Complete system prompt for the agent */
153
+ systemPrompt: string;
154
+ /** Documentation of template variables used */
155
+ templateVariables: string;
156
+ /** Analysis and optimization notes */
157
+ promptNotes: string;
158
+ };
159
+ };
160
+
161
+ /**
162
+ * Agent Manager implementation section
163
+ */
164
+ implementation?: {
165
+ /** Agents that have been created in the system */
166
+ createdAgents: {
167
+ /** Database ID of the created agent */
168
+ id: string;
169
+ /** Name of the agent */
170
+ name: string;
171
+ /** Current status of the agent */
172
+ status: 'created' | 'configured' | 'validated' | 'active';
173
+ }[];
174
+ /** Validation results for the created agent system */
175
+ validationResults: {
176
+ /** ID of the agent that was validated */
177
+ agentId: string;
178
+ /** Whether the agent passed validation */
179
+ isValid: boolean;
180
+ /** Any issues found during validation */
181
+ issues: string[];
182
+ }[];
183
+ };
81
184
  }