@inkeep/agents-sdk 0.0.0-dev-20251010210603 → 0.0.0-dev-20251012022558

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.
package/dist/index.cjs CHANGED
@@ -56,9 +56,16 @@ var ArtifactComponent = class {
56
56
  __publicField(this, "initialized", false);
57
57
  __publicField(this, "id");
58
58
  this.id = config.id || generateIdFromName(config.name);
59
+ let processedProps;
60
+ if (config.props && schemaConversion.isZodSchema(config.props)) {
61
+ processedProps = schemaConversion.convertZodToJsonSchemaWithPreview(config.props);
62
+ } else {
63
+ processedProps = config.props;
64
+ }
59
65
  this.config = {
60
66
  ...config,
61
- id: this.id
67
+ id: this.id,
68
+ props: processedProps
62
69
  };
63
70
  this.baseURL = process.env.INKEEP_API_URL || "http://localhost:3002";
64
71
  this.tenantId = "default";
@@ -197,9 +204,16 @@ var DataComponent = class {
197
204
  __publicField(this, "initialized", false);
198
205
  __publicField(this, "id");
199
206
  this.id = config.id || generateIdFromName(config.name);
207
+ let processedProps;
208
+ if (config.props && schemaConversion.isZodSchema(config.props)) {
209
+ processedProps = schemaConversion.convertZodToJsonSchema(config.props);
210
+ } else {
211
+ processedProps = config.props;
212
+ }
200
213
  this.config = {
201
214
  ...config,
202
- id: this.id
215
+ id: this.id,
216
+ props: processedProps
203
217
  };
204
218
  this.baseURL = process.env.INKEEP_API_URL || "http://localhost:3002";
205
219
  this.tenantId = "default";
@@ -831,7 +845,7 @@ var SubAgent = class {
831
845
  id: comp.id,
832
846
  name: comp.name,
833
847
  description: comp.description,
834
- props: schemaConversion.convertZodToJsonSchemaWithPreview(comp.props)
848
+ props: schemaConversion.convertZodToJsonSchema(comp.props)
835
849
  };
836
850
  }
837
851
  return comp;
@@ -1833,7 +1847,7 @@ var AgentGraph = class {
1833
1847
  logger8.info(
1834
1848
  {
1835
1849
  graphId: this.graphId,
1836
- agentCount: Object.keys(createdGraph.agents || {}).length
1850
+ agentCount: Object.keys(createdGraph.subAgents || {}).length
1837
1851
  },
1838
1852
  "Agent graph initialized successfully using graph endpoint"
1839
1853
  );
@@ -2349,7 +2363,7 @@ var AgentGraph = class {
2349
2363
  const url = `${this.baseURL}/tenants/${this.tenantId}/graphs/${this.graphId}/v1/chat/completions`;
2350
2364
  logger8.info({ url }, "Executing with backend");
2351
2365
  const requestBody = {
2352
- model: "gpt-4o-mini",
2366
+ model: agentsCore.OPENAI_MODELS.GPT_4_1_MINI,
2353
2367
  messages: normalizedMessages.map((msg) => ({
2354
2368
  role: msg.role,
2355
2369
  content: msg.content
@@ -3170,6 +3184,9 @@ var Project = class {
3170
3184
  }
3171
3185
  return { credentials, usage };
3172
3186
  }
3187
+ async getFullDefinition() {
3188
+ return await this.toFullProjectDefinition();
3189
+ }
3173
3190
  /**
3174
3191
  * Get all graphs in the project
3175
3192
  */
@@ -4043,6 +4060,18 @@ var run = Runner.run.bind(Runner);
4043
4060
  var stream = Runner.stream.bind(Runner);
4044
4061
  var raceGraphs = Runner.raceGraphs.bind(Runner);
4045
4062
 
4063
+ Object.defineProperty(exports, "ANTHROPIC_MODELS", {
4064
+ enumerable: true,
4065
+ get: function () { return agentsCore.ANTHROPIC_MODELS; }
4066
+ });
4067
+ Object.defineProperty(exports, "GOOGLE_MODELS", {
4068
+ enumerable: true,
4069
+ get: function () { return agentsCore.GOOGLE_MODELS; }
4070
+ });
4071
+ Object.defineProperty(exports, "OPENAI_MODELS", {
4072
+ enumerable: true,
4073
+ get: function () { return agentsCore.OPENAI_MODELS; }
4074
+ });
4046
4075
  exports.Agent = SubAgent;
4047
4076
  exports.ArtifactComponent = ArtifactComponent;
4048
4077
  exports.DataComponent = DataComponent;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MCPToolConfig as MCPToolConfig$1, ArtifactComponentInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, SubAgentApiInsert, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, ModelSettings, StatusUpdateSettings, FullGraphDefinition, ToolInsert, McpTransportConfig, StopWhen, SandboxConfig, FullProjectDefinition } from '@inkeep/agents-core';
2
- export { FunctionToolConfig, ModelSettings, SandboxConfig } from '@inkeep/agents-core';
2
+ export { ANTHROPIC_MODELS, FunctionToolConfig, GOOGLE_MODELS, ModelSettings, OPENAI_MODELS, SandboxConfig } from '@inkeep/agents-core';
3
3
  import { z } from 'zod';
4
4
 
5
5
  interface ToolInterface {
@@ -32,6 +32,9 @@ declare class Tool implements ToolInterface {
32
32
  private upsertTool;
33
33
  }
34
34
 
35
+ type ArtifactComponentConfigWithZod = Omit<ArtifactComponentInsert, 'tenantId' | 'projectId' | 'props'> & {
36
+ props?: Record<string, unknown> | z.ZodObject<any> | null;
37
+ };
35
38
  interface ArtifactComponentInterface {
36
39
  config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
37
40
  init(): Promise<void>;
@@ -48,7 +51,7 @@ declare class ArtifactComponent implements ArtifactComponentInterface {
48
51
  private projectId;
49
52
  private initialized;
50
53
  private id;
51
- constructor(config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>);
54
+ constructor(config: ArtifactComponentConfigWithZod);
52
55
  setContext(tenantId: string, projectId: string, baseURL?: string): void;
53
56
  getId(): string;
54
57
  getName(): string;
@@ -86,10 +89,10 @@ interface ComponentConfig {
86
89
  description: string;
87
90
  }
88
91
  interface ArtifactComponentConfig extends ComponentConfig {
89
- props: Record<string, unknown>;
92
+ props: Record<string, unknown> | z.ZodObject<any>;
90
93
  }
91
94
  interface DataComponentConfig extends ComponentConfig {
92
- props: Record<string, unknown>;
95
+ props: Record<string, unknown> | z.ZodObject<any>;
93
96
  }
94
97
  type AgentMcpConfig = {
95
98
  server: Tool;
@@ -122,6 +125,9 @@ type AgentMcpConfig = {
122
125
  */
123
126
  declare function transfer(targetAgent: SubAgent, description?: string, condition?: TransferConditionFunction): TransferConfig;
124
127
 
128
+ type DataComponentConfigWithZod = Omit<DataComponentInsert, 'tenantId' | 'projectId' | 'props'> & {
129
+ props?: Record<string, unknown> | z.ZodObject<any> | null;
130
+ };
125
131
  interface DataComponentInterface {
126
132
  config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
127
133
  init(): Promise<void>;
@@ -138,7 +144,7 @@ declare class DataComponent implements DataComponentInterface {
138
144
  private projectId;
139
145
  private initialized;
140
146
  private id;
141
- constructor(config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>);
147
+ constructor(config: DataComponentConfigWithZod);
142
148
  setContext(tenantId: string, projectId: string, baseURL?: string): void;
143
149
  getId(): string;
144
150
  getName(): string;
@@ -791,8 +797,8 @@ interface ProjectInterface {
791
797
  * name: 'Customer Support System',
792
798
  * description: 'Multi-agent customer support system',
793
799
  * models: {
794
- * base: { model: 'gpt-4o-mini' },
795
- * structuredOutput: { model: 'gpt-4o' }
800
+ * base: { model: 'gpt-4.1-mini' },
801
+ * structuredOutput: { model: 'gpt-4.1' }
796
802
  * },
797
803
  * stopWhen: {
798
804
  * transferCountIs: 10,
@@ -879,6 +885,7 @@ declare class Project implements ProjectInterface {
879
885
  graphId?: string;
880
886
  }>>;
881
887
  }>;
888
+ getFullDefinition(): Promise<FullProjectDefinition>;
882
889
  /**
883
890
  * Get all graphs in the project
884
891
  */
@@ -937,8 +944,8 @@ declare function agentGraph(config: GraphConfig): AgentGraph;
937
944
  * name: 'Customer Support System',
938
945
  * description: 'Multi-agent customer support system',
939
946
  * models: {
940
- * base: { model: 'gpt-4o-mini' },
941
- * structuredOutput: { model: 'gpt-4o' }
947
+ * base: { model: 'gpt-4.1-mini' },
948
+ * structuredOutput: { model: 'gpt-4.1' }
942
949
  * },
943
950
  * stopWhen: {
944
951
  * transferCountIs: 10,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MCPToolConfig as MCPToolConfig$1, ArtifactComponentInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, SubAgentApiInsert, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, ModelSettings, StatusUpdateSettings, FullGraphDefinition, ToolInsert, McpTransportConfig, StopWhen, SandboxConfig, FullProjectDefinition } from '@inkeep/agents-core';
2
- export { FunctionToolConfig, ModelSettings, SandboxConfig } from '@inkeep/agents-core';
2
+ export { ANTHROPIC_MODELS, FunctionToolConfig, GOOGLE_MODELS, ModelSettings, OPENAI_MODELS, SandboxConfig } from '@inkeep/agents-core';
3
3
  import { z } from 'zod';
4
4
 
5
5
  interface ToolInterface {
@@ -32,6 +32,9 @@ declare class Tool implements ToolInterface {
32
32
  private upsertTool;
33
33
  }
34
34
 
35
+ type ArtifactComponentConfigWithZod = Omit<ArtifactComponentInsert, 'tenantId' | 'projectId' | 'props'> & {
36
+ props?: Record<string, unknown> | z.ZodObject<any> | null;
37
+ };
35
38
  interface ArtifactComponentInterface {
36
39
  config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
37
40
  init(): Promise<void>;
@@ -48,7 +51,7 @@ declare class ArtifactComponent implements ArtifactComponentInterface {
48
51
  private projectId;
49
52
  private initialized;
50
53
  private id;
51
- constructor(config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>);
54
+ constructor(config: ArtifactComponentConfigWithZod);
52
55
  setContext(tenantId: string, projectId: string, baseURL?: string): void;
53
56
  getId(): string;
54
57
  getName(): string;
@@ -86,10 +89,10 @@ interface ComponentConfig {
86
89
  description: string;
87
90
  }
88
91
  interface ArtifactComponentConfig extends ComponentConfig {
89
- props: Record<string, unknown>;
92
+ props: Record<string, unknown> | z.ZodObject<any>;
90
93
  }
91
94
  interface DataComponentConfig extends ComponentConfig {
92
- props: Record<string, unknown>;
95
+ props: Record<string, unknown> | z.ZodObject<any>;
93
96
  }
94
97
  type AgentMcpConfig = {
95
98
  server: Tool;
@@ -122,6 +125,9 @@ type AgentMcpConfig = {
122
125
  */
123
126
  declare function transfer(targetAgent: SubAgent, description?: string, condition?: TransferConditionFunction): TransferConfig;
124
127
 
128
+ type DataComponentConfigWithZod = Omit<DataComponentInsert, 'tenantId' | 'projectId' | 'props'> & {
129
+ props?: Record<string, unknown> | z.ZodObject<any> | null;
130
+ };
125
131
  interface DataComponentInterface {
126
132
  config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
127
133
  init(): Promise<void>;
@@ -138,7 +144,7 @@ declare class DataComponent implements DataComponentInterface {
138
144
  private projectId;
139
145
  private initialized;
140
146
  private id;
141
- constructor(config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>);
147
+ constructor(config: DataComponentConfigWithZod);
142
148
  setContext(tenantId: string, projectId: string, baseURL?: string): void;
143
149
  getId(): string;
144
150
  getName(): string;
@@ -791,8 +797,8 @@ interface ProjectInterface {
791
797
  * name: 'Customer Support System',
792
798
  * description: 'Multi-agent customer support system',
793
799
  * models: {
794
- * base: { model: 'gpt-4o-mini' },
795
- * structuredOutput: { model: 'gpt-4o' }
800
+ * base: { model: 'gpt-4.1-mini' },
801
+ * structuredOutput: { model: 'gpt-4.1' }
796
802
  * },
797
803
  * stopWhen: {
798
804
  * transferCountIs: 10,
@@ -879,6 +885,7 @@ declare class Project implements ProjectInterface {
879
885
  graphId?: string;
880
886
  }>>;
881
887
  }>;
888
+ getFullDefinition(): Promise<FullProjectDefinition>;
882
889
  /**
883
890
  * Get all graphs in the project
884
891
  */
@@ -937,8 +944,8 @@ declare function agentGraph(config: GraphConfig): AgentGraph;
937
944
  * name: 'Customer Support System',
938
945
  * description: 'Multi-agent customer support system',
939
946
  * models: {
940
- * base: { model: 'gpt-4o-mini' },
941
- * structuredOutput: { model: 'gpt-4o' }
947
+ * base: { model: 'gpt-4.1-mini' },
948
+ * structuredOutput: { model: 'gpt-4.1' }
942
949
  * },
943
950
  * stopWhen: {
944
951
  * transferCountIs: 10,
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
- import { getLogger, apiFetch, CredentialReferenceApiInsertSchema, MCPToolConfigSchema, createDatabaseClient, getProject } from '@inkeep/agents-core';
2
- import { isZodSchema, convertZodToJsonSchemaWithPreview } from '@inkeep/agents-core/utils/schema-conversion';
1
+ import { getLogger, apiFetch, CredentialReferenceApiInsertSchema, MCPToolConfigSchema, createDatabaseClient, getProject, OPENAI_MODELS } from '@inkeep/agents-core';
2
+ export { ANTHROPIC_MODELS, GOOGLE_MODELS, OPENAI_MODELS } from '@inkeep/agents-core';
3
+ import { isZodSchema, convertZodToJsonSchema, convertZodToJsonSchemaWithPreview } from '@inkeep/agents-core/utils/schema-conversion';
3
4
  import fs from 'fs';
4
5
  import { builtinModules } from 'module';
5
6
  import path from 'path';
@@ -28,9 +29,16 @@ var ArtifactComponent = class {
28
29
  __publicField(this, "initialized", false);
29
30
  __publicField(this, "id");
30
31
  this.id = config.id || generateIdFromName(config.name);
32
+ let processedProps;
33
+ if (config.props && isZodSchema(config.props)) {
34
+ processedProps = convertZodToJsonSchemaWithPreview(config.props);
35
+ } else {
36
+ processedProps = config.props;
37
+ }
31
38
  this.config = {
32
39
  ...config,
33
- id: this.id
40
+ id: this.id,
41
+ props: processedProps
34
42
  };
35
43
  this.baseURL = process.env.INKEEP_API_URL || "http://localhost:3002";
36
44
  this.tenantId = "default";
@@ -169,9 +177,16 @@ var DataComponent = class {
169
177
  __publicField(this, "initialized", false);
170
178
  __publicField(this, "id");
171
179
  this.id = config.id || generateIdFromName(config.name);
180
+ let processedProps;
181
+ if (config.props && isZodSchema(config.props)) {
182
+ processedProps = convertZodToJsonSchema(config.props);
183
+ } else {
184
+ processedProps = config.props;
185
+ }
172
186
  this.config = {
173
187
  ...config,
174
- id: this.id
188
+ id: this.id,
189
+ props: processedProps
175
190
  };
176
191
  this.baseURL = process.env.INKEEP_API_URL || "http://localhost:3002";
177
192
  this.tenantId = "default";
@@ -803,7 +818,7 @@ var SubAgent = class {
803
818
  id: comp.id,
804
819
  name: comp.name,
805
820
  description: comp.description,
806
- props: convertZodToJsonSchemaWithPreview(comp.props)
821
+ props: convertZodToJsonSchema(comp.props)
807
822
  };
808
823
  }
809
824
  return comp;
@@ -1805,7 +1820,7 @@ var AgentGraph = class {
1805
1820
  logger8.info(
1806
1821
  {
1807
1822
  graphId: this.graphId,
1808
- agentCount: Object.keys(createdGraph.agents || {}).length
1823
+ agentCount: Object.keys(createdGraph.subAgents || {}).length
1809
1824
  },
1810
1825
  "Agent graph initialized successfully using graph endpoint"
1811
1826
  );
@@ -2321,7 +2336,7 @@ var AgentGraph = class {
2321
2336
  const url = `${this.baseURL}/tenants/${this.tenantId}/graphs/${this.graphId}/v1/chat/completions`;
2322
2337
  logger8.info({ url }, "Executing with backend");
2323
2338
  const requestBody = {
2324
- model: "gpt-4o-mini",
2339
+ model: OPENAI_MODELS.GPT_4_1_MINI,
2325
2340
  messages: normalizedMessages.map((msg) => ({
2326
2341
  role: msg.role,
2327
2342
  content: msg.content
@@ -3142,6 +3157,9 @@ var Project = class {
3142
3157
  }
3143
3158
  return { credentials, usage };
3144
3159
  }
3160
+ async getFullDefinition() {
3161
+ return await this.toFullProjectDefinition();
3162
+ }
3145
3163
  /**
3146
3164
  * Get all graphs in the project
3147
3165
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-sdk",
3
- "version": "0.0.0-dev-20251010210603",
3
+ "version": "0.0.0-dev-20251012022558",
4
4
  "description": "Agents SDK for building and managing agents in the Inkeep Agent Framework",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  "nanoid": "^5.1.5",
13
13
  "typescript": "^5.3.3",
14
14
  "zod": "^4.1.11",
15
- "@inkeep/agents-core": "^0.0.0-dev-20251010210603"
15
+ "@inkeep/agents-core": "^0.0.0-dev-20251012022558"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/js-yaml": "^4.0.9",