archastro.platform.v1.resources.agent_tools

  1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License.
  2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
  3# Content hash: 6a731ed08220
  4
  5from __future__ import annotations
  6
  7import builtins
  8from typing import Any, TypedDict
  9
 10from ...runtime.http_client import HttpClient, SyncHttpClient
 11from ...types.common import AgentTool, AgentToolListResponse, BuiltinToolCatalogEntry
 12
 13AgentToolUpdateInput = TypedDict(
 14    "AgentToolUpdateInput",
 15    {
 16        "async": bool | None,
 17        "builtin_tool_config": dict[str, Any] | None,
 18        "config": str | None,
 19        "description": str | None,
 20        "handler_type": str | None,
 21        "instruction": str | None,
 22        "lookup_key": str | None,
 23        "metadata": dict[str, Any] | None,
 24        "name": str | None,  # Display name for the tool. Applies to `"custom"` tools.
 25        "name_prefix": str | None,
 26        "parameters": dict[str, Any] | None,
 27        "parameters_config": str | None,
 28        "template": str | None,
 29    },
 30    total=False,
 31)
 32"""
 33Update an agent tool
 34
 35Attributes:
 36    async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
 37    builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
 38    config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
 39    description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
 40    handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
 41    instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
 42    lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
 43    metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
 44    name: Display name for the tool. Applies to `"custom"` tools.
 45    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.
 46    parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
 47    parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
 48    template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
 49"""
 50
 51
 52class AsyncAgentToolResource:
 53    def __init__(self, http: HttpClient):
 54        self._http = http
 55
 56    async def list(
 57        self, *, agent: builtins.list[str] | None = None, kind: str | None = None
 58    ) -> AgentToolListResponse:
 59        """
 60        List agent tools
 61        Returns all tools for the authenticated app, optionally filtered by agent
 62        or tool kind. Both explicitly created tools and tools derived from connected
 63        integrations (installation-sourced tools) are included in the response.
 64        Installation-sourced tools appear with `source: "installation"` and
 65        `status: "active"`. They are synthesized at request time from connected
 66        integrations and do not have a persistent tool ID of the `atl_...` form;
 67        their `id` is a composite of the installation ID and server tool type.
 68        Use the `agent` filter to retrieve tools for a specific agent. Supplying an
 69        `agent` ID that does not belong to the authenticated app returns 404.
 70        Requires app scope.
 71
 72        Args:
 73            agent: Filter results to tools belonging to these agents (`agi_...`). Omit to return tools across all agents in the app. Multiple values are OR'd.
 74            kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
 75
 76        Returns:
 77            List of tools matching the supplied filters.
 78        """
 79        query: dict[str, object] = {}
 80        if agent is not None:
 81            query["agent"] = agent
 82        if kind is not None:
 83            query["kind"] = kind
 84        return await self._http.request(
 85            "/api/v1/agent_tools",
 86            query=query,
 87            response_type=AgentToolListResponse,
 88        )
 89
 90    async def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]:
 91        """
 92        List built-in tool categories
 93        Returns the full catalog of built-in tool categories available on the platform.
 94        Each entry describes a tool type that can be added to an agent, including its
 95        key, display label, configuration schema, and the individual tools it exposes
 96        to the LLM.
 97        The catalog is global it is not filtered by app or agent. Use the `key` from
 98        each entry as the `builtin_tool_key` when creating a built-in tool. Entries
 99        whose `requires_integration` is `true` require a connected integration before
100        the tool can be activated on an agent.
101        Requires app scope.
102
103        Returns:
104            Array of built-in tool catalog entries, one per registered tool category.
105        """
106        return await self._http.request(
107            "/api/v1/agent_tools/catalog",
108            response_type=list[BuiltinToolCatalogEntry],
109        )
110
111    async def delete(self, tool: str) -> None:
112        """
113        Delete an agent tool
114        Permanently removes a tool from the agent. This action cannot be undone.
115        Both `"draft"` and `"active"` tools can be deleted. If you only want to
116        stop the agent from using a tool without removing it, use the deactivate
117        endpoint instead.
118        Requires app scope. The authenticated caller must own the tool's parent agent.
119
120        Args:
121            tool: Tool ID (`atl_...`) of the tool to delete.
122
123        Returns:
124            Empty response. Returns HTTP 204 on success.
125        """
126        await self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE")
127
128    async def get(self, tool: str) -> AgentTool:
129        """
130        Retrieve an agent tool
131        Returns the tool identified by `tool`. The tool must belong to an agent
132        owned by the authenticated app.
133        Use this endpoint to inspect a tool's current configuration, status, and
134        metadata. To retrieve all tools for an agent or app, use the list endpoint.
135        Requires app scope.
136
137        Args:
138            tool: Tool ID (`atl_...`) of the tool to retrieve.
139
140        Returns:
141            The requested tool.
142        """
143        return await self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool)
144
145    async def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool:
146        """
147        Update an agent tool
148        Updates the configuration of an existing tool. All parameters are optional;
149        supply only the fields you want to change. Unspecified fields are left as-is.
150        You can update both `"draft"` and `"active"` tools. Updating an active tool
151        takes effect on the next agent run; any run already in progress continues
152        with the configuration it loaded at start.
153        Supplying `template` re-resolves the referenced AgentToolTemplate and patches
154        the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent
155        association. Any other params you supply alongside `template` override the
156        template defaults.
157        Requires app scope. The authenticated caller must own the tool's parent agent.
158
159        Args:
160            tool: Tool ID (`atl_...`) of the tool to update.
161            input: Request body.
162            input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
163            input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
164            input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
165            input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
166            input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
167            input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
168            input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
169            input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
170            input.name: Display name for the tool. Applies to `"custom"` tools.
171            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.
172            input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
173            input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
174            input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
175
176        Returns:
177            The updated tool.
178        """
179        return await self._http.request(
180            f"/api/v1/agent_tools/{tool}",
181            method="PATCH",
182            body=input,
183            response_type=AgentTool,
184        )
185
186    async def activate(self, tool: str) -> AgentTool:
187        """
188        Activate an agent tool
189        Transitions a tool from `"draft"` status to `"active"`, making it available
190        for the agent to use during runs. Only tools in `"draft"` status can be
191        activated; calling this on an already-active tool is a no-op that returns the
192        current tool state.
193        Activation validates that all required configuration is present. For built-in
194        tools, this means the `builtin_tool_key` must resolve to a registered tool
195        type and any required integration must be connected. Returns 422 if
196        prerequisite checks fail.
197        Requires app scope. The authenticated caller must own the tool's parent agent.
198
199        Args:
200            tool: Tool ID (`atl_...`) of the tool to activate.
201
202        Returns:
203            The updated tool with `status: "active"`.
204        """
205        return await self._http.request(
206            f"/api/v1/agent_tools/{tool}/activate",
207            method="POST",
208            response_type=AgentTool,
209        )
210
211    async def deactivate(self, tool: str) -> AgentTool:
212        """
213        Deactivate an agent tool
214        Transitions a tool from `"active"` status back to `"draft"`, removing it
215        from the set of tools the agent can use during future runs. Calling this on a
216        tool that is already in `"draft"` status is a no-op that returns the current
217        tool state.
218        Deactivation does not delete the tool or its configuration. To remove the
219        tool permanently, use the delete endpoint.
220        Requires app scope. The authenticated caller must own the tool's parent agent.
221
222        Args:
223            tool: Tool ID (`atl_...`) of the tool to deactivate.
224
225        Returns:
226            The updated tool with `status: "draft"`.
227        """
228        return await self._http.request(
229            f"/api/v1/agent_tools/{tool}/deactivate",
230            method="POST",
231            response_type=AgentTool,
232        )
233
234
235class AgentToolResource:
236    def __init__(self, http: SyncHttpClient):
237        self._http = http
238
239    def list(
240        self, *, agent: builtins.list[str] | None = None, kind: str | None = None
241    ) -> AgentToolListResponse:
242        """
243        List agent tools
244        Returns all tools for the authenticated app, optionally filtered by agent
245        or tool kind. Both explicitly created tools and tools derived from connected
246        integrations (installation-sourced tools) are included in the response.
247        Installation-sourced tools appear with `source: "installation"` and
248        `status: "active"`. They are synthesized at request time from connected
249        integrations and do not have a persistent tool ID of the `atl_...` form;
250        their `id` is a composite of the installation ID and server tool type.
251        Use the `agent` filter to retrieve tools for a specific agent. Supplying an
252        `agent` ID that does not belong to the authenticated app returns 404.
253        Requires app scope.
254
255        Args:
256            agent: Filter results to tools belonging to these agents (`agi_...`). Omit to return tools across all agents in the app. Multiple values are OR'd.
257            kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
258
259        Returns:
260            List of tools matching the supplied filters.
261        """
262        query: dict[str, object] = {}
263        if agent is not None:
264            query["agent"] = agent
265        if kind is not None:
266            query["kind"] = kind
267        return self._http.request(
268            "/api/v1/agent_tools",
269            query=query,
270            response_type=AgentToolListResponse,
271        )
272
273    def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]:
274        """
275        List built-in tool categories
276        Returns the full catalog of built-in tool categories available on the platform.
277        Each entry describes a tool type that can be added to an agent, including its
278        key, display label, configuration schema, and the individual tools it exposes
279        to the LLM.
280        The catalog is global it is not filtered by app or agent. Use the `key` from
281        each entry as the `builtin_tool_key` when creating a built-in tool. Entries
282        whose `requires_integration` is `true` require a connected integration before
283        the tool can be activated on an agent.
284        Requires app scope.
285
286        Returns:
287            Array of built-in tool catalog entries, one per registered tool category.
288        """
289        return self._http.request(
290            "/api/v1/agent_tools/catalog",
291            response_type=list[BuiltinToolCatalogEntry],
292        )
293
294    def delete(self, tool: str) -> None:
295        """
296        Delete an agent tool
297        Permanently removes a tool from the agent. This action cannot be undone.
298        Both `"draft"` and `"active"` tools can be deleted. If you only want to
299        stop the agent from using a tool without removing it, use the deactivate
300        endpoint instead.
301        Requires app scope. The authenticated caller must own the tool's parent agent.
302
303        Args:
304            tool: Tool ID (`atl_...`) of the tool to delete.
305
306        Returns:
307            Empty response. Returns HTTP 204 on success.
308        """
309        self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE")
310
311    def get(self, tool: str) -> AgentTool:
312        """
313        Retrieve an agent tool
314        Returns the tool identified by `tool`. The tool must belong to an agent
315        owned by the authenticated app.
316        Use this endpoint to inspect a tool's current configuration, status, and
317        metadata. To retrieve all tools for an agent or app, use the list endpoint.
318        Requires app scope.
319
320        Args:
321            tool: Tool ID (`atl_...`) of the tool to retrieve.
322
323        Returns:
324            The requested tool.
325        """
326        return self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool)
327
328    def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool:
329        """
330        Update an agent tool
331        Updates the configuration of an existing tool. All parameters are optional;
332        supply only the fields you want to change. Unspecified fields are left as-is.
333        You can update both `"draft"` and `"active"` tools. Updating an active tool
334        takes effect on the next agent run; any run already in progress continues
335        with the configuration it loaded at start.
336        Supplying `template` re-resolves the referenced AgentToolTemplate and patches
337        the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent
338        association. Any other params you supply alongside `template` override the
339        template defaults.
340        Requires app scope. The authenticated caller must own the tool's parent agent.
341
342        Args:
343            tool: Tool ID (`atl_...`) of the tool to update.
344            input: Request body.
345            input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
346            input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
347            input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
348            input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
349            input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
350            input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
351            input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
352            input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
353            input.name: Display name for the tool. Applies to `"custom"` tools.
354            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.
355            input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
356            input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
357            input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
358
359        Returns:
360            The updated tool.
361        """
362        return self._http.request(
363            f"/api/v1/agent_tools/{tool}",
364            method="PATCH",
365            body=input,
366            response_type=AgentTool,
367        )
368
369    def activate(self, tool: str) -> AgentTool:
370        """
371        Activate an agent tool
372        Transitions a tool from `"draft"` status to `"active"`, making it available
373        for the agent to use during runs. Only tools in `"draft"` status can be
374        activated; calling this on an already-active tool is a no-op that returns the
375        current tool state.
376        Activation validates that all required configuration is present. For built-in
377        tools, this means the `builtin_tool_key` must resolve to a registered tool
378        type and any required integration must be connected. Returns 422 if
379        prerequisite checks fail.
380        Requires app scope. The authenticated caller must own the tool's parent agent.
381
382        Args:
383            tool: Tool ID (`atl_...`) of the tool to activate.
384
385        Returns:
386            The updated tool with `status: "active"`.
387        """
388        return self._http.request(
389            f"/api/v1/agent_tools/{tool}/activate",
390            method="POST",
391            response_type=AgentTool,
392        )
393
394    def deactivate(self, tool: str) -> AgentTool:
395        """
396        Deactivate an agent tool
397        Transitions a tool from `"active"` status back to `"draft"`, removing it
398        from the set of tools the agent can use during future runs. Calling this on a
399        tool that is already in `"draft"` status is a no-op that returns the current
400        tool state.
401        Deactivation does not delete the tool or its configuration. To remove the
402        tool permanently, use the delete endpoint.
403        Requires app scope. The authenticated caller must own the tool's parent agent.
404
405        Args:
406            tool: Tool ID (`atl_...`) of the tool to deactivate.
407
408        Returns:
409            The updated tool with `status: "draft"`.
410        """
411        return self._http.request(
412            f"/api/v1/agent_tools/{tool}/deactivate",
413            method="POST",
414            response_type=AgentTool,
415        )
class AgentToolUpdateInput(typing.TypedDict):

Update an agent tool

Attributes:
  • async: When true, the tool executes asynchronously and the agent does not block waiting for a result. Applies to "custom" tools.
  • builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's config_schema for the tool's builtin_tool_key. Applies to "builtin" tools.
  • config: Config ID (cfg_...) referencing the script or workflow graph that implements the tool handler. Applies to "custom" tools.
  • description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to "custom" tools.
  • handler_type: Execution handler for the tool. One of "script" or "workflow_graph". Applies to "custom" tools.
  • instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's description.
  • lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
  • metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
  • name: Display name for the tool. Applies to "custom" tools.
  • 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.
  • parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
  • parameters_config: Config ID (cfg_...) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline parameters value.
  • template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its status, lookup_key, kind, and agent association. Other params you supply alongside template override the template defaults.
async: bool | None
builtin_tool_config: dict[str, typing.Any] | None
config: str | None
description: str | None
handler_type: str | None
instruction: str | None
lookup_key: str | None
metadata: dict[str, typing.Any] | None
name: str | None
name_prefix: str | None
parameters: dict[str, typing.Any] | None
parameters_config: str | None
template: str | None
class AsyncAgentToolResource:
 53class AsyncAgentToolResource:
 54    def __init__(self, http: HttpClient):
 55        self._http = http
 56
 57    async def list(
 58        self, *, agent: builtins.list[str] | None = None, kind: str | None = None
 59    ) -> AgentToolListResponse:
 60        """
 61        List agent tools
 62        Returns all tools for the authenticated app, optionally filtered by agent
 63        or tool kind. Both explicitly created tools and tools derived from connected
 64        integrations (installation-sourced tools) are included in the response.
 65        Installation-sourced tools appear with `source: "installation"` and
 66        `status: "active"`. They are synthesized at request time from connected
 67        integrations and do not have a persistent tool ID of the `atl_...` form;
 68        their `id` is a composite of the installation ID and server tool type.
 69        Use the `agent` filter to retrieve tools for a specific agent. Supplying an
 70        `agent` ID that does not belong to the authenticated app returns 404.
 71        Requires app scope.
 72
 73        Args:
 74            agent: Filter results to tools belonging to these agents (`agi_...`). Omit to return tools across all agents in the app. Multiple values are OR'd.
 75            kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
 76
 77        Returns:
 78            List of tools matching the supplied filters.
 79        """
 80        query: dict[str, object] = {}
 81        if agent is not None:
 82            query["agent"] = agent
 83        if kind is not None:
 84            query["kind"] = kind
 85        return await self._http.request(
 86            "/api/v1/agent_tools",
 87            query=query,
 88            response_type=AgentToolListResponse,
 89        )
 90
 91    async def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]:
 92        """
 93        List built-in tool categories
 94        Returns the full catalog of built-in tool categories available on the platform.
 95        Each entry describes a tool type that can be added to an agent, including its
 96        key, display label, configuration schema, and the individual tools it exposes
 97        to the LLM.
 98        The catalog is global it is not filtered by app or agent. Use the `key` from
 99        each entry as the `builtin_tool_key` when creating a built-in tool. Entries
100        whose `requires_integration` is `true` require a connected integration before
101        the tool can be activated on an agent.
102        Requires app scope.
103
104        Returns:
105            Array of built-in tool catalog entries, one per registered tool category.
106        """
107        return await self._http.request(
108            "/api/v1/agent_tools/catalog",
109            response_type=list[BuiltinToolCatalogEntry],
110        )
111
112    async def delete(self, tool: str) -> None:
113        """
114        Delete an agent tool
115        Permanently removes a tool from the agent. This action cannot be undone.
116        Both `"draft"` and `"active"` tools can be deleted. If you only want to
117        stop the agent from using a tool without removing it, use the deactivate
118        endpoint instead.
119        Requires app scope. The authenticated caller must own the tool's parent agent.
120
121        Args:
122            tool: Tool ID (`atl_...`) of the tool to delete.
123
124        Returns:
125            Empty response. Returns HTTP 204 on success.
126        """
127        await self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE")
128
129    async def get(self, tool: str) -> AgentTool:
130        """
131        Retrieve an agent tool
132        Returns the tool identified by `tool`. The tool must belong to an agent
133        owned by the authenticated app.
134        Use this endpoint to inspect a tool's current configuration, status, and
135        metadata. To retrieve all tools for an agent or app, use the list endpoint.
136        Requires app scope.
137
138        Args:
139            tool: Tool ID (`atl_...`) of the tool to retrieve.
140
141        Returns:
142            The requested tool.
143        """
144        return await self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool)
145
146    async def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool:
147        """
148        Update an agent tool
149        Updates the configuration of an existing tool. All parameters are optional;
150        supply only the fields you want to change. Unspecified fields are left as-is.
151        You can update both `"draft"` and `"active"` tools. Updating an active tool
152        takes effect on the next agent run; any run already in progress continues
153        with the configuration it loaded at start.
154        Supplying `template` re-resolves the referenced AgentToolTemplate and patches
155        the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent
156        association. Any other params you supply alongside `template` override the
157        template defaults.
158        Requires app scope. The authenticated caller must own the tool's parent agent.
159
160        Args:
161            tool: Tool ID (`atl_...`) of the tool to update.
162            input: Request body.
163            input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
164            input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
165            input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
166            input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
167            input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
168            input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
169            input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
170            input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
171            input.name: Display name for the tool. Applies to `"custom"` tools.
172            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.
173            input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
174            input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
175            input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
176
177        Returns:
178            The updated tool.
179        """
180        return await self._http.request(
181            f"/api/v1/agent_tools/{tool}",
182            method="PATCH",
183            body=input,
184            response_type=AgentTool,
185        )
186
187    async def activate(self, tool: str) -> AgentTool:
188        """
189        Activate an agent tool
190        Transitions a tool from `"draft"` status to `"active"`, making it available
191        for the agent to use during runs. Only tools in `"draft"` status can be
192        activated; calling this on an already-active tool is a no-op that returns the
193        current tool state.
194        Activation validates that all required configuration is present. For built-in
195        tools, this means the `builtin_tool_key` must resolve to a registered tool
196        type and any required integration must be connected. Returns 422 if
197        prerequisite checks fail.
198        Requires app scope. The authenticated caller must own the tool's parent agent.
199
200        Args:
201            tool: Tool ID (`atl_...`) of the tool to activate.
202
203        Returns:
204            The updated tool with `status: "active"`.
205        """
206        return await self._http.request(
207            f"/api/v1/agent_tools/{tool}/activate",
208            method="POST",
209            response_type=AgentTool,
210        )
211
212    async def deactivate(self, tool: str) -> AgentTool:
213        """
214        Deactivate an agent tool
215        Transitions a tool from `"active"` status back to `"draft"`, removing it
216        from the set of tools the agent can use during future runs. Calling this on a
217        tool that is already in `"draft"` status is a no-op that returns the current
218        tool state.
219        Deactivation does not delete the tool or its configuration. To remove the
220        tool permanently, use the delete endpoint.
221        Requires app scope. The authenticated caller must own the tool's parent agent.
222
223        Args:
224            tool: Tool ID (`atl_...`) of the tool to deactivate.
225
226        Returns:
227            The updated tool with `status: "draft"`.
228        """
229        return await self._http.request(
230            f"/api/v1/agent_tools/{tool}/deactivate",
231            method="POST",
232            response_type=AgentTool,
233        )
AsyncAgentToolResource(http: archastro.platform.runtime.http_client.HttpClient)
54    def __init__(self, http: HttpClient):
55        self._http = http
async def list( self, *, agent: list[str] | None = None, kind: str | None = None) -> archastro.platform.types.common.AgentToolListResponse:
57    async def list(
58        self, *, agent: builtins.list[str] | None = None, kind: str | None = None
59    ) -> AgentToolListResponse:
60        """
61        List agent tools
62        Returns all tools for the authenticated app, optionally filtered by agent
63        or tool kind. Both explicitly created tools and tools derived from connected
64        integrations (installation-sourced tools) are included in the response.
65        Installation-sourced tools appear with `source: "installation"` and
66        `status: "active"`. They are synthesized at request time from connected
67        integrations and do not have a persistent tool ID of the `atl_...` form;
68        their `id` is a composite of the installation ID and server tool type.
69        Use the `agent` filter to retrieve tools for a specific agent. Supplying an
70        `agent` ID that does not belong to the authenticated app returns 404.
71        Requires app scope.
72
73        Args:
74            agent: Filter results to tools belonging to these agents (`agi_...`). Omit to return tools across all agents in the app. Multiple values are OR'd.
75            kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
76
77        Returns:
78            List of tools matching the supplied filters.
79        """
80        query: dict[str, object] = {}
81        if agent is not None:
82            query["agent"] = agent
83        if kind is not None:
84            query["kind"] = kind
85        return await self._http.request(
86            "/api/v1/agent_tools",
87            query=query,
88            response_type=AgentToolListResponse,
89        )

List agent tools Returns all tools for the authenticated app, optionally filtered by agent or tool kind. Both explicitly created tools and tools derived from connected integrations (installation-sourced tools) are included in the response. Installation-sourced tools appear with source: "installation" and status: "active". They are synthesized at request time from connected integrations and do not have a persistent tool ID of the atl_... form; their id is a composite of the installation ID and server tool type. Use the agent filter to retrieve tools for a specific agent. Supplying an agent ID that does not belong to the authenticated app returns 404. Requires app scope.

Arguments:
  • agent: Filter results to tools belonging to these agents (agi_...). Omit to return tools across all agents in the app. Multiple values are OR'd.
  • kind: Filter by tool kind. One of "builtin" or "custom". Omit to return tools of all kinds.
Returns:

List of tools matching the supplied filters.

async def catalog(self) -> list[archastro.platform.types.common.BuiltinToolCatalogEntry]:
 91    async def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]:
 92        """
 93        List built-in tool categories
 94        Returns the full catalog of built-in tool categories available on the platform.
 95        Each entry describes a tool type that can be added to an agent, including its
 96        key, display label, configuration schema, and the individual tools it exposes
 97        to the LLM.
 98        The catalog is global it is not filtered by app or agent. Use the `key` from
 99        each entry as the `builtin_tool_key` when creating a built-in tool. Entries
100        whose `requires_integration` is `true` require a connected integration before
101        the tool can be activated on an agent.
102        Requires app scope.
103
104        Returns:
105            Array of built-in tool catalog entries, one per registered tool category.
106        """
107        return await self._http.request(
108            "/api/v1/agent_tools/catalog",
109            response_type=list[BuiltinToolCatalogEntry],
110        )

List built-in tool categories Returns the full catalog of built-in tool categories available on the platform. Each entry describes a tool type that can be added to an agent, including its key, display label, configuration schema, and the individual tools it exposes to the LLM. The catalog is global it is not filtered by app or agent. Use the key from each entry as the builtin_tool_key when creating a built-in tool. Entries whose requires_integration is true require a connected integration before the tool can be activated on an agent. Requires app scope.

Returns:

Array of built-in tool catalog entries, one per registered tool category.

async def delete(self, tool: str) -> None:
112    async def delete(self, tool: str) -> None:
113        """
114        Delete an agent tool
115        Permanently removes a tool from the agent. This action cannot be undone.
116        Both `"draft"` and `"active"` tools can be deleted. If you only want to
117        stop the agent from using a tool without removing it, use the deactivate
118        endpoint instead.
119        Requires app scope. The authenticated caller must own the tool's parent agent.
120
121        Args:
122            tool: Tool ID (`atl_...`) of the tool to delete.
123
124        Returns:
125            Empty response. Returns HTTP 204 on success.
126        """
127        await self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE")

Delete an agent tool Permanently removes a tool from the agent. This action cannot be undone. Both "draft" and "active" tools can be deleted. If you only want to stop the agent from using a tool without removing it, use the deactivate endpoint instead. Requires app scope. The authenticated caller must own the tool's parent agent.

Arguments:
  • tool: Tool ID (atl_...) of the tool to delete.
Returns:

Empty response. Returns HTTP 204 on success.

async def get(self, tool: str) -> archastro.platform.types.common.AgentTool:
129    async def get(self, tool: str) -> AgentTool:
130        """
131        Retrieve an agent tool
132        Returns the tool identified by `tool`. The tool must belong to an agent
133        owned by the authenticated app.
134        Use this endpoint to inspect a tool's current configuration, status, and
135        metadata. To retrieve all tools for an agent or app, use the list endpoint.
136        Requires app scope.
137
138        Args:
139            tool: Tool ID (`atl_...`) of the tool to retrieve.
140
141        Returns:
142            The requested tool.
143        """
144        return await self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool)

Retrieve an agent tool Returns the tool identified by tool. The tool must belong to an agent owned by the authenticated app. Use this endpoint to inspect a tool's current configuration, status, and metadata. To retrieve all tools for an agent or app, use the list endpoint. Requires app scope.

Arguments:
  • tool: Tool ID (atl_...) of the tool to retrieve.
Returns:

The requested tool.

async def update( self, tool: str, input: AgentToolUpdateInput) -> archastro.platform.types.common.AgentTool:
146    async def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool:
147        """
148        Update an agent tool
149        Updates the configuration of an existing tool. All parameters are optional;
150        supply only the fields you want to change. Unspecified fields are left as-is.
151        You can update both `"draft"` and `"active"` tools. Updating an active tool
152        takes effect on the next agent run; any run already in progress continues
153        with the configuration it loaded at start.
154        Supplying `template` re-resolves the referenced AgentToolTemplate and patches
155        the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent
156        association. Any other params you supply alongside `template` override the
157        template defaults.
158        Requires app scope. The authenticated caller must own the tool's parent agent.
159
160        Args:
161            tool: Tool ID (`atl_...`) of the tool to update.
162            input: Request body.
163            input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
164            input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
165            input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
166            input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
167            input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
168            input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
169            input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
170            input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
171            input.name: Display name for the tool. Applies to `"custom"` tools.
172            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.
173            input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
174            input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
175            input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
176
177        Returns:
178            The updated tool.
179        """
180        return await self._http.request(
181            f"/api/v1/agent_tools/{tool}",
182            method="PATCH",
183            body=input,
184            response_type=AgentTool,
185        )

Update an agent tool Updates the configuration of an existing tool. All parameters are optional; supply only the fields you want to change. Unspecified fields are left as-is. You can update both "draft" and "active" tools. Updating an active tool takes effect on the next agent run; any run already in progress continues with the configuration it loaded at start. Supplying template re-resolves the referenced AgentToolTemplate and patches the tool in place, preserving its status, lookup_key, kind, and agent association. Any other params you supply alongside template override the template defaults. Requires app scope. The authenticated caller must own the tool's parent agent.

Arguments:
  • tool: Tool ID (atl_...) of the tool to update.
  • input: Request body.
  • input.async: When true, the tool executes asynchronously and the agent does not block waiting for a result. Applies to "custom" tools.
  • input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's config_schema for the tool's builtin_tool_key. Applies to "builtin" tools.
  • input.config: Config ID (cfg_...) referencing the script or workflow graph that implements the tool handler. Applies to "custom" tools.
  • input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to "custom" tools.
  • input.handler_type: Execution handler for the tool. One of "script" or "workflow_graph". Applies to "custom" tools.
  • input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's description.
  • input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
  • input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
  • input.name: Display name for the tool. Applies to "custom" tools.
  • 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.
  • input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
  • input.parameters_config: Config ID (cfg_...) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline parameters value.
  • input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its status, lookup_key, kind, and agent association. Other params you supply alongside template override the template defaults.
Returns:

The updated tool.

async def activate(self, tool: str) -> archastro.platform.types.common.AgentTool:
187    async def activate(self, tool: str) -> AgentTool:
188        """
189        Activate an agent tool
190        Transitions a tool from `"draft"` status to `"active"`, making it available
191        for the agent to use during runs. Only tools in `"draft"` status can be
192        activated; calling this on an already-active tool is a no-op that returns the
193        current tool state.
194        Activation validates that all required configuration is present. For built-in
195        tools, this means the `builtin_tool_key` must resolve to a registered tool
196        type and any required integration must be connected. Returns 422 if
197        prerequisite checks fail.
198        Requires app scope. The authenticated caller must own the tool's parent agent.
199
200        Args:
201            tool: Tool ID (`atl_...`) of the tool to activate.
202
203        Returns:
204            The updated tool with `status: "active"`.
205        """
206        return await self._http.request(
207            f"/api/v1/agent_tools/{tool}/activate",
208            method="POST",
209            response_type=AgentTool,
210        )

Activate an agent tool Transitions a tool from "draft" status to "active", making it available for the agent to use during runs. Only tools in "draft" status can be activated; calling this on an already-active tool is a no-op that returns the current tool state. Activation validates that all required configuration is present. For built-in tools, this means the builtin_tool_key must resolve to a registered tool type and any required integration must be connected. Returns 422 if prerequisite checks fail. Requires app scope. The authenticated caller must own the tool's parent agent.

Arguments:
  • tool: Tool ID (atl_...) of the tool to activate.
Returns:

The updated tool with status: "active".

async def deactivate(self, tool: str) -> archastro.platform.types.common.AgentTool:
212    async def deactivate(self, tool: str) -> AgentTool:
213        """
214        Deactivate an agent tool
215        Transitions a tool from `"active"` status back to `"draft"`, removing it
216        from the set of tools the agent can use during future runs. Calling this on a
217        tool that is already in `"draft"` status is a no-op that returns the current
218        tool state.
219        Deactivation does not delete the tool or its configuration. To remove the
220        tool permanently, use the delete endpoint.
221        Requires app scope. The authenticated caller must own the tool's parent agent.
222
223        Args:
224            tool: Tool ID (`atl_...`) of the tool to deactivate.
225
226        Returns:
227            The updated tool with `status: "draft"`.
228        """
229        return await self._http.request(
230            f"/api/v1/agent_tools/{tool}/deactivate",
231            method="POST",
232            response_type=AgentTool,
233        )

Deactivate an agent tool Transitions a tool from "active" status back to "draft", removing it from the set of tools the agent can use during future runs. Calling this on a tool that is already in "draft" status is a no-op that returns the current tool state. Deactivation does not delete the tool or its configuration. To remove the tool permanently, use the delete endpoint. Requires app scope. The authenticated caller must own the tool's parent agent.

Arguments:
  • tool: Tool ID (atl_...) of the tool to deactivate.
Returns:

The updated tool with status: "draft".

class AgentToolResource:
236class AgentToolResource:
237    def __init__(self, http: SyncHttpClient):
238        self._http = http
239
240    def list(
241        self, *, agent: builtins.list[str] | None = None, kind: str | None = None
242    ) -> AgentToolListResponse:
243        """
244        List agent tools
245        Returns all tools for the authenticated app, optionally filtered by agent
246        or tool kind. Both explicitly created tools and tools derived from connected
247        integrations (installation-sourced tools) are included in the response.
248        Installation-sourced tools appear with `source: "installation"` and
249        `status: "active"`. They are synthesized at request time from connected
250        integrations and do not have a persistent tool ID of the `atl_...` form;
251        their `id` is a composite of the installation ID and server tool type.
252        Use the `agent` filter to retrieve tools for a specific agent. Supplying an
253        `agent` ID that does not belong to the authenticated app returns 404.
254        Requires app scope.
255
256        Args:
257            agent: Filter results to tools belonging to these agents (`agi_...`). Omit to return tools across all agents in the app. Multiple values are OR'd.
258            kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
259
260        Returns:
261            List of tools matching the supplied filters.
262        """
263        query: dict[str, object] = {}
264        if agent is not None:
265            query["agent"] = agent
266        if kind is not None:
267            query["kind"] = kind
268        return self._http.request(
269            "/api/v1/agent_tools",
270            query=query,
271            response_type=AgentToolListResponse,
272        )
273
274    def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]:
275        """
276        List built-in tool categories
277        Returns the full catalog of built-in tool categories available on the platform.
278        Each entry describes a tool type that can be added to an agent, including its
279        key, display label, configuration schema, and the individual tools it exposes
280        to the LLM.
281        The catalog is global it is not filtered by app or agent. Use the `key` from
282        each entry as the `builtin_tool_key` when creating a built-in tool. Entries
283        whose `requires_integration` is `true` require a connected integration before
284        the tool can be activated on an agent.
285        Requires app scope.
286
287        Returns:
288            Array of built-in tool catalog entries, one per registered tool category.
289        """
290        return self._http.request(
291            "/api/v1/agent_tools/catalog",
292            response_type=list[BuiltinToolCatalogEntry],
293        )
294
295    def delete(self, tool: str) -> None:
296        """
297        Delete an agent tool
298        Permanently removes a tool from the agent. This action cannot be undone.
299        Both `"draft"` and `"active"` tools can be deleted. If you only want to
300        stop the agent from using a tool without removing it, use the deactivate
301        endpoint instead.
302        Requires app scope. The authenticated caller must own the tool's parent agent.
303
304        Args:
305            tool: Tool ID (`atl_...`) of the tool to delete.
306
307        Returns:
308            Empty response. Returns HTTP 204 on success.
309        """
310        self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE")
311
312    def get(self, tool: str) -> AgentTool:
313        """
314        Retrieve an agent tool
315        Returns the tool identified by `tool`. The tool must belong to an agent
316        owned by the authenticated app.
317        Use this endpoint to inspect a tool's current configuration, status, and
318        metadata. To retrieve all tools for an agent or app, use the list endpoint.
319        Requires app scope.
320
321        Args:
322            tool: Tool ID (`atl_...`) of the tool to retrieve.
323
324        Returns:
325            The requested tool.
326        """
327        return self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool)
328
329    def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool:
330        """
331        Update an agent tool
332        Updates the configuration of an existing tool. All parameters are optional;
333        supply only the fields you want to change. Unspecified fields are left as-is.
334        You can update both `"draft"` and `"active"` tools. Updating an active tool
335        takes effect on the next agent run; any run already in progress continues
336        with the configuration it loaded at start.
337        Supplying `template` re-resolves the referenced AgentToolTemplate and patches
338        the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent
339        association. Any other params you supply alongside `template` override the
340        template defaults.
341        Requires app scope. The authenticated caller must own the tool's parent agent.
342
343        Args:
344            tool: Tool ID (`atl_...`) of the tool to update.
345            input: Request body.
346            input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
347            input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
348            input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
349            input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
350            input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
351            input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
352            input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
353            input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
354            input.name: Display name for the tool. Applies to `"custom"` tools.
355            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.
356            input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
357            input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
358            input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
359
360        Returns:
361            The updated tool.
362        """
363        return self._http.request(
364            f"/api/v1/agent_tools/{tool}",
365            method="PATCH",
366            body=input,
367            response_type=AgentTool,
368        )
369
370    def activate(self, tool: str) -> AgentTool:
371        """
372        Activate an agent tool
373        Transitions a tool from `"draft"` status to `"active"`, making it available
374        for the agent to use during runs. Only tools in `"draft"` status can be
375        activated; calling this on an already-active tool is a no-op that returns the
376        current tool state.
377        Activation validates that all required configuration is present. For built-in
378        tools, this means the `builtin_tool_key` must resolve to a registered tool
379        type and any required integration must be connected. Returns 422 if
380        prerequisite checks fail.
381        Requires app scope. The authenticated caller must own the tool's parent agent.
382
383        Args:
384            tool: Tool ID (`atl_...`) of the tool to activate.
385
386        Returns:
387            The updated tool with `status: "active"`.
388        """
389        return self._http.request(
390            f"/api/v1/agent_tools/{tool}/activate",
391            method="POST",
392            response_type=AgentTool,
393        )
394
395    def deactivate(self, tool: str) -> AgentTool:
396        """
397        Deactivate an agent tool
398        Transitions a tool from `"active"` status back to `"draft"`, removing it
399        from the set of tools the agent can use during future runs. Calling this on a
400        tool that is already in `"draft"` status is a no-op that returns the current
401        tool state.
402        Deactivation does not delete the tool or its configuration. To remove the
403        tool permanently, use the delete endpoint.
404        Requires app scope. The authenticated caller must own the tool's parent agent.
405
406        Args:
407            tool: Tool ID (`atl_...`) of the tool to deactivate.
408
409        Returns:
410            The updated tool with `status: "draft"`.
411        """
412        return self._http.request(
413            f"/api/v1/agent_tools/{tool}/deactivate",
414            method="POST",
415            response_type=AgentTool,
416        )
AgentToolResource(http: archastro.platform.runtime.http_client.SyncHttpClient)
237    def __init__(self, http: SyncHttpClient):
238        self._http = http
def list( self, *, agent: list[str] | None = None, kind: str | None = None) -> archastro.platform.types.common.AgentToolListResponse:
240    def list(
241        self, *, agent: builtins.list[str] | None = None, kind: str | None = None
242    ) -> AgentToolListResponse:
243        """
244        List agent tools
245        Returns all tools for the authenticated app, optionally filtered by agent
246        or tool kind. Both explicitly created tools and tools derived from connected
247        integrations (installation-sourced tools) are included in the response.
248        Installation-sourced tools appear with `source: "installation"` and
249        `status: "active"`. They are synthesized at request time from connected
250        integrations and do not have a persistent tool ID of the `atl_...` form;
251        their `id` is a composite of the installation ID and server tool type.
252        Use the `agent` filter to retrieve tools for a specific agent. Supplying an
253        `agent` ID that does not belong to the authenticated app returns 404.
254        Requires app scope.
255
256        Args:
257            agent: Filter results to tools belonging to these agents (`agi_...`). Omit to return tools across all agents in the app. Multiple values are OR'd.
258            kind: Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
259
260        Returns:
261            List of tools matching the supplied filters.
262        """
263        query: dict[str, object] = {}
264        if agent is not None:
265            query["agent"] = agent
266        if kind is not None:
267            query["kind"] = kind
268        return self._http.request(
269            "/api/v1/agent_tools",
270            query=query,
271            response_type=AgentToolListResponse,
272        )

List agent tools Returns all tools for the authenticated app, optionally filtered by agent or tool kind. Both explicitly created tools and tools derived from connected integrations (installation-sourced tools) are included in the response. Installation-sourced tools appear with source: "installation" and status: "active". They are synthesized at request time from connected integrations and do not have a persistent tool ID of the atl_... form; their id is a composite of the installation ID and server tool type. Use the agent filter to retrieve tools for a specific agent. Supplying an agent ID that does not belong to the authenticated app returns 404. Requires app scope.

Arguments:
  • agent: Filter results to tools belonging to these agents (agi_...). Omit to return tools across all agents in the app. Multiple values are OR'd.
  • kind: Filter by tool kind. One of "builtin" or "custom". Omit to return tools of all kinds.
Returns:

List of tools matching the supplied filters.

def catalog(self) -> list[archastro.platform.types.common.BuiltinToolCatalogEntry]:
274    def catalog(self) -> builtins.list[BuiltinToolCatalogEntry]:
275        """
276        List built-in tool categories
277        Returns the full catalog of built-in tool categories available on the platform.
278        Each entry describes a tool type that can be added to an agent, including its
279        key, display label, configuration schema, and the individual tools it exposes
280        to the LLM.
281        The catalog is global it is not filtered by app or agent. Use the `key` from
282        each entry as the `builtin_tool_key` when creating a built-in tool. Entries
283        whose `requires_integration` is `true` require a connected integration before
284        the tool can be activated on an agent.
285        Requires app scope.
286
287        Returns:
288            Array of built-in tool catalog entries, one per registered tool category.
289        """
290        return self._http.request(
291            "/api/v1/agent_tools/catalog",
292            response_type=list[BuiltinToolCatalogEntry],
293        )

List built-in tool categories Returns the full catalog of built-in tool categories available on the platform. Each entry describes a tool type that can be added to an agent, including its key, display label, configuration schema, and the individual tools it exposes to the LLM. The catalog is global it is not filtered by app or agent. Use the key from each entry as the builtin_tool_key when creating a built-in tool. Entries whose requires_integration is true require a connected integration before the tool can be activated on an agent. Requires app scope.

Returns:

Array of built-in tool catalog entries, one per registered tool category.

def delete(self, tool: str) -> None:
295    def delete(self, tool: str) -> None:
296        """
297        Delete an agent tool
298        Permanently removes a tool from the agent. This action cannot be undone.
299        Both `"draft"` and `"active"` tools can be deleted. If you only want to
300        stop the agent from using a tool without removing it, use the deactivate
301        endpoint instead.
302        Requires app scope. The authenticated caller must own the tool's parent agent.
303
304        Args:
305            tool: Tool ID (`atl_...`) of the tool to delete.
306
307        Returns:
308            Empty response. Returns HTTP 204 on success.
309        """
310        self._http.request(f"/api/v1/agent_tools/{tool}", method="DELETE")

Delete an agent tool Permanently removes a tool from the agent. This action cannot be undone. Both "draft" and "active" tools can be deleted. If you only want to stop the agent from using a tool without removing it, use the deactivate endpoint instead. Requires app scope. The authenticated caller must own the tool's parent agent.

Arguments:
  • tool: Tool ID (atl_...) of the tool to delete.
Returns:

Empty response. Returns HTTP 204 on success.

def get(self, tool: str) -> archastro.platform.types.common.AgentTool:
312    def get(self, tool: str) -> AgentTool:
313        """
314        Retrieve an agent tool
315        Returns the tool identified by `tool`. The tool must belong to an agent
316        owned by the authenticated app.
317        Use this endpoint to inspect a tool's current configuration, status, and
318        metadata. To retrieve all tools for an agent or app, use the list endpoint.
319        Requires app scope.
320
321        Args:
322            tool: Tool ID (`atl_...`) of the tool to retrieve.
323
324        Returns:
325            The requested tool.
326        """
327        return self._http.request(f"/api/v1/agent_tools/{tool}", response_type=AgentTool)

Retrieve an agent tool Returns the tool identified by tool. The tool must belong to an agent owned by the authenticated app. Use this endpoint to inspect a tool's current configuration, status, and metadata. To retrieve all tools for an agent or app, use the list endpoint. Requires app scope.

Arguments:
  • tool: Tool ID (atl_...) of the tool to retrieve.
Returns:

The requested tool.

def update( self, tool: str, input: AgentToolUpdateInput) -> archastro.platform.types.common.AgentTool:
329    def update(self, tool: str, input: AgentToolUpdateInput) -> AgentTool:
330        """
331        Update an agent tool
332        Updates the configuration of an existing tool. All parameters are optional;
333        supply only the fields you want to change. Unspecified fields are left as-is.
334        You can update both `"draft"` and `"active"` tools. Updating an active tool
335        takes effect on the next agent run; any run already in progress continues
336        with the configuration it loaded at start.
337        Supplying `template` re-resolves the referenced AgentToolTemplate and patches
338        the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent
339        association. Any other params you supply alongside `template` override the
340        template defaults.
341        Requires app scope. The authenticated caller must own the tool's parent agent.
342
343        Args:
344            tool: Tool ID (`atl_...`) of the tool to update.
345            input: Request body.
346            input.async: When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
347            input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
348            input.config: Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
349            input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
350            input.handler_type: Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
351            input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
352            input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
353            input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
354            input.name: Display name for the tool. Applies to `"custom"` tools.
355            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.
356            input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
357            input.parameters_config: Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
358            input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
359
360        Returns:
361            The updated tool.
362        """
363        return self._http.request(
364            f"/api/v1/agent_tools/{tool}",
365            method="PATCH",
366            body=input,
367            response_type=AgentTool,
368        )

Update an agent tool Updates the configuration of an existing tool. All parameters are optional; supply only the fields you want to change. Unspecified fields are left as-is. You can update both "draft" and "active" tools. Updating an active tool takes effect on the next agent run; any run already in progress continues with the configuration it loaded at start. Supplying template re-resolves the referenced AgentToolTemplate and patches the tool in place, preserving its status, lookup_key, kind, and agent association. Any other params you supply alongside template override the template defaults. Requires app scope. The authenticated caller must own the tool's parent agent.

Arguments:
  • tool: Tool ID (atl_...) of the tool to update.
  • input: Request body.
  • input.async: When true, the tool executes asynchronously and the agent does not block waiting for a result. Applies to "custom" tools.
  • input.builtin_tool_config: Configuration object for the built-in tool. Shape is defined by the catalog entry's config_schema for the tool's builtin_tool_key. Applies to "builtin" tools.
  • input.config: Config ID (cfg_...) referencing the script or workflow graph that implements the tool handler. Applies to "custom" tools.
  • input.description: Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to "custom" tools.
  • input.handler_type: Execution handler for the tool. One of "script" or "workflow_graph". Applies to "custom" tools.
  • input.instruction: Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's description.
  • input.lookup_key: Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
  • input.metadata: Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
  • input.name: Display name for the tool. Applies to "custom" tools.
  • 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.
  • input.parameters: JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
  • input.parameters_config: Config ID (cfg_...) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline parameters value.
  • input.template: Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its status, lookup_key, kind, and agent association. Other params you supply alongside template override the template defaults.
Returns:

The updated tool.

def activate(self, tool: str) -> archastro.platform.types.common.AgentTool:
370    def activate(self, tool: str) -> AgentTool:
371        """
372        Activate an agent tool
373        Transitions a tool from `"draft"` status to `"active"`, making it available
374        for the agent to use during runs. Only tools in `"draft"` status can be
375        activated; calling this on an already-active tool is a no-op that returns the
376        current tool state.
377        Activation validates that all required configuration is present. For built-in
378        tools, this means the `builtin_tool_key` must resolve to a registered tool
379        type and any required integration must be connected. Returns 422 if
380        prerequisite checks fail.
381        Requires app scope. The authenticated caller must own the tool's parent agent.
382
383        Args:
384            tool: Tool ID (`atl_...`) of the tool to activate.
385
386        Returns:
387            The updated tool with `status: "active"`.
388        """
389        return self._http.request(
390            f"/api/v1/agent_tools/{tool}/activate",
391            method="POST",
392            response_type=AgentTool,
393        )

Activate an agent tool Transitions a tool from "draft" status to "active", making it available for the agent to use during runs. Only tools in "draft" status can be activated; calling this on an already-active tool is a no-op that returns the current tool state. Activation validates that all required configuration is present. For built-in tools, this means the builtin_tool_key must resolve to a registered tool type and any required integration must be connected. Returns 422 if prerequisite checks fail. Requires app scope. The authenticated caller must own the tool's parent agent.

Arguments:
  • tool: Tool ID (atl_...) of the tool to activate.
Returns:

The updated tool with status: "active".

def deactivate(self, tool: str) -> archastro.platform.types.common.AgentTool:
395    def deactivate(self, tool: str) -> AgentTool:
396        """
397        Deactivate an agent tool
398        Transitions a tool from `"active"` status back to `"draft"`, removing it
399        from the set of tools the agent can use during future runs. Calling this on a
400        tool that is already in `"draft"` status is a no-op that returns the current
401        tool state.
402        Deactivation does not delete the tool or its configuration. To remove the
403        tool permanently, use the delete endpoint.
404        Requires app scope. The authenticated caller must own the tool's parent agent.
405
406        Args:
407            tool: Tool ID (`atl_...`) of the tool to deactivate.
408
409        Returns:
410            The updated tool with `status: "draft"`.
411        """
412        return self._http.request(
413            f"/api/v1/agent_tools/{tool}/deactivate",
414            method="POST",
415            response_type=AgentTool,
416        )

Deactivate an agent tool Transitions a tool from "active" status back to "draft", removing it from the set of tools the agent can use during future runs. Calling this on a tool that is already in "draft" status is a no-op that returns the current tool state. Deactivation does not delete the tool or its configuration. To remove the tool permanently, use the delete endpoint. Requires app scope. The authenticated caller must own the tool's parent agent.

Arguments:
  • tool: Tool ID (atl_...) of the tool to deactivate.
Returns:

The updated tool with status: "draft".