@meetkai/mka1 0.54.81 → 0.54.83

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.
Files changed (164) hide show
  1. package/README.md +310 -304
  2. package/bin/mcp-server.js +3429 -3037
  3. package/bin/mcp-server.js.map +18 -10
  4. package/dist/commonjs/funcs/agentsCreateAgent.d.ts +18 -0
  5. package/dist/commonjs/funcs/agentsCreateAgent.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/agentsCreateAgent.js +132 -0
  7. package/dist/commonjs/funcs/agentsCreateAgent.js.map +1 -0
  8. package/dist/commonjs/funcs/agentsUpdateAgent.d.ts +18 -0
  9. package/dist/commonjs/funcs/agentsUpdateAgent.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/agentsUpdateAgent.js +138 -0
  11. package/dist/commonjs/funcs/agentsUpdateAgent.js.map +1 -0
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  16. package/dist/commonjs/mcp-server/server.js +5 -1
  17. package/dist/commonjs/mcp-server/server.js.map +1 -1
  18. package/dist/commonjs/mcp-server/tools/agentsCreateAgent.d.ts +8 -0
  19. package/dist/commonjs/mcp-server/tools/agentsCreateAgent.d.ts.map +1 -0
  20. package/dist/commonjs/mcp-server/tools/agentsCreateAgent.js +62 -0
  21. package/dist/commonjs/mcp-server/tools/agentsCreateAgent.js.map +1 -0
  22. package/dist/commonjs/mcp-server/tools/agentsUpdateAgent.d.ts +8 -0
  23. package/dist/commonjs/mcp-server/tools/agentsUpdateAgent.d.ts.map +1 -0
  24. package/dist/commonjs/mcp-server/tools/agentsUpdateAgent.js +62 -0
  25. package/dist/commonjs/mcp-server/tools/agentsUpdateAgent.js.map +1 -0
  26. package/dist/commonjs/models/components/addcatalogmodelrequest.d.ts +0 -2
  27. package/dist/commonjs/models/components/addcatalogmodelrequest.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/addcatalogmodelrequest.js +0 -2
  29. package/dist/commonjs/models/components/addcatalogmodelrequest.js.map +1 -1
  30. package/dist/commonjs/models/components/createagentrequest.d.ts +47 -0
  31. package/dist/commonjs/models/components/createagentrequest.d.ts.map +1 -0
  32. package/dist/commonjs/models/components/createagentrequest.js +94 -0
  33. package/dist/commonjs/models/components/createagentrequest.js.map +1 -0
  34. package/dist/commonjs/models/components/index.d.ts +2 -0
  35. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/index.js +2 -0
  37. package/dist/commonjs/models/components/index.js.map +1 -1
  38. package/dist/commonjs/models/components/updateagentrequest.d.ts +50 -0
  39. package/dist/commonjs/models/components/updateagentrequest.d.ts.map +1 -0
  40. package/dist/commonjs/models/components/updateagentrequest.js +94 -0
  41. package/dist/commonjs/models/components/updateagentrequest.js.map +1 -0
  42. package/dist/commonjs/models/components/updatecatalogmodelrequest.d.ts +0 -2
  43. package/dist/commonjs/models/components/updatecatalogmodelrequest.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/updatecatalogmodelrequest.js +0 -2
  45. package/dist/commonjs/models/components/updatecatalogmodelrequest.js.map +1 -1
  46. package/dist/commonjs/models/operations/createagent.d.ts +23 -0
  47. package/dist/commonjs/models/operations/createagent.d.ts.map +1 -0
  48. package/dist/commonjs/models/operations/createagent.js +72 -0
  49. package/dist/commonjs/models/operations/createagent.js.map +1 -0
  50. package/dist/commonjs/models/operations/index.d.ts +2 -0
  51. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/index.js +2 -0
  53. package/dist/commonjs/models/operations/index.js.map +1 -1
  54. package/dist/commonjs/models/operations/updateagent.d.ts +25 -0
  55. package/dist/commonjs/models/operations/updateagent.d.ts.map +1 -0
  56. package/dist/commonjs/models/operations/updateagent.js +76 -0
  57. package/dist/commonjs/models/operations/updateagent.js.map +1 -0
  58. package/dist/commonjs/react-query/agentsCreateAgent.d.ts +27 -0
  59. package/dist/commonjs/react-query/agentsCreateAgent.d.ts.map +1 -0
  60. package/dist/commonjs/react-query/agentsCreateAgent.js +44 -0
  61. package/dist/commonjs/react-query/agentsCreateAgent.js.map +1 -0
  62. package/dist/commonjs/react-query/agentsUpdateAgent.d.ts +27 -0
  63. package/dist/commonjs/react-query/agentsUpdateAgent.d.ts.map +1 -0
  64. package/dist/commonjs/react-query/agentsUpdateAgent.js +44 -0
  65. package/dist/commonjs/react-query/agentsUpdateAgent.js.map +1 -0
  66. package/dist/commonjs/react-query/index.d.ts +2 -0
  67. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  68. package/dist/commonjs/react-query/index.js +2 -0
  69. package/dist/commonjs/react-query/index.js.map +1 -1
  70. package/dist/commonjs/sdk/agents.d.ts +8 -0
  71. package/dist/commonjs/sdk/agents.d.ts.map +1 -1
  72. package/dist/commonjs/sdk/agents.js +14 -0
  73. package/dist/commonjs/sdk/agents.js.map +1 -1
  74. package/dist/esm/funcs/agentsCreateAgent.d.ts +18 -0
  75. package/dist/esm/funcs/agentsCreateAgent.d.ts.map +1 -0
  76. package/dist/esm/funcs/agentsCreateAgent.js +96 -0
  77. package/dist/esm/funcs/agentsCreateAgent.js.map +1 -0
  78. package/dist/esm/funcs/agentsUpdateAgent.d.ts +18 -0
  79. package/dist/esm/funcs/agentsUpdateAgent.d.ts.map +1 -0
  80. package/dist/esm/funcs/agentsUpdateAgent.js +102 -0
  81. package/dist/esm/funcs/agentsUpdateAgent.js.map +1 -0
  82. package/dist/esm/lib/config.d.ts +2 -2
  83. package/dist/esm/lib/config.js +2 -2
  84. package/dist/esm/mcp-server/mcp-server.js +1 -1
  85. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  86. package/dist/esm/mcp-server/server.js +5 -1
  87. package/dist/esm/mcp-server/server.js.map +1 -1
  88. package/dist/esm/mcp-server/tools/agentsCreateAgent.d.ts +8 -0
  89. package/dist/esm/mcp-server/tools/agentsCreateAgent.d.ts.map +1 -0
  90. package/dist/esm/mcp-server/tools/agentsCreateAgent.js +26 -0
  91. package/dist/esm/mcp-server/tools/agentsCreateAgent.js.map +1 -0
  92. package/dist/esm/mcp-server/tools/agentsUpdateAgent.d.ts +8 -0
  93. package/dist/esm/mcp-server/tools/agentsUpdateAgent.d.ts.map +1 -0
  94. package/dist/esm/mcp-server/tools/agentsUpdateAgent.js +26 -0
  95. package/dist/esm/mcp-server/tools/agentsUpdateAgent.js.map +1 -0
  96. package/dist/esm/models/components/addcatalogmodelrequest.d.ts +0 -2
  97. package/dist/esm/models/components/addcatalogmodelrequest.d.ts.map +1 -1
  98. package/dist/esm/models/components/addcatalogmodelrequest.js +0 -2
  99. package/dist/esm/models/components/addcatalogmodelrequest.js.map +1 -1
  100. package/dist/esm/models/components/createagentrequest.d.ts +47 -0
  101. package/dist/esm/models/components/createagentrequest.d.ts.map +1 -0
  102. package/dist/esm/models/components/createagentrequest.js +56 -0
  103. package/dist/esm/models/components/createagentrequest.js.map +1 -0
  104. package/dist/esm/models/components/index.d.ts +2 -0
  105. package/dist/esm/models/components/index.d.ts.map +1 -1
  106. package/dist/esm/models/components/index.js +2 -0
  107. package/dist/esm/models/components/index.js.map +1 -1
  108. package/dist/esm/models/components/updateagentrequest.d.ts +50 -0
  109. package/dist/esm/models/components/updateagentrequest.d.ts.map +1 -0
  110. package/dist/esm/models/components/updateagentrequest.js +56 -0
  111. package/dist/esm/models/components/updateagentrequest.js.map +1 -0
  112. package/dist/esm/models/components/updatecatalogmodelrequest.d.ts +0 -2
  113. package/dist/esm/models/components/updatecatalogmodelrequest.d.ts.map +1 -1
  114. package/dist/esm/models/components/updatecatalogmodelrequest.js +0 -2
  115. package/dist/esm/models/components/updatecatalogmodelrequest.js.map +1 -1
  116. package/dist/esm/models/operations/createagent.d.ts +23 -0
  117. package/dist/esm/models/operations/createagent.d.ts.map +1 -0
  118. package/dist/esm/models/operations/createagent.js +34 -0
  119. package/dist/esm/models/operations/createagent.js.map +1 -0
  120. package/dist/esm/models/operations/index.d.ts +2 -0
  121. package/dist/esm/models/operations/index.d.ts.map +1 -1
  122. package/dist/esm/models/operations/index.js +2 -0
  123. package/dist/esm/models/operations/index.js.map +1 -1
  124. package/dist/esm/models/operations/updateagent.d.ts +25 -0
  125. package/dist/esm/models/operations/updateagent.d.ts.map +1 -0
  126. package/dist/esm/models/operations/updateagent.js +38 -0
  127. package/dist/esm/models/operations/updateagent.js.map +1 -0
  128. package/dist/esm/react-query/agentsCreateAgent.d.ts +27 -0
  129. package/dist/esm/react-query/agentsCreateAgent.d.ts.map +1 -0
  130. package/dist/esm/react-query/agentsCreateAgent.js +39 -0
  131. package/dist/esm/react-query/agentsCreateAgent.js.map +1 -0
  132. package/dist/esm/react-query/agentsUpdateAgent.d.ts +27 -0
  133. package/dist/esm/react-query/agentsUpdateAgent.d.ts.map +1 -0
  134. package/dist/esm/react-query/agentsUpdateAgent.js +39 -0
  135. package/dist/esm/react-query/agentsUpdateAgent.js.map +1 -0
  136. package/dist/esm/react-query/index.d.ts +2 -0
  137. package/dist/esm/react-query/index.d.ts.map +1 -1
  138. package/dist/esm/react-query/index.js +2 -0
  139. package/dist/esm/react-query/index.js.map +1 -1
  140. package/dist/esm/sdk/agents.d.ts +8 -0
  141. package/dist/esm/sdk/agents.d.ts.map +1 -1
  142. package/dist/esm/sdk/agents.js +14 -0
  143. package/dist/esm/sdk/agents.js.map +1 -1
  144. package/jsr.json +1 -1
  145. package/package.json +1 -1
  146. package/src/funcs/agentsCreateAgent.ts +188 -0
  147. package/src/funcs/agentsUpdateAgent.ts +194 -0
  148. package/src/lib/config.ts +2 -2
  149. package/src/mcp-server/mcp-server.ts +1 -1
  150. package/src/mcp-server/server.ts +5 -1
  151. package/src/mcp-server/tools/agentsCreateAgent.ts +35 -0
  152. package/src/mcp-server/tools/agentsUpdateAgent.ts +35 -0
  153. package/src/models/components/addcatalogmodelrequest.ts +0 -2
  154. package/src/models/components/createagentrequest.ts +125 -0
  155. package/src/models/components/index.ts +2 -0
  156. package/src/models/components/updateagentrequest.ts +128 -0
  157. package/src/models/components/updatecatalogmodelrequest.ts +0 -2
  158. package/src/models/operations/createagent.ts +70 -0
  159. package/src/models/operations/index.ts +2 -0
  160. package/src/models/operations/updateagent.ts +76 -0
  161. package/src/react-query/agentsCreateAgent.ts +108 -0
  162. package/src/react-query/agentsUpdateAgent.ts +108 -0
  163. package/src/react-query/index.ts +2 -0
  164. package/src/sdk/agents.ts +30 -0
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { agentsCreateAgent } from "../../funcs/agentsCreateAgent.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.CreateAgentRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$agentsCreateAgent: ToolDefinition<typeof args> = {
14
+ name: "agents-create-agent",
15
+ description: `Create an agent`,
16
+ args,
17
+ tool: async (client, args, ctx) => {
18
+ const [result, apiCall] = await agentsCreateAgent(
19
+ client,
20
+ args.request,
21
+ { fetchOptions: { signal: ctx.signal } },
22
+ ).$inspect();
23
+
24
+ if (!result.ok) {
25
+ return {
26
+ content: [{ type: "text", text: result.error.message }],
27
+ isError: true,
28
+ };
29
+ }
30
+
31
+ const value = result.value;
32
+
33
+ return formatResult(value, apiCall);
34
+ },
35
+ };
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { agentsUpdateAgent } from "../../funcs/agentsUpdateAgent.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.UpdateAgentRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$agentsUpdateAgent: ToolDefinition<typeof args> = {
14
+ name: "agents-update-agent",
15
+ description: `Update an agent`,
16
+ args,
17
+ tool: async (client, args, ctx) => {
18
+ const [result, apiCall] = await agentsUpdateAgent(
19
+ client,
20
+ args.request,
21
+ { fetchOptions: { signal: ctx.signal } },
22
+ ).$inspect();
23
+
24
+ if (!result.ok) {
25
+ return {
26
+ content: [{ type: "text", text: result.error.message }],
27
+ isError: true,
28
+ };
29
+ }
30
+
31
+ const value = result.value;
32
+
33
+ return formatResult(value, apiCall);
34
+ },
35
+ };
@@ -16,10 +16,8 @@ import {
16
16
 
17
17
  export const ApiProviderType = {
18
18
  Groq: "groq",
19
- Azure: "azure",
20
19
  Meetkai: "meetkai",
21
20
  MeetkaiGateway: "meetkaiGateway",
22
- Fal: "fal",
23
21
  Openai: "openai",
24
22
  } as const;
25
23
  export type ApiProviderType = ClosedEnum<typeof ApiProviderType>;
@@ -0,0 +1,125 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AgentReasoningConfiguration,
12
+ AgentReasoningConfiguration$inboundSchema,
13
+ AgentReasoningConfiguration$Outbound,
14
+ AgentReasoningConfiguration$outboundSchema,
15
+ } from "./agentreasoningconfiguration.js";
16
+ import {
17
+ AgentTextConfiguration,
18
+ AgentTextConfiguration$inboundSchema,
19
+ AgentTextConfiguration$Outbound,
20
+ AgentTextConfiguration$outboundSchema,
21
+ } from "./agenttextconfiguration.js";
22
+ import {
23
+ ToolDefinition,
24
+ ToolDefinition$inboundSchema,
25
+ ToolDefinition$Outbound,
26
+ ToolDefinition$outboundSchema,
27
+ } from "./tooldefinition.js";
28
+
29
+ export type CreateAgentRequest = {
30
+ name: string;
31
+ description?: string | null | undefined;
32
+ model: string;
33
+ instructions?: string | null | undefined;
34
+ tools?: Array<ToolDefinition> | undefined;
35
+ /**
36
+ * Arbitrary JSON value.
37
+ */
38
+ toolChoice?: any | undefined;
39
+ parallelToolCalls?: boolean | undefined;
40
+ maxToolCalls?: number | null | undefined;
41
+ text?: AgentTextConfiguration | null | undefined;
42
+ reasoning?: AgentReasoningConfiguration | null | undefined;
43
+ metadata?: { [k: string]: string } | undefined;
44
+ };
45
+
46
+ /** @internal */
47
+ export const CreateAgentRequest$inboundSchema: z.ZodType<
48
+ CreateAgentRequest,
49
+ z.ZodTypeDef,
50
+ unknown
51
+ > = z.object({
52
+ name: z.string(),
53
+ description: z.nullable(z.string()).optional(),
54
+ model: z.string(),
55
+ instructions: z.nullable(z.string()).optional(),
56
+ tools: z.array(ToolDefinition$inboundSchema).optional(),
57
+ tool_choice: z.any().optional(),
58
+ parallel_tool_calls: z.boolean().default(true),
59
+ max_tool_calls: z.nullable(z.number().int()).optional(),
60
+ text: z.nullable(AgentTextConfiguration$inboundSchema).optional(),
61
+ reasoning: z.nullable(AgentReasoningConfiguration$inboundSchema).optional(),
62
+ metadata: z.record(z.string()).optional(),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ "tool_choice": "toolChoice",
66
+ "parallel_tool_calls": "parallelToolCalls",
67
+ "max_tool_calls": "maxToolCalls",
68
+ });
69
+ });
70
+ /** @internal */
71
+ export type CreateAgentRequest$Outbound = {
72
+ name: string;
73
+ description?: string | null | undefined;
74
+ model: string;
75
+ instructions?: string | null | undefined;
76
+ tools?: Array<ToolDefinition$Outbound> | undefined;
77
+ tool_choice?: any | undefined;
78
+ parallel_tool_calls: boolean;
79
+ max_tool_calls?: number | null | undefined;
80
+ text?: AgentTextConfiguration$Outbound | null | undefined;
81
+ reasoning?: AgentReasoningConfiguration$Outbound | null | undefined;
82
+ metadata?: { [k: string]: string } | undefined;
83
+ };
84
+
85
+ /** @internal */
86
+ export const CreateAgentRequest$outboundSchema: z.ZodType<
87
+ CreateAgentRequest$Outbound,
88
+ z.ZodTypeDef,
89
+ CreateAgentRequest
90
+ > = z.object({
91
+ name: z.string(),
92
+ description: z.nullable(z.string()).optional(),
93
+ model: z.string(),
94
+ instructions: z.nullable(z.string()).optional(),
95
+ tools: z.array(ToolDefinition$outboundSchema).optional(),
96
+ toolChoice: z.any().optional(),
97
+ parallelToolCalls: z.boolean().default(true),
98
+ maxToolCalls: z.nullable(z.number().int()).optional(),
99
+ text: z.nullable(AgentTextConfiguration$outboundSchema).optional(),
100
+ reasoning: z.nullable(AgentReasoningConfiguration$outboundSchema).optional(),
101
+ metadata: z.record(z.string()).optional(),
102
+ }).transform((v) => {
103
+ return remap$(v, {
104
+ toolChoice: "tool_choice",
105
+ parallelToolCalls: "parallel_tool_calls",
106
+ maxToolCalls: "max_tool_calls",
107
+ });
108
+ });
109
+
110
+ export function createAgentRequestToJSON(
111
+ createAgentRequest: CreateAgentRequest,
112
+ ): string {
113
+ return JSON.stringify(
114
+ CreateAgentRequest$outboundSchema.parse(createAgentRequest),
115
+ );
116
+ }
117
+ export function createAgentRequestFromJSON(
118
+ jsonString: string,
119
+ ): SafeParseResult<CreateAgentRequest, SDKValidationError> {
120
+ return safeParse(
121
+ jsonString,
122
+ (x) => CreateAgentRequest$inboundSchema.parse(JSON.parse(x)),
123
+ `Failed to parse 'CreateAgentRequest' from JSON`,
124
+ );
125
+ }
@@ -189,6 +189,7 @@ export * from "./conversationsgroupby.js";
189
189
  export * from "./costgrouprow.js";
190
190
  export * from "./costsusagegroupby.js";
191
191
  export * from "./createagentconnectorrequest.js";
192
+ export * from "./createagentrequest.js";
192
193
  export * from "./createagentrunrequest.js";
193
194
  export * from "./createagentschedulerequest.js";
194
195
  export * from "./createbatchrequest.js";
@@ -705,6 +706,7 @@ export * from "./toplogprob.js";
705
706
  export * from "./transcriptionresponse.js";
706
707
  export * from "./typeaction.js";
707
708
  export * from "./update.js";
709
+ export * from "./updateagentrequest.js";
708
710
  export * from "./updateagentschedulerequest.js";
709
711
  export * from "./updatecatalogmodelrequest.js";
710
712
  export * from "./updateevalschedulerequest.js";
@@ -0,0 +1,128 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AgentReasoningConfiguration,
12
+ AgentReasoningConfiguration$inboundSchema,
13
+ AgentReasoningConfiguration$Outbound,
14
+ AgentReasoningConfiguration$outboundSchema,
15
+ } from "./agentreasoningconfiguration.js";
16
+ import {
17
+ AgentTextConfiguration,
18
+ AgentTextConfiguration$inboundSchema,
19
+ AgentTextConfiguration$Outbound,
20
+ AgentTextConfiguration$outboundSchema,
21
+ } from "./agenttextconfiguration.js";
22
+ import {
23
+ ToolDefinition,
24
+ ToolDefinition$inboundSchema,
25
+ ToolDefinition$Outbound,
26
+ ToolDefinition$outboundSchema,
27
+ } from "./tooldefinition.js";
28
+
29
+ /**
30
+ * Updates only provided fields. Omitted fields preserve their saved values; empty updates are rejected.
31
+ */
32
+ export type UpdateAgentRequest = {
33
+ name?: string | undefined;
34
+ description?: string | null | undefined;
35
+ model?: string | undefined;
36
+ instructions?: string | null | undefined;
37
+ tools?: Array<ToolDefinition> | undefined;
38
+ /**
39
+ * Arbitrary JSON value.
40
+ */
41
+ toolChoice?: any | undefined;
42
+ parallelToolCalls?: boolean | undefined;
43
+ maxToolCalls?: number | null | undefined;
44
+ text?: AgentTextConfiguration | null | undefined;
45
+ reasoning?: AgentReasoningConfiguration | null | undefined;
46
+ metadata?: { [k: string]: string } | undefined;
47
+ };
48
+
49
+ /** @internal */
50
+ export const UpdateAgentRequest$inboundSchema: z.ZodType<
51
+ UpdateAgentRequest,
52
+ z.ZodTypeDef,
53
+ unknown
54
+ > = z.object({
55
+ name: z.string().optional(),
56
+ description: z.nullable(z.string()).optional(),
57
+ model: z.string().optional(),
58
+ instructions: z.nullable(z.string()).optional(),
59
+ tools: z.array(ToolDefinition$inboundSchema).optional(),
60
+ tool_choice: z.any().optional(),
61
+ parallel_tool_calls: z.boolean().optional(),
62
+ max_tool_calls: z.nullable(z.number().int()).optional(),
63
+ text: z.nullable(AgentTextConfiguration$inboundSchema).optional(),
64
+ reasoning: z.nullable(AgentReasoningConfiguration$inboundSchema).optional(),
65
+ metadata: z.record(z.string()).optional(),
66
+ }).transform((v) => {
67
+ return remap$(v, {
68
+ "tool_choice": "toolChoice",
69
+ "parallel_tool_calls": "parallelToolCalls",
70
+ "max_tool_calls": "maxToolCalls",
71
+ });
72
+ });
73
+ /** @internal */
74
+ export type UpdateAgentRequest$Outbound = {
75
+ name?: string | undefined;
76
+ description?: string | null | undefined;
77
+ model?: string | undefined;
78
+ instructions?: string | null | undefined;
79
+ tools?: Array<ToolDefinition$Outbound> | undefined;
80
+ tool_choice?: any | undefined;
81
+ parallel_tool_calls?: boolean | undefined;
82
+ max_tool_calls?: number | null | undefined;
83
+ text?: AgentTextConfiguration$Outbound | null | undefined;
84
+ reasoning?: AgentReasoningConfiguration$Outbound | null | undefined;
85
+ metadata?: { [k: string]: string } | undefined;
86
+ };
87
+
88
+ /** @internal */
89
+ export const UpdateAgentRequest$outboundSchema: z.ZodType<
90
+ UpdateAgentRequest$Outbound,
91
+ z.ZodTypeDef,
92
+ UpdateAgentRequest
93
+ > = z.object({
94
+ name: z.string().optional(),
95
+ description: z.nullable(z.string()).optional(),
96
+ model: z.string().optional(),
97
+ instructions: z.nullable(z.string()).optional(),
98
+ tools: z.array(ToolDefinition$outboundSchema).optional(),
99
+ toolChoice: z.any().optional(),
100
+ parallelToolCalls: z.boolean().optional(),
101
+ maxToolCalls: z.nullable(z.number().int()).optional(),
102
+ text: z.nullable(AgentTextConfiguration$outboundSchema).optional(),
103
+ reasoning: z.nullable(AgentReasoningConfiguration$outboundSchema).optional(),
104
+ metadata: z.record(z.string()).optional(),
105
+ }).transform((v) => {
106
+ return remap$(v, {
107
+ toolChoice: "tool_choice",
108
+ parallelToolCalls: "parallel_tool_calls",
109
+ maxToolCalls: "max_tool_calls",
110
+ });
111
+ });
112
+
113
+ export function updateAgentRequestToJSON(
114
+ updateAgentRequest: UpdateAgentRequest,
115
+ ): string {
116
+ return JSON.stringify(
117
+ UpdateAgentRequest$outboundSchema.parse(updateAgentRequest),
118
+ );
119
+ }
120
+ export function updateAgentRequestFromJSON(
121
+ jsonString: string,
122
+ ): SafeParseResult<UpdateAgentRequest, SDKValidationError> {
123
+ return safeParse(
124
+ jsonString,
125
+ (x) => UpdateAgentRequest$inboundSchema.parse(JSON.parse(x)),
126
+ `Failed to parse 'UpdateAgentRequest' from JSON`,
127
+ );
128
+ }
@@ -16,10 +16,8 @@ import {
16
16
 
17
17
  export const UpdateCatalogModelRequestApiProviderType = {
18
18
  Groq: "groq",
19
- Azure: "azure",
20
19
  Meetkai: "meetkai",
21
20
  MeetkaiGateway: "meetkaiGateway",
22
- Fal: "fal",
23
21
  Openai: "openai",
24
22
  } as const;
25
23
  export type UpdateCatalogModelRequestApiProviderType = ClosedEnum<
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type CreateAgentRequest = {
13
+ /**
14
+ * Optional external end-user identifier forwarded by the API gateway.
15
+ */
16
+ xOnBehalfOf?: string | undefined;
17
+ createAgentRequest: components.CreateAgentRequest;
18
+ };
19
+
20
+ /** @internal */
21
+ export const CreateAgentRequest$inboundSchema: z.ZodType<
22
+ CreateAgentRequest,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ "X-On-Behalf-Of": z.string().optional(),
27
+ CreateAgentRequest: components.CreateAgentRequest$inboundSchema,
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ "X-On-Behalf-Of": "xOnBehalfOf",
31
+ "CreateAgentRequest": "createAgentRequest",
32
+ });
33
+ });
34
+ /** @internal */
35
+ export type CreateAgentRequest$Outbound = {
36
+ "X-On-Behalf-Of"?: string | undefined;
37
+ CreateAgentRequest: components.CreateAgentRequest$Outbound;
38
+ };
39
+
40
+ /** @internal */
41
+ export const CreateAgentRequest$outboundSchema: z.ZodType<
42
+ CreateAgentRequest$Outbound,
43
+ z.ZodTypeDef,
44
+ CreateAgentRequest
45
+ > = z.object({
46
+ xOnBehalfOf: z.string().optional(),
47
+ createAgentRequest: components.CreateAgentRequest$outboundSchema,
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ xOnBehalfOf: "X-On-Behalf-Of",
51
+ createAgentRequest: "CreateAgentRequest",
52
+ });
53
+ });
54
+
55
+ export function createAgentRequestToJSON(
56
+ createAgentRequest: CreateAgentRequest,
57
+ ): string {
58
+ return JSON.stringify(
59
+ CreateAgentRequest$outboundSchema.parse(createAgentRequest),
60
+ );
61
+ }
62
+ export function createAgentRequestFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<CreateAgentRequest, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => CreateAgentRequest$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'CreateAgentRequest' from JSON`,
69
+ );
70
+ }
@@ -45,6 +45,7 @@ export * from "./conversationsitemsretrieve.js";
45
45
  export * from "./conversationslist.js";
46
46
  export * from "./conversationsretrieve.js";
47
47
  export * from "./conversationsupdate.js";
48
+ export * from "./createagent.js";
48
49
  export * from "./createagentconnector.js";
49
50
  export * from "./createagentrun.js";
50
51
  export * from "./createagentschedule.js";
@@ -412,6 +413,7 @@ export * from "./transcribe.js";
412
413
  export * from "./triggerevalschedule.js";
413
414
  export * from "./unarchivefeatureflag.js";
414
415
  export * from "./unsuspendclusterorg.js";
416
+ export * from "./updateagent.js";
415
417
  export * from "./updateagentschedule.js";
416
418
  export * from "./updateclusterinvite.js";
417
419
  export * from "./updatecompletionfeedback.js";
@@ -0,0 +1,76 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type UpdateAgentRequest = {
13
+ agentId: string;
14
+ /**
15
+ * Optional external end-user identifier forwarded by the API gateway.
16
+ */
17
+ xOnBehalfOf?: string | undefined;
18
+ updateAgentRequest: components.UpdateAgentRequest;
19
+ };
20
+
21
+ /** @internal */
22
+ export const UpdateAgentRequest$inboundSchema: z.ZodType<
23
+ UpdateAgentRequest,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ agent_id: z.string(),
28
+ "X-On-Behalf-Of": z.string().optional(),
29
+ UpdateAgentRequest: components.UpdateAgentRequest$inboundSchema,
30
+ }).transform((v) => {
31
+ return remap$(v, {
32
+ "agent_id": "agentId",
33
+ "X-On-Behalf-Of": "xOnBehalfOf",
34
+ "UpdateAgentRequest": "updateAgentRequest",
35
+ });
36
+ });
37
+ /** @internal */
38
+ export type UpdateAgentRequest$Outbound = {
39
+ agent_id: string;
40
+ "X-On-Behalf-Of"?: string | undefined;
41
+ UpdateAgentRequest: components.UpdateAgentRequest$Outbound;
42
+ };
43
+
44
+ /** @internal */
45
+ export const UpdateAgentRequest$outboundSchema: z.ZodType<
46
+ UpdateAgentRequest$Outbound,
47
+ z.ZodTypeDef,
48
+ UpdateAgentRequest
49
+ > = z.object({
50
+ agentId: z.string(),
51
+ xOnBehalfOf: z.string().optional(),
52
+ updateAgentRequest: components.UpdateAgentRequest$outboundSchema,
53
+ }).transform((v) => {
54
+ return remap$(v, {
55
+ agentId: "agent_id",
56
+ xOnBehalfOf: "X-On-Behalf-Of",
57
+ updateAgentRequest: "UpdateAgentRequest",
58
+ });
59
+ });
60
+
61
+ export function updateAgentRequestToJSON(
62
+ updateAgentRequest: UpdateAgentRequest,
63
+ ): string {
64
+ return JSON.stringify(
65
+ UpdateAgentRequest$outboundSchema.parse(updateAgentRequest),
66
+ );
67
+ }
68
+ export function updateAgentRequestFromJSON(
69
+ jsonString: string,
70
+ ): SafeParseResult<UpdateAgentRequest, SDKValidationError> {
71
+ return safeParse(
72
+ jsonString,
73
+ (x) => UpdateAgentRequest$inboundSchema.parse(JSON.parse(x)),
74
+ `Failed to parse 'UpdateAgentRequest' from JSON`,
75
+ );
76
+ }
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ MutationKey,
7
+ useMutation,
8
+ UseMutationResult,
9
+ } from "@tanstack/react-query";
10
+ import { SDKCore } from "../core.js";
11
+ import { agentsCreateAgent } from "../funcs/agentsCreateAgent.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import * as components from "../models/components/index.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKError } from "../models/errors/sdkerror.js";
25
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { unwrapAsync } from "../types/fp.js";
28
+ import { useSDKContext } from "./_context.js";
29
+ import { MutationHookOptions } from "./_types.js";
30
+
31
+ export type AgentsCreateAgentMutationVariables = {
32
+ request: operations.CreateAgentRequest;
33
+ options?: RequestOptions;
34
+ };
35
+
36
+ export type AgentsCreateAgentMutationData = components.Agent;
37
+
38
+ export type AgentsCreateAgentMutationError =
39
+ | errors.ErrorEnvelope
40
+ | SDKError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError;
48
+
49
+ /**
50
+ * Create an agent
51
+ */
52
+ export function useAgentsCreateAgentMutation(
53
+ options?: MutationHookOptions<
54
+ AgentsCreateAgentMutationData,
55
+ AgentsCreateAgentMutationError,
56
+ AgentsCreateAgentMutationVariables
57
+ >,
58
+ ): UseMutationResult<
59
+ AgentsCreateAgentMutationData,
60
+ AgentsCreateAgentMutationError,
61
+ AgentsCreateAgentMutationVariables
62
+ > {
63
+ const client = useSDKContext();
64
+ return useMutation({
65
+ ...buildAgentsCreateAgentMutation(client, options),
66
+ ...options,
67
+ });
68
+ }
69
+
70
+ export function mutationKeyAgentsCreateAgent(): MutationKey {
71
+ return ["@meetkai/mka1", "Agents", "createAgent"];
72
+ }
73
+
74
+ export function buildAgentsCreateAgentMutation(
75
+ client$: SDKCore,
76
+ hookOptions?: RequestOptions,
77
+ ): {
78
+ mutationKey: MutationKey;
79
+ mutationFn: (
80
+ variables: AgentsCreateAgentMutationVariables,
81
+ ) => Promise<AgentsCreateAgentMutationData>;
82
+ } {
83
+ return {
84
+ mutationKey: mutationKeyAgentsCreateAgent(),
85
+ mutationFn: function agentsCreateAgentMutationFn({
86
+ request,
87
+ options,
88
+ }): Promise<AgentsCreateAgentMutationData> {
89
+ const mergedOptions = {
90
+ ...hookOptions,
91
+ ...options,
92
+ fetchOptions: {
93
+ ...hookOptions?.fetchOptions,
94
+ ...options?.fetchOptions,
95
+ signal: combineSignals(
96
+ hookOptions?.fetchOptions?.signal,
97
+ options?.fetchOptions?.signal,
98
+ ),
99
+ },
100
+ };
101
+ return unwrapAsync(agentsCreateAgent(
102
+ client$,
103
+ request,
104
+ mergedOptions,
105
+ ));
106
+ },
107
+ };
108
+ }