@archastro/sdk 0.5.2 → 0.5.3

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 (222) hide show
  1. package/README.md +86 -0
  2. package/dist/auth.d.ts +143 -0
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/auth.js +187 -1
  5. package/dist/auth.js.map +1 -1
  6. package/dist/client.d.ts +26 -0
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +27 -1
  9. package/dist/client.js.map +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +2 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/types/ai.d.ts +150 -12
  15. package/dist/types/ai.d.ts.map +1 -1
  16. package/dist/types/ai.js +71 -41
  17. package/dist/types/ai.js.map +1 -1
  18. package/dist/types/artifacts.d.ts +81 -24
  19. package/dist/types/artifacts.d.ts.map +1 -1
  20. package/dist/types/artifacts.js +39 -21
  21. package/dist/types/artifacts.js.map +1 -1
  22. package/dist/types/automations.d.ts +41 -9
  23. package/dist/types/automations.d.ts.map +1 -1
  24. package/dist/types/automations.js +25 -17
  25. package/dist/types/automations.js.map +1 -1
  26. package/dist/types/chat.d.ts +21418 -0
  27. package/dist/types/chat.d.ts.map +1 -0
  28. package/dist/types/chat.js +70 -0
  29. package/dist/types/chat.js.map +1 -0
  30. package/dist/types/common.d.ts +16970 -2136
  31. package/dist/types/common.d.ts.map +1 -1
  32. package/dist/types/common.js +1695 -332
  33. package/dist/types/common.js.map +1 -1
  34. package/dist/types/config.d.ts +239 -31
  35. package/dist/types/config.d.ts.map +1 -1
  36. package/dist/types/config.js +86 -34
  37. package/dist/types/config.js.map +1 -1
  38. package/dist/types/image.d.ts +27 -4
  39. package/dist/types/image.d.ts.map +1 -1
  40. package/dist/types/image.js +17 -10
  41. package/dist/types/image.js.map +1 -1
  42. package/dist/types/index.d.ts +2 -1
  43. package/dist/types/index.d.ts.map +1 -1
  44. package/dist/types/index.js +3 -2
  45. package/dist/types/index.js.map +1 -1
  46. package/dist/types/invites.d.ts +20 -11
  47. package/dist/types/invites.d.ts.map +1 -1
  48. package/dist/types/invites.js +9 -12
  49. package/dist/types/invites.js.map +1 -1
  50. package/dist/types/notifications.d.ts +163 -0
  51. package/dist/types/notifications.d.ts.map +1 -0
  52. package/dist/types/notifications.js +44 -0
  53. package/dist/types/notifications.js.map +1 -0
  54. package/dist/types/teams.d.ts +1628 -231
  55. package/dist/types/teams.d.ts.map +1 -1
  56. package/dist/types/teams.js +76 -45
  57. package/dist/types/teams.js.map +1 -1
  58. package/dist/types/threads.d.ts +997 -243
  59. package/dist/types/threads.d.ts.map +1 -1
  60. package/dist/types/threads.js +84 -51
  61. package/dist/types/threads.js.map +1 -1
  62. package/dist/types/users.d.ts +98 -18
  63. package/dist/types/users.d.ts.map +1 -1
  64. package/dist/types/users.js +43 -18
  65. package/dist/types/users.js.map +1 -1
  66. package/dist/v1/resources/activity_feed.d.ts +89 -0
  67. package/dist/v1/resources/activity_feed.d.ts.map +1 -1
  68. package/dist/v1/resources/activity_feed.js +56 -2
  69. package/dist/v1/resources/activity_feed.js.map +1 -1
  70. package/dist/v1/resources/agent_computers.d.ts +48 -2
  71. package/dist/v1/resources/agent_computers.d.ts.map +1 -1
  72. package/dist/v1/resources/agent_computers.js +48 -1
  73. package/dist/v1/resources/agent_computers.js.map +1 -1
  74. package/dist/v1/resources/agent_env_vars.d.ts +50 -0
  75. package/dist/v1/resources/agent_env_vars.d.ts.map +1 -0
  76. package/dist/v1/resources/agent_env_vars.js +56 -0
  77. package/dist/v1/resources/agent_env_vars.js.map +1 -0
  78. package/dist/v1/resources/agent_health_actions.d.ts +43 -0
  79. package/dist/v1/resources/agent_health_actions.d.ts.map +1 -0
  80. package/dist/v1/resources/agent_health_actions.js +50 -0
  81. package/dist/v1/resources/agent_health_actions.js.map +1 -0
  82. package/dist/v1/resources/agent_installations.d.ts +100 -0
  83. package/dist/v1/resources/agent_installations.d.ts.map +1 -1
  84. package/dist/v1/resources/agent_installations.js +106 -2
  85. package/dist/v1/resources/agent_installations.js.map +1 -1
  86. package/dist/v1/resources/agent_routine_runs.d.ts +33 -0
  87. package/dist/v1/resources/agent_routine_runs.d.ts.map +1 -0
  88. package/dist/v1/resources/agent_routine_runs.js +48 -0
  89. package/dist/v1/resources/agent_routine_runs.js.map +1 -0
  90. package/dist/v1/resources/agent_routines.d.ts +148 -2
  91. package/dist/v1/resources/agent_routines.d.ts.map +1 -1
  92. package/dist/v1/resources/agent_routines.js +168 -3
  93. package/dist/v1/resources/agent_routines.js.map +1 -1
  94. package/dist/v1/resources/agent_sessions.d.ts +118 -1
  95. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  96. package/dist/v1/resources/agent_sessions.js +134 -2
  97. package/dist/v1/resources/agent_sessions.js.map +1 -1
  98. package/dist/v1/resources/agent_skills.d.ts +83 -1
  99. package/dist/v1/resources/agent_skills.d.ts.map +1 -1
  100. package/dist/v1/resources/agent_skills.js +87 -2
  101. package/dist/v1/resources/agent_skills.js.map +1 -1
  102. package/dist/v1/resources/agent_tools.d.ts +109 -2
  103. package/dist/v1/resources/agent_tools.d.ts.map +1 -1
  104. package/dist/v1/resources/agent_tools.js +114 -2
  105. package/dist/v1/resources/agent_tools.js.map +1 -1
  106. package/dist/v1/resources/agents.d.ts +517 -9
  107. package/dist/v1/resources/agents.d.ts.map +1 -1
  108. package/dist/v1/resources/agents.js +515 -12
  109. package/dist/v1/resources/agents.js.map +1 -1
  110. package/dist/v1/resources/ai.d.ts +93 -0
  111. package/dist/v1/resources/ai.d.ts.map +1 -1
  112. package/dist/v1/resources/ai.js +89 -1
  113. package/dist/v1/resources/ai.js.map +1 -1
  114. package/dist/v1/resources/artifacts.d.ts +73 -0
  115. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  116. package/dist/v1/resources/artifacts.js +74 -2
  117. package/dist/v1/resources/artifacts.js.map +1 -1
  118. package/dist/v1/resources/automation_runs.d.ts +8 -4
  119. package/dist/v1/resources/automation_runs.d.ts.map +1 -1
  120. package/dist/v1/resources/automation_runs.js +9 -5
  121. package/dist/v1/resources/automation_runs.js.map +1 -1
  122. package/dist/v1/resources/automations.d.ts +20 -0
  123. package/dist/v1/resources/automations.d.ts.map +1 -1
  124. package/dist/v1/resources/automations.js +21 -1
  125. package/dist/v1/resources/automations.js.map +1 -1
  126. package/dist/v1/resources/bug_reports.d.ts +29 -0
  127. package/dist/v1/resources/bug_reports.d.ts.map +1 -0
  128. package/dist/v1/resources/bug_reports.js +29 -0
  129. package/dist/v1/resources/bug_reports.js.map +1 -0
  130. package/dist/v1/resources/config.d.ts +429 -4
  131. package/dist/v1/resources/config.d.ts.map +1 -1
  132. package/dist/v1/resources/config.js +493 -9
  133. package/dist/v1/resources/config.js.map +1 -1
  134. package/dist/v1/resources/custom_objects.d.ts +117 -2
  135. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  136. package/dist/v1/resources/custom_objects.js +132 -3
  137. package/dist/v1/resources/custom_objects.js.map +1 -1
  138. package/dist/v1/resources/files.d.ts +62 -0
  139. package/dist/v1/resources/files.d.ts.map +1 -0
  140. package/dist/v1/resources/files.js +58 -0
  141. package/dist/v1/resources/files.js.map +1 -0
  142. package/dist/v1/resources/index.d.ts +13 -0
  143. package/dist/v1/resources/index.d.ts.map +1 -1
  144. package/dist/v1/resources/index.js +14 -1
  145. package/dist/v1/resources/index.js.map +1 -1
  146. package/dist/v1/resources/installation_sources.d.ts +12 -0
  147. package/dist/v1/resources/installation_sources.d.ts.map +1 -1
  148. package/dist/v1/resources/installation_sources.js +13 -1
  149. package/dist/v1/resources/installation_sources.js.map +1 -1
  150. package/dist/v1/resources/invites.d.ts +15 -0
  151. package/dist/v1/resources/invites.d.ts.map +1 -1
  152. package/dist/v1/resources/invites.js +16 -1
  153. package/dist/v1/resources/invites.js.map +1 -1
  154. package/dist/v1/resources/knowledge_documents.d.ts +104 -0
  155. package/dist/v1/resources/knowledge_documents.d.ts.map +1 -0
  156. package/dist/v1/resources/knowledge_documents.js +112 -0
  157. package/dist/v1/resources/knowledge_documents.js.map +1 -0
  158. package/dist/v1/resources/knowledge_sources.d.ts +190 -0
  159. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -0
  160. package/dist/v1/resources/knowledge_sources.js +176 -0
  161. package/dist/v1/resources/knowledge_sources.js.map +1 -0
  162. package/dist/v1/resources/kv.d.ts +73 -0
  163. package/dist/v1/resources/kv.d.ts.map +1 -1
  164. package/dist/v1/resources/kv.js +96 -3
  165. package/dist/v1/resources/kv.js.map +1 -1
  166. package/dist/v1/resources/notification_preferences.d.ts +61 -0
  167. package/dist/v1/resources/notification_preferences.d.ts.map +1 -0
  168. package/dist/v1/resources/notification_preferences.js +65 -0
  169. package/dist/v1/resources/notification_preferences.js.map +1 -0
  170. package/dist/v1/resources/notifications.d.ts +133 -0
  171. package/dist/v1/resources/notifications.d.ts.map +1 -0
  172. package/dist/v1/resources/notifications.js +136 -0
  173. package/dist/v1/resources/notifications.js.map +1 -0
  174. package/dist/v1/resources/orgs.d.ts +18 -0
  175. package/dist/v1/resources/orgs.d.ts.map +1 -1
  176. package/dist/v1/resources/orgs.js +30 -2
  177. package/dist/v1/resources/orgs.js.map +1 -1
  178. package/dist/v1/resources/slack_channel_bindings.d.ts +101 -0
  179. package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -0
  180. package/dist/v1/resources/slack_channel_bindings.js +114 -0
  181. package/dist/v1/resources/slack_channel_bindings.js.map +1 -0
  182. package/dist/v1/resources/solution_categories.d.ts +36 -0
  183. package/dist/v1/resources/solution_categories.d.ts.map +1 -0
  184. package/dist/v1/resources/solution_categories.js +55 -0
  185. package/dist/v1/resources/solution_categories.js.map +1 -0
  186. package/dist/v1/resources/solution_tags.d.ts +37 -0
  187. package/dist/v1/resources/solution_tags.d.ts.map +1 -0
  188. package/dist/v1/resources/solution_tags.js +54 -0
  189. package/dist/v1/resources/solution_tags.js.map +1 -0
  190. package/dist/v1/resources/solutions.d.ts +309 -0
  191. package/dist/v1/resources/solutions.d.ts.map +1 -0
  192. package/dist/v1/resources/solutions.js +214 -0
  193. package/dist/v1/resources/solutions.js.map +1 -0
  194. package/dist/v1/resources/team_memberships.d.ts +31 -0
  195. package/dist/v1/resources/team_memberships.d.ts.map +1 -1
  196. package/dist/v1/resources/team_memberships.js +49 -2
  197. package/dist/v1/resources/team_memberships.js.map +1 -1
  198. package/dist/v1/resources/teams.d.ts +458 -49
  199. package/dist/v1/resources/teams.d.ts.map +1 -1
  200. package/dist/v1/resources/teams.js +319 -27
  201. package/dist/v1/resources/teams.js.map +1 -1
  202. package/dist/v1/resources/thread_messages.d.ts +70 -0
  203. package/dist/v1/resources/thread_messages.d.ts.map +1 -1
  204. package/dist/v1/resources/thread_messages.js +85 -2
  205. package/dist/v1/resources/thread_messages.js.map +1 -1
  206. package/dist/v1/resources/threads.d.ts +201 -0
  207. package/dist/v1/resources/threads.d.ts.map +1 -1
  208. package/dist/v1/resources/threads.js +220 -4
  209. package/dist/v1/resources/threads.js.map +1 -1
  210. package/dist/v1/resources/users.d.ts +213 -39
  211. package/dist/v1/resources/users.d.ts.map +1 -1
  212. package/dist/v1/resources/users.js +121 -16
  213. package/dist/v1/resources/users.js.map +1 -1
  214. package/dist/v1.d.ts +26 -0
  215. package/dist/v1.d.ts.map +1 -1
  216. package/dist/v1.js +40 -1
  217. package/dist/v1.js.map +1 -1
  218. package/package.json +3 -1
  219. package/dist/types/agents.d.ts +0 -2084
  220. package/dist/types/agents.d.ts.map +0 -1
  221. package/dist/types/agents.js +0 -203
  222. package/dist/types/agents.js.map +0 -1
@@ -1,11 +1,38 @@
1
1
  import { HttpClient } from "../../runtime/http-client.js";
2
- import type { Agent, AgentComputer, AgentComputerListResponse, AgentExport, AgentListResponse, AgentRoutine, AgentSchedule, AgentTool, AgentToolListResponse } from "../../types/agents.js";
3
- import type { Installation, InstallationKindListResponse, InstallationListResponse, WorkingMemoryEntryListResponse } from "../../types/common.js";
2
+ import type { Agent, AgentComputer, AgentComputerListResponse, AgentCreateResponse, AgentEnvVarMasked, AgentEnvVarMaskedList, AgentExport, AgentHealth, AgentListResponse, AgentRoutine, AgentSchedule, AgentTool, AgentToolListResponse, AgentUpgradeResponse, HealthActionListResponse, Installation, InstallationKindListResponse, InstallationListResponse, WorkingMemoryEntryListResponse } from "../../types/common.js";
4
3
  import type { Thread } from "../../types/threads.js";
5
4
  export declare class AgentAgentComputerResource {
6
5
  private http;
7
6
  constructor(http: HttpClient);
7
+ /**
8
+ * List computers
9
+ * Returns all computers belonging to the authenticated app, ordered by creation
10
+ * time descending. Pass `agent` to scope the results to a single agent's
11
+ * computers. When `agent` is omitted, computers for all agents in the app are
12
+ * returned.
13
+ * Requires an app-scoped API key. If the specified agent does not exist or does
14
+ * not belong to the app, the endpoint returns 404.
15
+ * @param agent - Agent ID (`agt_...`). When provided, only computers belonging to this agent are returned.
16
+ * @returns Object containing a `data` array of computer records.
17
+ */
8
18
  list(agent: string): Promise<AgentComputerListResponse>;
19
+ /**
20
+ * Provision a computer for an agent
21
+ * Creates and provisions a new computer resource associated with the specified
22
+ * agent. The computer is allocated in the requested region (defaulting to `iad`)
23
+ * and its status transitions from `provisioning` to `running` once it is ready.
24
+ * Requires an app-scoped API key. The agent identified by `agent` must belong
25
+ * to the same app. Supplying a `lookup_key` lets you retrieve this computer
26
+ * later without storing its ID — the key must be unique within the app.
27
+ * @param agent - Agent ID (`agt_...`). When provided, only computers belonging to this agent are returned.
28
+ * @param input - Request body.
29
+ * @param input.config - Provider-specific configuration for the computer. Supported keys vary by region and plan.
30
+ * @param input.lookup_key - Stable, user-defined key for this computer. Must be unique within the app. Use it to look up the computer without storing its ID.
31
+ * @param input.metadata - Arbitrary key-value metadata to attach to the computer. Not interpreted by the platform; returned as-is on all subsequent reads.
32
+ * @param input.name - Human-readable display name for the computer.
33
+ * @param input.region - Region in which to provision the computer, e.g. `"iad"`. Defaults to `"iad"` when omitted.
34
+ * @returns The newly provisioned computer.
35
+ */
9
36
  create(agent: string, input: {
10
37
  config?: Record<string, unknown> | undefined;
11
38
  lookup_key?: string | undefined;
@@ -14,10 +41,81 @@ export declare class AgentAgentComputerResource {
14
41
  region?: string | undefined;
15
42
  }): Promise<AgentComputer>;
16
43
  }
44
+ export declare class AgentAgentEnvVarResource {
45
+ private http;
46
+ constructor(http: HttpClient);
47
+ /**
48
+ * List an agent's environment variables
49
+ * Returns all environment variables defined for the specified agent. Variable
50
+ * values are always masked in the response; only the last four characters are
51
+ * visible. To inspect a specific variable, use the retrieve endpoint.
52
+ * The authenticated user must have access to the agent's parent app. Pass the
53
+ * app scope via the `app` parameter when calling with an API key that is scoped
54
+ * to a specific app. Results are returned in an unordered flat list.
55
+ * @param agent - Agent ID (`agt_...`). Returns environment variables belonging to this agent.
56
+ * @returns List of environment variables for the agent, with values masked.
57
+ */
58
+ list(agent: string): Promise<AgentEnvVarMaskedList>;
59
+ /**
60
+ * Create an agent environment variable
61
+ * Creates a new environment variable for the specified agent. The variable is
62
+ * stored securely and the plaintext `value` is never returned after creation;
63
+ * subsequent reads return a masked representation showing only the last four
64
+ * characters.
65
+ * The authenticated user must have access to the agent's parent app. Pass the
66
+ * app scope via the `app` parameter when calling with an API key that is scoped
67
+ * to a specific app. Each `key` must be unique within the agent; attempting to
68
+ * create a duplicate key returns a validation error.
69
+ * @param agent - Agent ID (`agt_...`). Returns environment variables belonging to this agent.
70
+ * @param input - Request body.
71
+ * @param input.description - Optional human-readable note describing what the variable is used for.
72
+ * @param input.key - Environment variable name, e.g. `WEBHOOK_SECRET`. Must be unique within the agent.
73
+ * @param input.value - Plaintext secret value to store. The value is encrypted at rest and never returned in full.
74
+ * @returns The newly created environment variable with its value masked.
75
+ */
76
+ create(agent: string, input: {
77
+ description?: string | undefined;
78
+ key: string;
79
+ value: string;
80
+ }): Promise<AgentEnvVarMasked>;
81
+ }
17
82
  export declare class AgentAgentInstallationResource {
18
83
  private http;
19
84
  constructor(http: HttpClient);
85
+ /**
86
+ * List installations for an agent
87
+ * Returns all installations belonging to the specified agent, across all kinds and
88
+ * states. Use this endpoint to inspect which external services and enablement channels
89
+ * an agent is connected to.
90
+ * Results are scoped to the authenticated app and are returned in an unordered array.
91
+ * To list installations across all agents in an app, use the top-level List
92
+ * Installations endpoint instead. The caller must have app scope for the app that
93
+ * owns the agent.
94
+ * @param agent - Agent ID (`agt_...`) whose installations you want to retrieve.
95
+ * @returns The list of installations for the specified agent.
96
+ */
20
97
  list(agent: string): Promise<InstallationListResponse>;
98
+ /**
99
+ * Create an installation
100
+ * Creates a new installation for an agent, connecting it to an external service or
101
+ * enablement channel via the specified `kind`. The installation begins in a pending
102
+ * state unless an integration is supplied at creation time, in which case it is
103
+ * activated immediately.
104
+ * Supply `shared_integration` to bind an existing org- or app-level integration, or
105
+ * supply `integration` to create a new integration inline and activate the installation
106
+ * in a single request. Supplying both fields returns 422.
107
+ * Use `lookup_key` to assign a stable identifier you can reference later in knowledge
108
+ * search `source_refs`. The key must be unique within the app, org, and sandbox
109
+ * combination. The caller must have app scope for the app that owns the agent.
110
+ * @param agent - Agent ID (`agt_...`) whose installations you want to retrieve.
111
+ * @param input - Request body.
112
+ * @param input.config - Kind-specific configuration object. Shape varies by `kind`; omit if the kind requires no initial configuration.
113
+ * @param input.integration - Inline integration fields to create for `integration/*` kinds. When provided, a new Integration record is created and the installation is activated immediately. Mutually exclusive with `shared_integration`.
114
+ * @param input.kind - Installation kind that determines the external service being connected. Examples: `"enablement/github_app"`, `"enablement/slack_bot"`, `"integration/github"`, `"integration/gmail"`, `"web/site"`. Use the List Kinds endpoint to retrieve all supported values.
115
+ * @param input.lookup_key - Stable identifier you assign to this installation. Propagated to backing context source rows so they can be referenced via knowledge search `source_refs`. Must contain only lowercase letters, numbers, underscores, or hyphens (max 100 characters). Must be unique within the same app, org, and sandbox combination. Omit to skip stable referencing.
116
+ * @param input.shared_integration - ID of an existing shared org- or app-level integration to bind to this installation. Mutually exclusive with `integration`.
117
+ * @returns The newly created installation.
118
+ */
21
119
  create(agent: string, input: {
22
120
  config?: Record<string, unknown> | undefined;
23
121
  integration?: {
@@ -28,17 +126,75 @@ export declare class AgentAgentInstallationResource {
28
126
  workspace_key?: string | undefined;
29
127
  } | undefined;
30
128
  kind: string;
129
+ lookup_key?: string | undefined;
31
130
  shared_integration?: string | undefined;
32
131
  }): Promise<Installation>;
132
+ /**
133
+ * List available installation kinds
134
+ * Returns the full catalogue of installation kinds supported by the platform. Use
135
+ * the returned `kind` values when calling the Create Installation endpoint.
136
+ * The list is platform-wide and does not vary by agent. The `agent` parameter is
137
+ * accepted for future per-agent filtering but is currently unused. The caller must
138
+ * have app scope to call this endpoint.
139
+ * @param agent - Agent ID (`agt_...`) whose installations you want to retrieve.
140
+ * @returns The list of all supported installation kinds.
141
+ */
33
142
  kinds(agent: string): Promise<InstallationKindListResponse>;
34
143
  }
35
144
  export declare class AgentAgentToolResource {
36
145
  private http;
37
146
  constructor(http: HttpClient);
147
+ /**
148
+ * List agent tools
149
+ * Returns all tools for the authenticated app, optionally filtered by agent
150
+ * or tool kind. Both explicitly created tools and tools derived from connected
151
+ * integrations (installation-sourced tools) are included in the response.
152
+ * Installation-sourced tools appear with `source: "installation"` and
153
+ * `status: "active"`. They are synthesized at request time from connected
154
+ * integrations and do not have a persistent tool ID of the `atl_...` form;
155
+ * their `id` is a composite of the installation ID and server tool type.
156
+ * Use the `agent` filter to retrieve tools for a specific agent. Supplying an
157
+ * `agent` ID that does not belong to the authenticated app returns 404.
158
+ * Requires app scope.
159
+ * @param agent - Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app.
160
+ * @param params - Query parameters.
161
+ * @param params.kind - Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
162
+ * @returns List of tools matching the supplied filters.
163
+ */
38
164
  list(agent: string, params?: {
39
165
  kind?: string;
40
166
  }): Promise<AgentToolListResponse>;
167
+ /**
168
+ * Create an agent tool
169
+ * Creates a new tool and attaches it to the specified agent. Tools can be
170
+ * either `"builtin"` (a platform-provided capability identified by
171
+ * `builtin_tool_key`) or `"custom"` (a caller-defined tool with its own name,
172
+ * description, parameter schema, and handler).
173
+ * New tools are created in `"draft"` status by default unless `status:
174
+ * "active"` is explicitly supplied. Draft tools are not exposed to the LLM
175
+ * during agent runs; call the activate endpoint to promote them.
176
+ * For built-in tools that support multiple instances per agent (those whose
177
+ * catalog entry has a `multi_instance_mode`), supply `name_prefix` to
178
+ * namespace the LLM-facing tool names. Requires app scope.
179
+ * @param agent - Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app.
180
+ * @param input - Request body.
181
+ * @param input.async - When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
182
+ * @param input.builtin_tool_config - Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the chosen `builtin_tool_key`. Applies only to `"builtin"` tools.
183
+ * @param input.builtin_tool_key - Key identifying the built-in tool type to add (e.g. `"knowledge_search"`). Required when `kind` is `"builtin"`. Must match a key in the tool catalog.
184
+ * @param input.config - Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
185
+ * @param input.description - Human-readable description of what the tool does. Shown to the LLM as context. Applies primarily to `"custom"` tools.
186
+ * @param input.handler_type - Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
187
+ * @param input.kind - Tool kind. One of `"builtin"` or `"custom"`.
188
+ * @param input.lookup_key - Optional stable identifier you can use to look up this tool without its ID. Must be unique within the app. Useful for idempotent provisioning.
189
+ * @param input.metadata - Arbitrary key-value metadata to attach to the tool. Not interpreted by the platform.
190
+ * @param input.name - Display name for the tool. Required when `kind` is `"custom"`.
191
+ * @param input.name_prefix - Per-instance namespace for built-in tools that support multiple instances per agent. Stamped onto LLM-facing tool names (e.g. `"org"` produces `"org_knowledge_search"`). Must match `^[a-z][a-z0-9_]*$` and be at most 24 characters. Required for `"namespaced"` multi-instance tools; omit for single-instance tools.
192
+ * @param input.parameters - JSON Schema object describing the tool's input parameters. Used by the LLM to construct valid tool calls. Applies to `"custom"` tools.
193
+ * @param input.status - Initial status of the tool. One of `"draft"` or `"active"`. Defaults to `"draft"` when omitted.
194
+ * @returns The newly created tool.
195
+ */
41
196
  create(agent: string, input: {
197
+ async?: boolean | undefined;
42
198
  builtin_tool_config?: Record<string, unknown> | undefined;
43
199
  builtin_tool_key?: string | undefined;
44
200
  config?: string | undefined;
@@ -48,6 +204,7 @@ export declare class AgentAgentToolResource {
48
204
  lookup_key?: string | undefined;
49
205
  metadata?: Record<string, unknown> | undefined;
50
206
  name?: string | undefined;
207
+ name_prefix?: string | undefined;
51
208
  parameters?: Record<string, unknown> | undefined;
52
209
  status?: string | undefined;
53
210
  }): Promise<AgentTool>;
@@ -55,6 +212,17 @@ export declare class AgentAgentToolResource {
55
212
  export declare class ScheduleResource {
56
213
  private http;
57
214
  constructor(http: HttpClient);
215
+ /**
216
+ * List schedules for an agent
217
+ * Returns all schedules belonging to the specified agent in any status. Use the
218
+ * `status` parameter to narrow results to a single lifecycle state.
219
+ * Requires an app-scoped API key. The agent must belong to the app identified
220
+ * by the key.
221
+ * @param agent - Agent ID (`agi_...`). The agent whose schedules you want to retrieve.
222
+ * @param params - Query parameters.
223
+ * @param params.status - Filter results by schedule status. One of `"active"`, `"paused"`, `"completed"`, `"cancelled"`, or `"expired"`. Omit to return schedules in all statuses.
224
+ * @returns Successful response
225
+ */
58
226
  list(agent: string, params?: {
59
227
  status?: string;
60
228
  }): Promise<{
@@ -78,21 +246,91 @@ export declare class ScheduleResource {
78
246
  updated_at?: string | undefined;
79
247
  }[] | undefined;
80
248
  }>;
249
+ /**
250
+ * Retrieve a schedule
251
+ * Returns a single schedule belonging to the specified agent. Use this endpoint
252
+ * to fetch the current state, next run time, and configuration of an individual
253
+ * schedule.
254
+ * Requires an app-scoped API key. Both the agent and the schedule must belong
255
+ * to the app identified by the key. Returns 404 if the schedule does not exist
256
+ * or belongs to a different agent.
257
+ * @param agent - Agent ID (`agi_...`). The agent whose schedules you want to retrieve.
258
+ * @param schedule - Schedule ID (`asc_...`). The schedule to retrieve.
259
+ * @returns The requested agent schedule.
260
+ */
81
261
  get(agent: string, schedule: string): Promise<AgentSchedule>;
82
262
  }
83
263
  export declare class AgentResource {
84
264
  private http;
85
265
  readonly agent_computers: AgentAgentComputerResource;
266
+ readonly agent_env_vars: AgentAgentEnvVarResource;
86
267
  readonly agent_installations: AgentAgentInstallationResource;
87
268
  readonly agent_tools: AgentAgentToolResource;
88
269
  readonly schedules: ScheduleResource;
89
270
  constructor(http: HttpClient);
271
+ /**
272
+ * List agents
273
+ * Returns a paginated list of agents visible to the authenticated caller. Results are
274
+ * ordered by creation time descending.
275
+ * Use `search` to filter by name, org, team, or owner fields. Use `user` or `org_id`
276
+ * to scope the list to a specific owner. Use `template_config` to find agents whose
277
+ * last applied template matches a given config ID. Use `solution_config` to find
278
+ * agents whose last applied template was imported as part of any of the given
279
+ * Solution config IDs.
280
+ * Pagination is page-based: pass `page` and `page_size` to navigate through large
281
+ * result sets. When called under a developer app scope, only agents belonging to that
282
+ * app are returned.
283
+ * @param params - Query parameters.
284
+ * @param params.page - Page number to retrieve, 1-indexed. Defaults to `1`.
285
+ * @param params.pageSize - Number of agents to return per page. Defaults to `25`.
286
+ * @param params.search - Free-text search string matched against the agent name, org, team, and owner fields.
287
+ * @param params.user - User ID (`usr_...`) to filter by. Returns only agents owned by this user.
288
+ * @param params.orgId - Organization ID (`org_...`) to filter by. Returns only agents owned by this org.
289
+ * @param params.templateConfig - Config ID (`cfg_...`) or `lookup_key` of an AgentTemplate. Returns only agents whose last applied template matches.
290
+ * @param params.solutionConfig - Solution config IDs (`cfg_...`) to filter by. Returns only agents whose last applied template was imported as part of any of the listed Solutions. Pass one or more IDs.
291
+ * @returns Paginated list of agents matching the supplied filters.
292
+ */
90
293
  list(params?: {
91
294
  page?: number;
92
295
  pageSize?: number;
93
296
  search?: string;
94
297
  user?: string;
298
+ orgId?: string;
299
+ templateConfig?: string;
300
+ solutionConfig?: string[];
95
301
  }): Promise<AgentListResponse>;
302
+ /**
303
+ * Create an agent
304
+ * Creates a new agent. Supports two mutually exclusive provisioning modes.
305
+ * **Template mode** — pass `template` with the ID or `lookup_key` of an existing
306
+ * AgentTemplate config. The agent's tools, routines, skills, and installations are
307
+ * provisioned from that template's `config_ref` entries.
308
+ * **Bundle mode** — pass `template_bundle` with a self-contained install payload
309
+ * (AgentTemplate body plus every skill, script, and config it references). The entire
310
+ * bundle commits in a single transaction; any failure rolls back the whole install and
311
+ * the response includes `installed_configs[]` — one entry per persisted config.
312
+ * Pass exactly one of `template` or `template_bundle`. If neither is supplied, `name`
313
+ * is required and a blank agent is created. Requires authentication; when called under
314
+ * a developer app scope (`/developer/apps/:app/...`), the caller must hold the app scope
315
+ * for the target app.
316
+ * @param input - Request body.
317
+ * @param input.acl - Access control list controlling which users, teams, or orgs can read or manage this agent.
318
+ * @param input.email - Email address assigned to the agent. Used as the agent's contact identity.
319
+ * @param input.identity - System-prompt identity string describing who the agent is. Passed verbatim to the model on each conversation turn.
320
+ * @param input.lookup_key - Stable, unique slug used to look up this agent by name instead of ID. Must be unique within the owning app or org.
321
+ * @param input.metadata - Arbitrary key-value map stored on the agent. Not interpreted by the platform.
322
+ * @param input.model - Default AI model identifier for this agent, e.g. `claude-sonnet-4-5`. Overridden per-request when the caller specifies a model.
323
+ * @param input.name - Display name for the agent. Required when neither `template` nor `template_bundle` is provided.
324
+ * @param input.org - Organization ID (`org_...`) that should own this agent. Mutually exclusive with `team` and `user`.
325
+ * @param input.originator - Free-form label identifying the source or author of the agent, e.g. a user ID, a deploy pipeline, or a slug.
326
+ * @param input.phone_number - Phone number assigned to the agent in E.164 format, e.g. `+15550001234`.
327
+ * @param input.profile_picture - Profile picture to attach to the agent. All three subfields are required when this object is present.
328
+ * @param input.team - Team ID (`team_...`) that should own this agent. Mutually exclusive with `org` and `user`.
329
+ * @param input.template - ID (`cfg_...`) or `lookup_key` of an existing AgentTemplate config to provision from. Mutually exclusive with `template_bundle`.
330
+ * @param input.template_bundle - Self-contained install bundle containing an AgentTemplate plus all referenced skills and configs. The entire bundle is committed atomically. Mutually exclusive with `template`.
331
+ * @param input.user - User ID (`usr_...`) that should own this agent. Mutually exclusive with `org` and `team`.
332
+ * @returns The newly created agent. When `template_bundle` was supplied, the response also includes `installed_configs[]` — one entry per persisted config object, with `key` echoing the caller-supplied input identifier.
333
+ */
96
334
  create(input: {
97
335
  acl?: {
98
336
  add?: {
@@ -117,6 +355,7 @@ export declare class AgentResource {
117
355
  model?: string | undefined;
118
356
  name?: string | undefined;
119
357
  org?: string | undefined;
358
+ originator?: string | undefined;
120
359
  phone_number?: string | undefined;
121
360
  profile_picture?: {
122
361
  data: string;
@@ -125,10 +364,87 @@ export declare class AgentResource {
125
364
  } | undefined;
126
365
  team?: string | undefined;
127
366
  template?: string | undefined;
367
+ template_bundle?: {
368
+ configs?: {
369
+ content: string;
370
+ content_type?: string | undefined;
371
+ relative_path: string;
372
+ }[] | undefined;
373
+ lookup_key_suffix?: string | undefined;
374
+ setup_actions?: {
375
+ depends_on?: string[] | undefined;
376
+ description?: string | undefined;
377
+ kind: string;
378
+ params?: Record<string, unknown> | undefined;
379
+ required?: boolean | undefined;
380
+ sort_order?: number | undefined;
381
+ title: string;
382
+ verify_config?: Record<string, unknown> | undefined;
383
+ }[] | undefined;
384
+ skills?: {
385
+ content: string;
386
+ content_type?: string | undefined;
387
+ files?: {
388
+ content: string;
389
+ content_type?: string | undefined;
390
+ relative_path: string;
391
+ }[] | undefined;
392
+ relative_path: string;
393
+ }[] | undefined;
394
+ template: {
395
+ content: string;
396
+ content_type?: string | undefined;
397
+ relative_path: string;
398
+ };
399
+ } | undefined;
128
400
  user?: string | undefined;
129
- }): Promise<Agent>;
401
+ }): Promise<AgentCreateResponse>;
402
+ /**
403
+ * Delete an agent
404
+ * Permanently deletes an agent and all of its associated resources. This action cannot
405
+ * be undone.
406
+ * The authenticated caller must own the agent or hold sufficient permissions within its
407
+ * owning org or team. When called under a developer app scope, the caller must hold the
408
+ * app scope for the target app.
409
+ * @param agent - ID (`agi_...`) or `lookup_key` of the agent to delete.
410
+ * @returns Empty body. Returns HTTP 204 on success.
411
+ */
130
412
  delete(agent: string): Promise<void>;
413
+ /**
414
+ * Retrieve an agent
415
+ * Returns the agent identified by ID or `lookup_key`. The authenticated caller must
416
+ * own the agent or hold sufficient permissions within its owning org or team.
417
+ * When called under a developer app scope, the agent must belong to that app. Use the
418
+ * list endpoint to retrieve many agents at once.
419
+ * @param agent - ID (`agi_...`) or `lookup_key` of the agent to retrieve.
420
+ * @returns The requested agent.
421
+ */
131
422
  get(agent: string): Promise<Agent>;
423
+ /**
424
+ * Update an agent
425
+ * Updates one or more fields on an existing agent. Only the fields you supply are
426
+ * changed; omitted fields retain their current values.
427
+ * To clear the agent's default model, pass `model` as an empty string. The
428
+ * authenticated caller must own the agent or hold write permissions within its owning
429
+ * org or team. When called under a developer app scope, the caller must hold the app
430
+ * scope for the target app.
431
+ * @param agent - ID (`agi_...`) or `lookup_key` of the agent to update.
432
+ * @param input - Request body.
433
+ * @param input.acl - Replacement access control list. Fully replaces the existing ACL.
434
+ * @param input.email - New email address for the agent.
435
+ * @param input.identity - Replacement identity system-prompt string describing who the agent is.
436
+ * @param input.lookup_key - New `lookup_key` slug. Must be unique within the owning app or org.
437
+ * @param input.metadata - Replacement key-value metadata map. The entire map is replaced, not merged.
438
+ * @param input.model - New default AI model identifier, e.g. `claude-sonnet-4-5`. Pass an empty string to clear the agent's default model.
439
+ * @param input.name - New display name for the agent.
440
+ * @param input.org - Organization ID (`org_...`) to transfer ownership to.
441
+ * @param input.originator - Replacement originator label identifying the source or author of the agent.
442
+ * @param input.phone_number - New phone number for the agent in E.164 format, e.g. `+15550001234`.
443
+ * @param input.profile_picture - Replacement profile picture. All three subfields are required when this object is present.
444
+ * @param input.team - Team ID (`team_...`) to transfer ownership to.
445
+ * @param input.user - User ID (`usr_...`) to transfer ownership to.
446
+ * @returns The updated agent with all current field values.
447
+ */
132
448
  update(agent: string, input: {
133
449
  acl?: {
134
450
  add?: {
@@ -153,6 +469,7 @@ export declare class AgentResource {
153
469
  model?: string | undefined;
154
470
  name?: string | undefined;
155
471
  org?: string | undefined;
472
+ originator?: string | undefined;
156
473
  phone_number?: string | undefined;
157
474
  profile_picture?: {
158
475
  data: string;
@@ -162,6 +479,59 @@ export declare class AgentResource {
162
479
  team?: string | undefined;
163
480
  user?: string | undefined;
164
481
  }): Promise<Agent>;
482
+ /**
483
+ * List health actions for an agent
484
+ * Returns all health actions associated with a given agent. Health actions
485
+ * represent required or recommended steps — such as setting environment
486
+ * variables, completing OAuth installations, or running custom verifiers —
487
+ * that an agent needs to reach a healthy state.
488
+ * Results are not paginated; the full list for the agent is returned. Use
489
+ * the `source`, `status`, and `kind` filters to narrow results to the
490
+ * subset your UI or workflow needs. Multiple values for the same filter
491
+ * are treated as OR (e.g. passing two statuses returns actions matching
492
+ * either). The caller must be authenticated and scoped to the app that
493
+ * owns the agent.
494
+ * @param agent - Agent ID (`agt_...`) or lookup key of the agent whose health actions you want to list.
495
+ * @param params - Query parameters.
496
+ * @param params.source - Filter results to actions from one or more lifecycle stages. Accepted values: `"setup"` (actions created during agent installation) and `"health"` (ongoing health checks). Omit to return actions from all stages.
497
+ * @param params.status - Filter results to actions in one or more statuses. Accepted values: `"pending"`, `"completed"`, `"skipped"`, and `"degraded"`. Omit to return actions in all statuses.
498
+ * @param params.kind - Filter results to actions of one or more kinds. Accepted values: `"env_var"` (a required secret or config value), `"install"` (an OAuth or integration install step), and `"custom"` (a platform-defined check). Omit to return all kinds.
499
+ * @returns Object containing a `data` array of health action objects for the specified agent.
500
+ */
501
+ agentHealthActions(agent: string, params?: {
502
+ source?: string[];
503
+ status?: string[];
504
+ kind?: string[];
505
+ }): Promise<HealthActionListResponse>;
506
+ /**
507
+ * Create a routine
508
+ * Creates a new routine and attaches it to the specified agent. Routines define
509
+ * how an agent responds to events or a cron schedule; the `handler_type` controls
510
+ * which execution model is used.
511
+ * The routine is created in `"draft"` status by default. To start processing
512
+ * events immediately, either pass `status: "active"` or call the activate
513
+ * endpoint after creation. Scheduled routines must run no more frequently than
514
+ * once per hour. Requires app scope.
515
+ * @param agent - Agent ID (`agt_...`) that this routine will be attached to.
516
+ * @param input - Request body.
517
+ * @param input.acl - Access control list governing who can read or manage this routine.
518
+ * @param input.config - Workflow config ID (`cfg_...`). Required when `handler_type` is `"workflow_graph"`.
519
+ * @param input.description - Optional human-readable description of what this routine does.
520
+ * @param input.event_config - Mapping of event types to trigger configuration. Each key is an event type string; each value is an object with a `"filters"` map and an optional `"dedupe_key_path"` (a JSON path used to deduplicate events, e.g. `"$.thread.id"`).
521
+ * @param input.event_type - Event type that triggers this routine. Deprecated — use `event_config` instead.
522
+ * @param input.handler_type - Execution model for this routine. One of `"workflow_graph"`, `"script"`, `"preset"`, or `"chain"`.
523
+ * @param input.lookup_key - Stable, unique key you assign to this routine for deterministic lookup. Must be unique within the app.
524
+ * @param input.metadata - Arbitrary key-value metadata you can attach to the routine. Not interpreted by the platform.
525
+ * @param input.name - Human-readable display name for the routine.
526
+ * @param input.preset_config - Configuration passed to the preset at runtime. Used when `handler_type` is `"preset"`.
527
+ * @param input.preset_name - Name of the registered preset to use. Required when `handler_type` is `"preset"`.
528
+ * @param input.schedule - Cron expression for time-triggered routines (e.g. `"0 9 * * 1"`). Must not be more frequent than once per hour.
529
+ * @param input.script - Inline script source. Required when `handler_type` is `"script"`.
530
+ * @param input.status - Initial lifecycle status. One of `"draft"` or `"active"`. Defaults to `"draft"`.
531
+ * @param input.steps - Ordered list of steps for a chain handler. Required when `handler_type` is `"chain"`; must be omitted or empty otherwise. Each step must have exactly one handler body field (`preset_name`, `script`, or `config`) matching that step's `handler_type`.
532
+ * @param input.trigger_context - Context in which the routine is triggered. One of `"chat_session"` or `"event"`. Defaults to `"event"`.
533
+ * @returns The newly created routine.
534
+ */
165
535
  agentRoutines(agent: string, input: {
166
536
  acl?: {
167
537
  add?: {
@@ -221,19 +591,86 @@ export declare class AgentResource {
221
591
  }[] | undefined;
222
592
  trigger_context?: string | undefined;
223
593
  }): Promise<AgentRoutine>;
594
+ /**
595
+ * List working memory entries for an agent
596
+ * Returns a paginated list of working memory entries belonging to the specified
597
+ * agent. Entries are key-value pairs the agent stores for context between
598
+ * interactions. Results are ordered by creation time descending (newest first)
599
+ * and can be filtered with a substring search against the key name.
600
+ * Requires an app-scoped API key. The authenticated caller must have access to
601
+ * the app the agent belongs to. Returns 403 if the key is not app-scoped, and
602
+ * 404 if the agent does not exist within the accessible scope.
603
+ * @param agent - Agent ID (`agt_...`) whose working memory entries to retrieve.
604
+ * @param params - Query parameters.
605
+ * @param params.page - Page number to retrieve, starting at 1. Defaults to 1.
606
+ * @param params.pageSize - Number of entries to return per page. Defaults to 25.
607
+ * @param params.search - Substring filter applied to entry keys (case-insensitive). Omit to return all keys.
608
+ * @returns Paginated list of working memory entries for the agent.
609
+ */
224
610
  agentWorkingMemory(agent: string, params?: {
225
611
  page?: number;
226
612
  pageSize?: number;
227
613
  search?: string;
228
614
  }): Promise<WorkingMemoryEntryListResponse>;
229
615
  /**
230
- * Export agent as AgentTemplate
231
- * Reconstructs an AgentTemplate config from a deployed agent and its sub-resources
232
- * (tools, routines, skills, installations). Returns the template plus all dependent
233
- * config files (scripts, workflows, skills, schemas) with their raw content for a
234
- * fully self-contained export.
616
+ * Export an agent as an AgentTemplate
617
+ * Reconstructs an AgentTemplate config from a deployed agent and all of its
618
+ * sub-resources (tools, routines, skills, installations). Returns the template
619
+ * definition together with every dependent config file (scripts, workflows, skills,
620
+ * schemas) and their raw content, producing a fully self-contained export bundle.
621
+ * Use this endpoint to snapshot an agent's current configuration for backup,
622
+ * migration, or to seed a new Solution template. Pass `remove_identity: true` to
623
+ * strip instance-specific fields (email, phone number) before export.
624
+ * The authenticated caller must own the agent or hold sufficient permissions within
625
+ * its owning org or team. When called under a developer app scope, the caller must
626
+ * hold the app scope for the target app.
627
+ * @param agent - ID (`agi_...`) or `lookup_key` of the agent to export.
628
+ * @param params - Query parameters.
629
+ * @param params.removeIdentity - When `true`, strips instance-unique identity fields (`email`, `phone_number`) from the exported template so it can be reused as a generic blueprint.
630
+ * @returns Export bundle containing the reconstructed AgentTemplate and all dependent config files with their raw content.
631
+ */
632
+ export(agent: string, params?: {
633
+ removeIdentity?: boolean;
634
+ }): Promise<AgentExport>;
635
+ /**
636
+ * Retrieve an agent's health profile
637
+ * Returns an aggregate health profile for the specified agent, including an overall
638
+ * status, a numeric health score, recent activity metrics, and a list of recommended
639
+ * remediation actions.
640
+ * The health check is computed on demand at request time. The `checked_at` timestamp
641
+ * in the response reflects when the evaluation ran. Use this endpoint to surface
642
+ * diagnostics about tool availability, model configuration, and runtime activity in
643
+ * dashboards or monitoring workflows.
644
+ * The authenticated caller must own the agent or hold sufficient permissions within
645
+ * its owning org or team. When called under a developer app scope, the caller must
646
+ * hold the app scope for the target app.
647
+ * @param agent - ID (`agi_...`) or `lookup_key` of the agent to evaluate.
648
+ * @returns Aggregate health profile for the agent, including status, score, activity metrics, and recommended actions.
649
+ */
650
+ health(agent: string): Promise<AgentHealth>;
651
+ /**
652
+ * Search an agent's knowledge base
653
+ * Performs a semantic search over an agent's knowledge base and returns a ranked,
654
+ * `kind`-discriminated list of matching items.
655
+ * Two item kinds may appear in `data`:
656
+ * - `"chunk"` — chunk-level results from the agent's context store. Present for all agents.
657
+ * - `"document"` — document-level results. Present only when the agent has an active
658
+ * `archastro/knowledge` installation.
659
+ * Results from both kinds are scored with Reciprocal Rank Fusion (RRF), normalized to
660
+ * be comparable across kinds, then merged into a single ranked list. On a relevance tie,
661
+ * chunks appear before documents. The total number of results is capped at `max_results`
662
+ * across both kinds.
663
+ * Use `mode` to choose the retrieval strategy: `"hybrid"` (default) combines vector and
664
+ * full-text search; `"vector"` and `"fulltext"` select each strategy independently.
665
+ * @param agent - ID (`agi_...`) or `lookup_key` of the agent whose knowledge base to search.
666
+ * @param input - Request body.
667
+ * @param input.max_results - Maximum total results to return across all kinds. Chunks and documents are ranked together and the list is capped at this value. Defaults to `20`; maximum is `100`.
668
+ * @param input.mode - Retrieval strategy. One of `"hybrid"` (default), `"vector"`, or `"fulltext"`.
669
+ * @param input.query - Natural-language search query used to retrieve relevant knowledge items.
670
+ * @param input.recency_days - When set, restricts results to items indexed within the last N days.
671
+ * @param input.source_types - Array of source-type slugs used to filter chunk results, e.g. `["web", "file"]`. Omit to include all source types.
672
+ * @returns Successful response
235
673
  */
236
- export(agent: string): Promise<AgentExport>;
237
674
  search(agent: string, input: {
238
675
  max_results?: number | undefined;
239
676
  mode?: string | undefined;
@@ -246,11 +683,35 @@ export declare class AgentResource {
246
683
  content_type?: string | undefined;
247
684
  created_at?: string | undefined;
248
685
  id: string;
686
+ kind: "chunk";
249
687
  metadata?: Record<string, unknown> | undefined;
250
688
  raw_content?: Record<string, unknown> | undefined;
251
689
  type?: string | undefined;
690
+ } | {
691
+ id: string;
692
+ kind: "document";
693
+ metadata?: Record<string, unknown> | undefined;
694
+ snippet?: string | undefined;
695
+ title?: string | undefined;
696
+ total_lines?: number | undefined;
697
+ total_size?: number | undefined;
252
698
  }[];
253
699
  }>;
700
+ /**
701
+ * Create a thread for an agent
702
+ * Creates a new thread owned by the specified agent. The thread is scoped to the
703
+ * agent's identity and is immediately available for messaging.
704
+ * The authenticated caller must have access to the agent's parent app. If your
705
+ * API key is scoped to a specific app, pass that app's ID via the `app` parameter.
706
+ * Attempting to create a thread for an agent you cannot access returns 404.
707
+ * By default the platform may send an automatic welcome message into the new
708
+ * thread. Pass `skip_welcome_message: true` to suppress this behavior.
709
+ * @param agent - Agent ID (`agt_...`). The thread will be owned by this agent.
710
+ * @param input - Request body.
711
+ * @param input.skip_welcome_message - When `true`, suppresses the automatic welcome message that the platform sends when a new thread is created. Defaults to `false`.
712
+ * @param input.thread - Attributes for the new thread.
713
+ * @returns The newly created thread.
714
+ */
254
715
  threads(agent: string, input: {
255
716
  skip_welcome_message?: boolean | undefined;
256
717
  thread: {
@@ -258,10 +719,57 @@ export declare class AgentResource {
258
719
  is_unlisted?: boolean | undefined;
259
720
  key?: string | undefined;
260
721
  metadata?: Record<string, unknown> | undefined;
722
+ muted?: boolean | undefined;
261
723
  org?: string | undefined;
262
724
  settings?: Record<string, unknown> | undefined;
263
725
  title?: string | undefined;
264
726
  };
265
727
  }): Promise<Thread>;
728
+ /**
729
+ * Upgrade an agent from an AgentTemplate
730
+ * Upgrades an existing agent by reconciling it against an AgentTemplate from a
731
+ * Solution. Supports two modes:
732
+ * - `"reapply"` (default) — re-applies the agent's currently tracked template,
733
+ * picking up any changes the template author has made since the last apply.
734
+ * - `"replace"` — moves the agent to a different template. `template` is required
735
+ * in this mode.
736
+ * Set `dry_run: true` to compute and return the full upgrade diff (adds, updates,
737
+ * removes, noops) without writing any changes. The response includes a
738
+ * `review_fingerprint` you can pass back via `expected_review_fingerprint` on the
739
+ * live apply to guard against the diff changing between review and execution.
740
+ * Safe overrides (`name`, `email`, `phone_number`, `metadata`, `identity`,
741
+ * `originator`, `model`) let you pin instance-specific values that should not be
742
+ * overwritten by the template during the upgrade.
743
+ * The authenticated caller must own the agent or hold write permissions within its
744
+ * owning org or team. When called under a developer app scope, the caller must hold
745
+ * the app scope for the target app.
746
+ * @param agent - ID (`agi_...`) or `lookup_key` of the agent to upgrade.
747
+ * @param input - Request body.
748
+ * @param input.dry_run - When `true`, computes and returns the full upgrade diff without persisting any changes. Use with `expected_review_fingerprint` to guard the live apply.
749
+ * @param input.email - Instance-specific email address override. Pins this value so the template upgrade does not overwrite it.
750
+ * @param input.expected_review_fingerprint - Stale-review guard. Pass the `review_fingerprint` returned by a prior `dry_run` response to ensure the diff has not changed between review and live apply. Returns an error if the fingerprint no longer matches.
751
+ * @param input.identity - Instance-specific identity system-prompt override. Pins this value so the template upgrade does not overwrite it.
752
+ * @param input.metadata - Instance-specific metadata override. Pins this value so the template upgrade does not overwrite it.
753
+ * @param input.mode - Upgrade mode. `"reapply"` (default) refreshes the agent's tracked template; `"replace"` moves the agent to a different template (requires `template`).
754
+ * @param input.model - Instance-specific default model override. Pins this value so the template upgrade does not overwrite it. Pass an empty string to clear the model.
755
+ * @param input.name - Instance-specific name override. Pins this value so the template upgrade does not overwrite it.
756
+ * @param input.originator - Instance-specific originator label override. Pins this value so the template upgrade does not overwrite it.
757
+ * @param input.phone_number - Instance-specific phone number override in E.164 format. Pins this value so the template upgrade does not overwrite it.
758
+ * @param input.template - ID (`cfg_...`) or `lookup_key` of the target AgentTemplate config. Optional in `"reapply"` mode; required in `"replace"` mode.
759
+ * @returns The upgrade outcome, including the updated agent, the source Solution and template summaries, and the full diff (`upgrade_result`) with status, dry-run flag, aggregate counts, and a per-resource change list. When `dry_run` is `true`, `agent` is `null` and no changes are persisted.
760
+ */
761
+ upgrade(agent: string, input: {
762
+ dry_run?: boolean | undefined;
763
+ email?: string | undefined;
764
+ expected_review_fingerprint?: string | undefined;
765
+ identity?: string | undefined;
766
+ metadata?: Record<string, unknown> | undefined;
767
+ mode?: "reapply" | "replace" | undefined;
768
+ model?: string | undefined;
769
+ name?: string | undefined;
770
+ originator?: string | undefined;
771
+ phone_number?: string | undefined;
772
+ template?: string | undefined;
773
+ }): Promise<AgentUpgradeResponse>;
266
774
  }
267
775
  //# sourceMappingURL=agents.d.ts.map