> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alphagrid.capital/llms.txt
> Use this file to discover all available pages before exploring further.

# Archive managed agent

> Marks a managed agent profile as archived. Archived agents stop strategy runner executions, wipe the custodial signer key, and no longer count toward the per-user agent limit.



## OpenAPI

````yaml https://api-421614.alphagrid.capital/docs/swagger.json post /managed-agents/{agentId}/archive
openapi: 3.1.0
info:
  title: AlphaGrid API
  version: 0.1.0
  description: >-
    AlphaGrid HTTP API. MCP tools mirror these operations at POST /mcp
    (Streamable HTTP). For LLM URL fetchers, use GET /vaults or GET
    /vaults?format=md — see /llms.txt.
servers:
  - url: https://api-421614.alphagrid.capital/
    description: Current deployment
security: []
tags:
  - name: System
    description: Health, discovery, and operational endpoints
  - name: Vaults
    description: Thematic ERC-4626 vault catalog
  - name: Agents
    description: Agent registration via x402 and AgentRegistry
  - name: Trading
    description: Trade intents, positions, and on-chain risk state reads
paths:
  /managed-agents/{agentId}/archive:
    post:
      tags:
        - Managed agents
      summary: Archive managed agent
      description: >-
        Marks a managed agent profile as archived. Archived agents stop strategy
        runner executions, wipe the custodial signer key, and no longer count
        toward the per-user agent limit.
      parameters:
        - schema:
            type: string
            pattern: ^[1-9]\d*$
            example: '1'
          required: true
          name: agentId
          in: path
        - schema:
            type: string
            example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
          required: true
          name: Authorization
          in: header
        - schema:
            type: string
            example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...
            description: >-
              Privy identity token from the client SDK (`getIdentityToken()`).
              Required to resolve the linked Ethereum wallet address.
          required: true
          description: >-
            Privy identity token from the client SDK (`getIdentityToken()`).
            Required to resolve the linked Ethereum wallet address.
          name: privy-id-token
          in: header
      responses:
        '200':
          description: Archived managed agent profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveManagedAgentResponse'
        '400':
          description: Agent is already archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentError'
        '401':
          description: Missing or invalid Privy session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentError'
        '403':
          description: Caller is not the on-chain agent owner
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentError'
        '404':
          description: Managed agent profile not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentError'
      security:
        - bearerAuth: []
components:
  schemas:
    ArchiveManagedAgentResponse:
      type: object
      properties:
        profile:
          $ref: '#/components/schemas/ManagedAgentProfile'
      required:
        - profile
    ManagedAgentError:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    ManagedAgentProfile:
      type: object
      properties:
        agentId:
          type: string
          pattern: ^[1-9]\d*$
        handle:
          type: string
        strategy:
          type: string
        botFrequency:
          type: string
          enum:
            - 1h
            - 1d
          example: 1h
          description: >-
            Bot run frequency: `1h` (hourly) or `1d` (daily). Minute/second
            values are not supported.
        pricingTier:
          type: string
        nextRunAt:
          type: string
        archivedAt:
          type:
            - string
            - 'null'
        createdAt:
          type: string
      required:
        - agentId
        - handle
        - strategy
        - botFrequency
        - pricingTier
        - nextRunAt
        - archivedAt
        - createdAt

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.