@inkeep/agents-sdk 0.0.0-dev-20260117173149 → 0.0.0-dev-20260117201141
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/agent.d.ts +73 -73
- package/dist/agentFullClient.d.ts +8 -8
- package/dist/artifact-component.d.ts +8 -8
- package/dist/builderFunctions.d.ts +235 -246
- package/dist/builderFunctionsExperimental.d.ts +17 -17
- package/dist/builders.d.ts +48 -48
- package/dist/credential-provider.d.ts +93 -93
- package/dist/credential-ref.d.ts +37 -37
- package/dist/data-component.d.ts +9 -9
- package/dist/environment-settings.d.ts +4 -4
- package/dist/evaluationClient.d.ts +5 -9
- package/dist/external-agent.d.ts +17 -17
- package/dist/module-hosted-tool-manager.d.ts +1 -1
- package/dist/module-hosted-tool-manager.js +1 -1
- package/dist/project.d.ts +83 -83
- package/dist/projectFullClient.d.ts +8 -8
- package/dist/runner.d.ts +15 -15
- package/dist/status-component.d.ts +3 -3
- package/dist/subAgent.d.ts +2 -2
- package/dist/telemetry-provider.d.ts +76 -76
- package/dist/tool.d.ts +16 -16
- package/dist/types.d.ts +21 -21
- package/dist/utils/generateIdFromName.d.ts +4 -4
- package/dist/utils/tool-normalization.d.ts +10 -10
- package/dist/utils/validateFunction.d.ts +5 -5
- package/package.json +2 -2
|
@@ -13,271 +13,260 @@ import { CredentialReferenceApiInsert, MCPToolConfig } from "@inkeep/agents-core
|
|
|
13
13
|
//#region src/builderFunctions.d.ts
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* Helper function to create agent - OpenAI style
|
|
17
|
+
*/
|
|
18
18
|
declare function agent(config: AgentConfig): Agent;
|
|
19
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
|
-
|
|
20
|
+
* Helper function to create projects - OpenAI style
|
|
21
|
+
*
|
|
22
|
+
* Projects are the top-level organizational unit that contains Agents, Sub Agents, and shared configurations.
|
|
23
|
+
* They provide model inheritance and execution limits that cascade down to Agents and Sub Agents.
|
|
24
|
+
*
|
|
25
|
+
* @param config - Project configuration
|
|
26
|
+
* @returns A new Project instance
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const customerSupport = project({
|
|
31
|
+
* id: 'customer-support-project',
|
|
32
|
+
* name: 'Customer Support System',
|
|
33
|
+
* description: 'Multi-agent customer support system',
|
|
34
|
+
* models: {
|
|
35
|
+
* base: { model: 'gpt-4.1-mini' },
|
|
36
|
+
* structuredOutput: { model: 'gpt-4.1' }
|
|
37
|
+
* },
|
|
38
|
+
* stopWhen: {
|
|
39
|
+
* transferCountIs: 10,
|
|
40
|
+
* stepCountIs: 50
|
|
41
|
+
* },
|
|
42
|
+
* agent: () => [
|
|
43
|
+
* agent({
|
|
44
|
+
* id: 'support-agent',
|
|
45
|
+
* name: 'Support Agent',
|
|
46
|
+
* // ... agent config
|
|
47
|
+
* })
|
|
48
|
+
* ]
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
52
|
declare function project(config: ProjectConfig): Project;
|
|
53
53
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
54
|
+
* Creates a new agent with stable ID enforcement.
|
|
55
|
+
*
|
|
56
|
+
* Agents require explicit stable IDs to ensure consistency across deployments.
|
|
57
|
+
* This is different from tools which auto-generate IDs from their names.
|
|
58
|
+
*
|
|
59
|
+
* @param config - Agent configuration including required stable ID
|
|
60
|
+
* @returns A new SubAgent instance
|
|
61
|
+
* @throws {Error} If config.id is not provided
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const myAgent = agent({
|
|
66
|
+
* id: 'customer-support-agent',
|
|
67
|
+
* name: 'Customer Support',
|
|
68
|
+
* prompt: 'Help customers with their questions'
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
72
|
declare function subAgent(config: SubAgentConfig): SubAgent;
|
|
73
73
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
declare function credential(config: CredentialReferenceApiInsert):
|
|
93
|
-
name: string;
|
|
94
|
-
id: string;
|
|
95
|
-
credentialStoreId: string;
|
|
96
|
-
type: "memory" | "keychain" | "nango";
|
|
97
|
-
createdAt?: string | undefined;
|
|
98
|
-
updatedAt?: string | undefined;
|
|
99
|
-
userId?: string | null | undefined;
|
|
100
|
-
toolId?: string | null | undefined;
|
|
101
|
-
retrievalParams?: Record<string, unknown> | null | undefined;
|
|
102
|
-
createdBy?: string | null | undefined;
|
|
103
|
-
};
|
|
74
|
+
* Creates a credential reference for authentication.
|
|
75
|
+
*
|
|
76
|
+
* Credentials are used to authenticate with external services.
|
|
77
|
+
* They should be stored securely and referenced by ID.
|
|
78
|
+
*
|
|
79
|
+
* @param config - Credential configuration
|
|
80
|
+
* @returns A validated credential reference
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* const apiCredential = credential({
|
|
85
|
+
* id: 'github-token',
|
|
86
|
+
* name: 'GitHub Token',
|
|
87
|
+
* type: 'bearer',
|
|
88
|
+
* value: process.env.GITHUB_TOKEN
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
declare function credential(config: CredentialReferenceApiInsert): CredentialReferenceApiInsert;
|
|
104
93
|
/**
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
94
|
+
* Creates an MCP (Model Context Protocol) server for tool functionality.
|
|
95
|
+
*
|
|
96
|
+
* MCP servers provide tool functionality through a standardized protocol.
|
|
97
|
+
* They can be remote services accessed via HTTP/WebSocket.
|
|
98
|
+
*
|
|
99
|
+
* @param config - MCP server configuration
|
|
100
|
+
* @returns A Tool instance configured as an MCP server
|
|
101
|
+
* @throws {Error} If serverUrl is not provided
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* // Remote MCP server
|
|
106
|
+
* const apiServer = mcpServer({
|
|
107
|
+
* name: 'external_api',
|
|
108
|
+
* description: 'External API service',
|
|
109
|
+
* serverUrl: 'https://api.example.com/mcp'
|
|
110
|
+
* });
|
|
111
|
+
*
|
|
112
|
+
* // With authentication
|
|
113
|
+
* const secureServer = mcpServer({
|
|
114
|
+
* name: 'secure_api',
|
|
115
|
+
* description: 'Secure API service',
|
|
116
|
+
* serverUrl: 'https://secure.example.com/mcp',
|
|
117
|
+
* credential: credential({
|
|
118
|
+
* id: 'api-key',
|
|
119
|
+
* name: 'API Key',
|
|
120
|
+
* type: 'bearer',
|
|
121
|
+
* value: process.env.API_KEY
|
|
122
|
+
* })
|
|
123
|
+
* });
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
137
126
|
declare function mcpServer(config: MCPServerConfig): Tool;
|
|
138
127
|
/**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
128
|
+
* Creates an MCP tool from a raw configuration object.
|
|
129
|
+
*
|
|
130
|
+
* This is a low-level builder for advanced use cases where you need
|
|
131
|
+
* full control over the MCPToolConfig. For most cases, use `mcpServer()`.
|
|
132
|
+
*
|
|
133
|
+
* @param config - Complete MCP tool configuration
|
|
134
|
+
* @returns A Tool instance
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```typescript
|
|
138
|
+
* const customTool = mcpTool({
|
|
139
|
+
* id: 'custom-tool',
|
|
140
|
+
* name: 'Custom Tool',
|
|
141
|
+
* serverUrl: 'https://example.com/mcp',
|
|
142
|
+
* transport: { type: 'stdio' }
|
|
143
|
+
* });
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
157
146
|
declare function mcpTool(config: MCPToolConfig): Tool;
|
|
158
147
|
/**
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
148
|
+
* Creates an artifact component with automatic ID generation.
|
|
149
|
+
*
|
|
150
|
+
* Artifact components represent structured UI components that can
|
|
151
|
+
* be rendered with different levels of detail (summary vs full).
|
|
152
|
+
*
|
|
153
|
+
* @param config - Artifact component configuration
|
|
154
|
+
* @returns An ArtifactComponent instance
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* const productCard = artifactComponent({
|
|
159
|
+
* name: 'Product Card',
|
|
160
|
+
* description: 'Display product information',
|
|
161
|
+
* props: {
|
|
162
|
+
* type: 'object',
|
|
163
|
+
* properties: {
|
|
164
|
+
* title: { type: 'string', inPreview: true },
|
|
165
|
+
* price: { type: 'string', inPreview: true },
|
|
166
|
+
* description: { type: 'string' },
|
|
167
|
+
* image: { type: 'string' }
|
|
168
|
+
* }
|
|
169
|
+
* }
|
|
170
|
+
* });
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
184
173
|
declare function artifactComponent(config: ArtifactComponentConfig): ArtifactComponent;
|
|
185
174
|
/**
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
175
|
+
* Creates a data component with automatic ID generation.
|
|
176
|
+
*
|
|
177
|
+
* Data components represent structured data that can be
|
|
178
|
+
* passed between agents or used in processing.
|
|
179
|
+
*
|
|
180
|
+
* @param config - Data component configuration
|
|
181
|
+
* @returns A DataComponent instance
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```typescript
|
|
185
|
+
* const userProfile = dataComponent({
|
|
186
|
+
* name: 'User Profile',
|
|
187
|
+
* description: 'User profile data',
|
|
188
|
+
* props: {
|
|
189
|
+
* userId: '123',
|
|
190
|
+
* name: 'John Doe',
|
|
191
|
+
* email: 'john@example.com'
|
|
192
|
+
* }
|
|
193
|
+
* });
|
|
194
|
+
* ```
|
|
195
|
+
*/
|
|
207
196
|
declare function dataComponent(config: DataComponentConfig): DataComponent;
|
|
208
197
|
/**
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
198
|
+
* Creates a status component for structured status updates.
|
|
199
|
+
*
|
|
200
|
+
* Status components define the structure of status updates
|
|
201
|
+
* that agents can generate during long-running operations.
|
|
202
|
+
*
|
|
203
|
+
* @param config - Status component configuration
|
|
204
|
+
* @returns A StatusComponent instance
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* ```typescript
|
|
208
|
+
* import { z } from 'zod';
|
|
209
|
+
*
|
|
210
|
+
* const toolCallStatus = statusComponent({
|
|
211
|
+
* type: 'tool_call_summary',
|
|
212
|
+
* description: 'Summary of a tool execution',
|
|
213
|
+
* detailsSchema: z.object({
|
|
214
|
+
* tool_name: z.string(),
|
|
215
|
+
* summary: z.string(),
|
|
216
|
+
* status: z.enum(['success', 'error', 'in_progress'])
|
|
217
|
+
* })
|
|
218
|
+
* });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
232
221
|
declare function statusComponent(config: StatusComponentConfig): StatusComponent$1;
|
|
233
222
|
/**
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
223
|
+
* (deprecated in favor of mcpTool.with()) Creates an agent MCP configuration.
|
|
224
|
+
*
|
|
225
|
+
* Agent MCP configurations are used to configure the MCP server for an agent.
|
|
226
|
+
*
|
|
227
|
+
* @param config - Agent MCP configuration
|
|
228
|
+
* @returns An AgentMcpConfig instance
|
|
229
|
+
*/
|
|
241
230
|
declare function agentMcp(config: AgentMcpConfig): AgentMcpConfig;
|
|
242
231
|
/**
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
232
|
+
* Creates a function tool that executes user-defined code in a sandboxed environment.
|
|
233
|
+
*
|
|
234
|
+
* Function tools allow users to define custom logic that runs securely in isolated
|
|
235
|
+
* environments. Dependencies are installed automatically in the sandbox.
|
|
236
|
+
*
|
|
237
|
+
* @param config - Function tool configuration
|
|
238
|
+
* @returns A FunctionTool instance
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```typescript
|
|
242
|
+
* const calculatorTool = functionTool({
|
|
243
|
+
* name: 'calculator',
|
|
244
|
+
* description: 'Performs basic math operations',
|
|
245
|
+
* inputSchema: {
|
|
246
|
+
* type: 'object',
|
|
247
|
+
* properties: {
|
|
248
|
+
* operation: { type: 'string', enum: ['add', 'subtract', 'multiply', 'divide'] },
|
|
249
|
+
* a: { type: 'number' },
|
|
250
|
+
* b: { type: 'number' }
|
|
251
|
+
* },
|
|
252
|
+
* required: ['operation', 'a', 'b']
|
|
253
|
+
* },
|
|
254
|
+
* dependencies: {
|
|
255
|
+
* 'lodash': '^4.17.21'
|
|
256
|
+
* },
|
|
257
|
+
* execute: async (params) => {
|
|
258
|
+
* const { operation, a, b } = params;
|
|
259
|
+
* switch (operation) {
|
|
260
|
+
* case 'add': return { result: a + b };
|
|
261
|
+
* case 'subtract': return { result: a - b };
|
|
262
|
+
* case 'multiply': return { result: a * b };
|
|
263
|
+
* case 'divide': return { result: a / b };
|
|
264
|
+
* default: throw new Error(`Unknown operation: ${operation}`);
|
|
265
|
+
* }
|
|
266
|
+
* }
|
|
267
|
+
* });
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
281
270
|
declare function functionTool(config: FunctionToolConfig): FunctionTool;
|
|
282
271
|
//#endregion
|
|
283
272
|
export { agent, agentMcp, artifactComponent, credential, dataComponent, functionTool, mcpServer, mcpTool, project, statusComponent, subAgent };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
//#region src/builderFunctionsExperimental.d.ts
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare function agentRelation(targetAgent: string, relationType?:
|
|
3
|
+
* Creates an agent relation configuration.
|
|
4
|
+
*
|
|
5
|
+
* Relations define how agents can interact with each other.
|
|
6
|
+
* Transfer relations allow transfers, while delegate relations
|
|
7
|
+
* allow temporary task delegation.
|
|
8
|
+
*
|
|
9
|
+
* @param targetAgent - The ID of the target agent
|
|
10
|
+
* @param relationType - The type of relation (transfer or delegate)
|
|
11
|
+
* @returns An agent relation configuration
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const transferRelation = agentRelation('support-agent', 'transfer');
|
|
16
|
+
* const delegateRelation = agentRelation('specialist-agent', 'delegate');
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare function agentRelation(targetAgent: string, relationType?: "transfer" | "delegate"): {
|
|
20
20
|
targetAgent: string;
|
|
21
21
|
relationType: "transfer" | "delegate";
|
|
22
22
|
};
|