@archastro/sdk 0.5.2 → 0.6.0

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