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

# Restore Agent

> Bring an archived agent back into the workspace.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/workspaces/{workspace}/agents/{agent_id}/restore
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/workspaces/{workspace}/agents/{agent_id}/restore:
    post:
      tags:
        - v1
        - protected
        - agents
      summary: Restore Agent
      description: Bring an archived agent back into the workspace.
      operationId: restore_agent_v1_agents__agent_id__restore_post
      parameters:
        - in: path
          name: agent_id
          required: true
          schema:
            title: Agent Id
            type: string
        - description: Slug of the workspace the request acts in
          in: path
          name: workspace
          required: true
          schema:
            description: Slug of the workspace the request acts in
            maxLength: 120
            pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
            title: Workspace
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    AgentResponse:
      properties:
        a2a_url:
          anyOf:
            - type: string
            - type: 'null'
          title: A2A Url
        a2ui_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: A2Ui Enabled
        agent_type:
          default: stateless
          title: Agent Type
          type: string
        answer_check:
          anyOf:
            - $ref: '#/components/schemas/AnswerCheckPolicy'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        id:
          format: uuid
          title: Id
          type: string
        instruction:
          anyOf:
            - type: string
            - type: 'null'
          title: Instruction
        is_catalog:
          default: false
          title: Is Catalog
          type: boolean
        model_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Id
        name:
          title: Name
          type: string
        planning:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Planning
        registry_item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Registry Item Id
        skills:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Skills
        slug:
          title: Slug
          type: string
        status:
          title: Status
          type: string
        tools:
          anyOf:
            - items:
                discriminator:
                  mapping:
                    agent: '#/components/schemas/AgentToolConfig'
                    code: '#/components/schemas/CodeToolConfig'
                    mcp: '#/components/schemas/McpToolConfig-Output'
                    openapi: '#/components/schemas/OpenApiToolConfig'
                  propertyName: type
                oneOf:
                  - $ref: '#/components/schemas/CodeToolConfig'
                  - $ref: '#/components/schemas/McpToolConfig-Output'
                  - $ref: '#/components/schemas/AgentToolConfig'
                  - $ref: '#/components/schemas/OpenApiToolConfig'
              type: array
            - type: 'null'
          title: Tools
        update_available:
          default: false
          title: Update Available
          type: boolean
      required:
        - id
        - slug
        - name
        - status
      title: AgentResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    AnswerCheckPolicy:
      additionalProperties: false
      description: >-
        Check an agent's final answer and have the model rewrite it once if it
        leaks.


        Leaks: CJK characters, tool names and snake_case codes, stack traces,
        raw

        JSON, and (for ``language: ru``) lowercase English words in a Russian
        answer.
      properties:
        enabled:
          default: true
          title: Enabled
          type: boolean
        language:
          anyOf:
            - maxLength: 8
              minLength: 2
              type: string
            - type: 'null'
          title: Language
        rewrite_instruction:
          anyOf:
            - maxLength: 4000
              minLength: 1
              type: string
            - type: 'null'
          title: Rewrite Instruction
      title: AnswerCheckPolicy
      type: object
    AgentToolConfig:
      properties:
        name:
          title: Name
          type: string
        settings:
          anyOf:
            - $ref: '#/components/schemas/AgentToolSettings'
            - type: 'null'
        type:
          const: agent
          default: agent
          title: Type
          type: string
      required:
        - name
      title: AgentToolConfig
      type: object
    CodeToolConfig:
      properties:
        name:
          title: Name
          type: string
        settings:
          anyOf:
            - $ref: '#/components/schemas/CodeToolSettings'
            - type: 'null'
        type:
          const: code
          default: code
          title: Type
          type: string
      required:
        - name
      title: CodeToolConfig
      type: object
    McpToolConfig-Output:
      properties:
        name:
          title: Name
          type: string
        settings:
          anyOf:
            - $ref: '#/components/schemas/McpToolSettings'
            - type: 'null'
        type:
          const: mcp
          default: mcp
          title: Type
          type: string
      required:
        - name
      title: McpToolConfig
      type: object
    OpenApiToolConfig:
      properties:
        name:
          title: Name
          type: string
        settings:
          anyOf:
            - $ref: '#/components/schemas/OpenApiToolSettings'
            - type: 'null'
        type:
          const: openapi
          default: openapi
          title: Type
          type: string
      required:
        - name
      title: OpenApiToolConfig
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    AgentToolSettings:
      description: >-
        Settings for an agent-to-agent (delegation) tool.


        ``a2a_url`` selects the *remote* transport binding; absent →
        same-platform

        direct delegation. Lives here only — A2A is a per-edge binding, not a

        property every tool type carries.
      properties:
        a2a_url:
          anyOf:
            - type: string
            - type: 'null'
          title: A2A Url
        auth_secret_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Workspace secret holding the bearer token sent to ``a2a_url``.
          title: Auth Secret Name
        description_override:
          anyOf:
            - type: string
            - type: 'null'
          title: Description Override
        requires_user_confirmation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requires User Confirmation
      title: AgentToolSettings
      type: object
    CodeToolSettings:
      description: |-
        Settings for a built-in code toolset.

        The model ids are model instances of the workspace, each of the kind its
        toolset needs: ``agentarea/media`` takes an image and/or a video model.
        No other toolset takes one.
      properties:
        disabled_methods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Disabled Methods
        image_model_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 'agentarea/media: model instance generating images.'
          title: Image Model Id
        requires_user_confirmation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requires User Confirmation
        video_model_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 'agentarea/media: model instance generating videos.'
          title: Video Model Id
      title: CodeToolSettings
      type: object
    McpToolSettings:
      description: Settings for an MCP server tool (a subset of the server's tools).
      properties:
        allowed_tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/McpToolPermission'
              type: array
            - type: 'null'
          title: Allowed Tools
        requires_user_confirmation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requires User Confirmation
      title: McpToolSettings
      type: object
    OpenApiToolSettings:
      description: >-
        Settings for an OpenAPI connection tool.


        ``load_mode`` picks schema disclosure: "explicit" inlines every
        operation's

        schema into each LLM call (legacy); "searchable" defers them behind a

        ``load_tools`` meta-tool. Honored only for openapi tools — which is
        exactly

        why it lives here and nowhere else.
      properties:
        allowed_tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Tools
        load_mode:
          anyOf:
            - enum:
                - explicit
                - searchable
              type: string
            - type: 'null'
          title: Load Mode
        openapi_connection_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Openapi Connection Id
        requires_user_confirmation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requires User Confirmation
      title: OpenApiToolSettings
      type: object
    McpToolPermission:
      description: >-
        A single MCP tool the agent may call.


        Replaces the old ``list[Any]`` for ``allowed_tools`` (the former FIXME).

        ``requires_user_confirmation`` is transport only: the API translates it
        into

        an agent-scoped approval policy rule and does not persist it here, so it
        is

        ``None`` at rest and reconstituted from rules on read.
      properties:
        requires_user_confirmation:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requires User Confirmation
        tool_name:
          title: Tool Name
          type: string
      required:
        - tool_name
      title: McpToolPermission
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````

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